|
FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
|
Class representing a real number. More...

Classes | |
| class | PlusInfinity |
| A singleton class representing the real number +infinity. More... | |
| class | MinInfinity |
| A singleton class representing the real number -infinity. More... | |
| class | AddableRealDelayed |
| Class used to make the addition of a large number of reals more efficient. More... | |
Public Member Functions | |
| AddableReal () | |
| Default constructor. | |
| AddableReal (double value) | |
| Constructor. | |
| void | writeExternal (ObjectOutput arg0) throws IOException |
| void | readExternal (ObjectInput arg0) throws IOException, ClassNotFoundException |
| final boolean | externalize () |
| Object | readResolve () |
| AddableReal | fromString (final String str) |
| AddableReal | fromInt (int nbr) |
| String | toString () |
| AddableReal | add (final AddableReal o) |
| Adds this real number with another. | |
| AddableReal | multiply (final AddableReal o) |
| Multiplies this AddableReal with another AddableReal. | |
| AddableReal | getMinInfinity () |
| AddableReal | getPlusInfinity () |
| AddableReal | getZero () |
| AddableReal | min (final AddableReal o) |
| Computes the minimum of two AddableReals. | |
| AddableReal | max (final AddableReal o) |
| AddableReal | abs () |
| int | compareTo (final AddableReal o) |
| Compares this real number with another one. | |
| int | compareTo (final AddableReal o, double error) |
| Compares this real number with another one with some error margin. | |
| boolean | equals (final Object o) |
| boolean | equals (final AddableReal that, double error) |
| Compares two AddableReals within some error margin. | |
| int | hashCode () |
| int | intValue () |
| double | doubleValue () |
| AddableReal | flipSign () |
| AddableReal | log () |
| AddableReal | subtract (final AddableReal o) |
| Subtracts o from this AddableReal. | |
| AddableReal | divide (final AddableReal o) |
| Addable< AddableReal >[] | range (AddableReal begin, AddableReal end) |
| AddableDelayed< AddableReal > | addDelayed () |
| Public Member Functions inherited from frodo2.solutionSpaces.Addable< AddableReal > | |
| int | intValue () |
| double | doubleValue () |
| T | fromString (String str) |
| Parses a string to construct a new instance. | |
| T | fromInt (int nbr) |
| Creates an instance from an int. | |
| T | add (T o) |
| Adds an object to this object. | |
| AddableDelayed< T > | addDelayed () |
| Creates an object with the same value as this object, used to delay the resolution of a large number of additions. | |
| T | subtract (T o) |
| Subtracts an object from this object. | |
| T | multiply (T o) |
| Multiplies an object with this object. | |
| boolean | equals (Object o) |
| The equals function must be implemented so that the hashmap storing the steps for each value can find the proper step for the provided value. | |
| int | hashCode () |
| The hashCode function must be implemented so that the hashmap storing the steps for each value can find the proper step for the provided value. | |
| T | getZero () |
| Returns a neutral object for the addition operation ("zero"). | |
| T | getPlusInfinity () |
| Returns the "+infinity" object. | |
| T | getMinInfinity () |
| Returns the "-infinity" object. | |
| T | abs () |
| T | divide (T o) |
| T | flipSign () |
| Flip the sign of this number. | |
| Addable< T >[] | range (T begin, T end) |
Returns an array containing all the values between begin and end. | |
Private Attributes | |
| double | value |
| The value of this real number. | |
Static Private Attributes | |
| static final long | serialVersionUID = -2877043522184206202L |
| Used for serialization. | |
Class representing a real number.
| frodo2.solutionSpaces.AddableReal.AddableReal | ( | ) |
Default constructor.
Referenced by abs(), add(), frodo2.solutionSpaces.AddableReal.MinInfinity.add(), frodo2.solutionSpaces.AddableReal.PlusInfinity.add(), frodo2.solutionSpaces.AddableReal.AddableRealDelayed.addDelayed(), compareTo(), compareTo(), frodo2.solutionSpaces.AddableReal.MinInfinity.compareTo(), frodo2.solutionSpaces.AddableReal.MinInfinity.compareTo(), frodo2.solutionSpaces.AddableReal.PlusInfinity.compareTo(), frodo2.solutionSpaces.AddableReal.PlusInfinity.compareTo(), divide(), frodo2.solutionSpaces.AddableReal.MinInfinity.divide(), frodo2.solutionSpaces.AddableReal.PlusInfinity.divide(), equals(), equals(), frodo2.solutionSpaces.AddableReal.MinInfinity.equals(), frodo2.solutionSpaces.AddableReal.PlusInfinity.equals(), flipSign(), fromInt(), fromString(), getMinInfinity(), getPlusInfinity(), getZero(), log(), frodo2.solutionSpaces.AddableReal.PlusInfinity.log(), max(), min(), frodo2.solutionSpaces.AddableReal.MinInfinity.multiply(), multiply(), frodo2.solutionSpaces.AddableReal.PlusInfinity.multiply(), frodo2.solutionSpaces.AddableReal.AddableRealDelayed.multiplyDelayed(), range(), frodo2.solutionSpaces.AddableReal.AddableRealDelayed.resolve(), frodo2.solutionSpaces.AddableReal.MinInfinity.subtract(), frodo2.solutionSpaces.AddableReal.PlusInfinity.subtract(), and subtract().
| frodo2.solutionSpaces.AddableReal.AddableReal | ( | double | value | ) |
| AddableReal frodo2.solutionSpaces.AddableReal.abs | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), and value.

| AddableReal frodo2.solutionSpaces.AddableReal.add | ( | final AddableReal | o | ) |
Adds this real number with another.
| o | the other real number |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.
Referenced by frodo2.algorithms.duct.DUCTsolver< V extends Addable< V > >.buildSolution(), frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.getRandomUnknowLocal(), frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.NormalizeInf< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChild< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChildSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingPruningSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChild< V extends Addable< V > >.VariableInfo.storeCOSTmsg(), frodo2.algorithms.duct.SamplingChildSearch< V extends Addable< V > >.VariableInfo.storeCOSTmsg(), frodo2.algorithms.duct.SamplingPruning< V extends Addable< V > >.VariableInfo.storeCOSTmsg(), frodo2.algorithms.duct.SamplingPruningSearch< V extends Addable< V > >.VariableInfo.storeCOSTmsg(), frodo2.algorithms.duct.tests.NormalizeInfTest.test(), frodo2.algorithms.duct.tests.NormalizeTest.test(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), frodo2.algorithms.test.XCSPparserTest.testGetMinInfUtility(), frodo2.algorithms.test.XCSPparserTest.testGetPlusInfUtility(), frodo2.algorithms.test.XCSPparserTest.testGetUtility(), and frodo2.algorithms.test.XCSPparserTest.testGetZeroUtility().

| AddableDelayed< AddableReal > frodo2.solutionSpaces.AddableReal.addDelayed | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References value.
| int frodo2.solutionSpaces.AddableReal.compareTo | ( | final AddableReal | o | ) |
Compares this real number with another one.
| o | the other real number |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.
Referenced by frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), max(), min(), frodo2.algorithms.duct.Sampling< V extends Addable< V > >.VariableInfo.solveLeaf(), frodo2.algorithms.duct.SamplingPruning< V extends Addable< V > >.VariableInfo.solveLeaf(), frodo2.algorithms.duct.tests.NormalizeInfTest.test(), frodo2.algorithms.duct.tests.NormalizeTest.test(), frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testBestFirstiterator(), frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testCompoundBestFirstIterator(), and frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testConsensusWeighted().

| int frodo2.solutionSpaces.AddableReal.compareTo | ( | final AddableReal | o, |
| double | error ) |
Compares this real number with another one with some error margin.
| o | the other real number |
| error | the (non-negative) error margin |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.

| AddableReal frodo2.solutionSpaces.AddableReal.divide | ( | final AddableReal | o | ) |
| o | The real to divide with |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.
Referenced by frodo2.algorithms.duct.SamplingChild< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingChildSearch< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.SamplingPruningSearch< V extends Addable< V > >.notifyIn(), and frodo2.algorithms.Convergence< V extends Addable< V >, U extends Addable< U > >.processRuns().

| double frodo2.solutionSpaces.AddableReal.doubleValue | ( | ) |
Referenced by frodo2.algorithms.duct.termination.TerminateBest< V extends Addable< V > >.converged(), frodo2.algorithms.duct.termination.TerminateBest_Child< V extends Addable< V > >.converged(), frodo2.benchmarks.party.PartyGame.encodeProblem(), frodo2.algorithms.duct.samplingMethods.SamplingM< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.samplingMethods.SamplingM_Child< V extends Addable< V > >.processSample(), frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.storeCost(), frodo2.algorithms.duct.SearchNodeChild< V extends Addable< V > >.storeCost(), frodo2.algorithms.duct.SearchNodePruning< V extends Addable< V > >.storeCost(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), and frodo2.algorithms.duct.SearchNode< V extends Addable< V > >.toString().
| boolean frodo2.solutionSpaces.AddableReal.equals | ( | final AddableReal | that, |
| double | error ) |
Compares two AddableReals within some error margin.
| that | the other AddableReal |
| error | the (non-negative) error margin |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), equals(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.

| boolean frodo2.solutionSpaces.AddableReal.equals | ( | final Object | o | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.
Referenced by frodo2.algorithms.dpop.stochastic.test.E_DPOPagentTest< V extends Addable< V > >.checkOutput(), equals(), frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.NormalizeInf< V extends Addable< V > >.notifyIn(), frodo2.algorithms.duct.tests.NormalizeInfTest.test(), frodo2.algorithms.duct.tests.NormalizeTest.test(), frodo2.solutionSpaces.vehiclerouting.test.VRPtests.test(), frodo2.solutionSpaces.hypercube.tests.HypercubeTest.testExpectation(), frodo2.algorithms.test.XCSPparserTest.testGetMinInfUtility(), frodo2.algorithms.test.XCSPparserTest.testGetPlusInfUtility(), and frodo2.algorithms.test.XCSPparserTest.testGetZeroUtility().

| final boolean frodo2.solutionSpaces.AddableReal.externalize | ( | ) |
| AddableReal frodo2.solutionSpaces.AddableReal.flipSign | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), and value.
Referenced by frodo2.algorithms.duct.Normalize< V extends Addable< V > >.normalize(), and frodo2.algorithms.duct.NormalizeInf< V extends Addable< V > >.normalize().

| AddableReal frodo2.solutionSpaces.AddableReal.fromInt | ( | int | nbr | ) |
| AddableReal frodo2.solutionSpaces.AddableReal.fromString | ( | final String | str | ) |
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, and frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF.
Referenced by frodo2.algorithms.duct.Normalize< V extends Addable< V > >.Normalize(), and frodo2.algorithms.Convergence< V extends Addable< V >, U extends Addable< U > >.processRuns().

| AddableReal frodo2.solutionSpaces.AddableReal.getMinInfinity | ( | ) |
References AddableReal(), and frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF.
Referenced by frodo2.algorithms.Convergence< V extends Addable< V >, U extends Addable< U > >.processRuns(), frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testBestFirstiterator(), and frodo2.solutionSpaces.vehiclerouting.test.VRPtests.testCompoundBestFirstIterator().

| AddableReal frodo2.solutionSpaces.AddableReal.getPlusInfinity | ( | ) |
References AddableReal(), and frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF.
Referenced by frodo2.algorithms.Convergence< V extends Addable< V >, U extends Addable< U > >.processRuns().

| AddableReal frodo2.solutionSpaces.AddableReal.getZero | ( | ) |
| int frodo2.solutionSpaces.AddableReal.hashCode | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
| int frodo2.solutionSpaces.AddableReal.intValue | ( | ) |
| AddableReal frodo2.solutionSpaces.AddableReal.log | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal().

| AddableReal frodo2.solutionSpaces.AddableReal.max | ( | final AddableReal | o | ) |
| o | The maximum of this value and the input |
o References AddableReal(), and compareTo().
Referenced by frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn().

| AddableReal frodo2.solutionSpaces.AddableReal.min | ( | final AddableReal | o | ) |
Computes the minimum of two AddableReals.
| o | the AddableReal to compare to |
References AddableReal(), and compareTo().

| AddableReal frodo2.solutionSpaces.AddableReal.multiply | ( | final AddableReal | o | ) |
Multiplies this AddableReal with another AddableReal.
| o | the AddableReal to be multiplied with |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.
Referenced by frodo2.algorithms.test.XCSPparserTest.testSetDomain().

| Addable< AddableReal >[] frodo2.solutionSpaces.AddableReal.range | ( | AddableReal | begin, |
| AddableReal | end ) |
References AddableReal().

| void frodo2.solutionSpaces.AddableReal.readExternal | ( | ObjectInput | arg0 | ) | throws IOException, ClassNotFoundException |
Referenced by frodo2.algorithms.duct.BOUNDmsg.readExternal(), frodo2.algorithms.duct.BoundStatsMsg.readExternal(), frodo2.algorithms.duct.COSTBmsg.readExternal(), frodo2.algorithms.duct.COSTmsg.readExternal(), and frodo2.algorithms.duct.NORMmsg.readExternal().
| Object frodo2.solutionSpaces.AddableReal.readResolve | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, and frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF.
Referenced by frodo2.algorithms.duct.BOUNDmsg.readExternal(), frodo2.algorithms.duct.BoundStatsMsg.readExternal(), frodo2.algorithms.duct.COSTBmsg.readExternal(), frodo2.algorithms.duct.COSTmsg.readExternal(), and frodo2.algorithms.duct.NORMmsg.readExternal().
| AddableReal frodo2.solutionSpaces.AddableReal.subtract | ( | final AddableReal | o | ) |
Subtracts o from this AddableReal.
| o | the value that is subtracted |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
References AddableReal(), frodo2.solutionSpaces.AddableReal.MinInfinity.MIN_INF, frodo2.solutionSpaces.AddableReal.PlusInfinity.PLUS_INF, and value.
Referenced by frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn(), and frodo2.algorithms.duct.NormalizeInf< V extends Addable< V > >.notifyIn().

| String frodo2.solutionSpaces.AddableReal.toString | ( | ) |
Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.
Referenced by frodo2.benchmarks.vehiclerouting.CordeauToXCSP.createXCSP().
| void frodo2.solutionSpaces.AddableReal.writeExternal | ( | ObjectOutput | arg0 | ) | throws IOException |
|
staticprivate |
Used for serialization.
|
private |
The value of this real number.
Referenced by abs(), add(), AddableReal(), frodo2.solutionSpaces.AddableReal.AddableRealDelayed.addDelayed(), addDelayed(), compareTo(), compareTo(), divide(), equals(), equals(), flipSign(), frodo2.solutionSpaces.AddableReal.MinInfinity.multiply(), multiply(), frodo2.solutionSpaces.AddableReal.PlusInfinity.multiply(), frodo2.solutionSpaces.AddableReal.AddableRealDelayed.multiplyDelayed(), and subtract().