FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.AddableReal Class Reference

Class representing a real number. More...

Inheritance diagram for frodo2.solutionSpaces.AddableReal:

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< AddableRealaddDelayed ()
Public Member Functions inherited from frodo2.solutionSpaces.Addable< AddableReal >
int intValue ()
double doubleValue ()
fromString (String str)
 Parses a string to construct a new instance.
fromInt (int nbr)
 Creates an instance from an int.
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.
subtract (T o)
 Subtracts an object from this object.
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.
getZero ()
 Returns a neutral object for the addition operation ("zero").
getPlusInfinity ()
 Returns the "+infinity" object.
getMinInfinity ()
 Returns the "-infinity" object.
abs ()
divide (T o)
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.

Detailed Description

Class representing a real number.

Author
Thomas Leaute

Constructor & Destructor Documentation

◆ AddableReal() [1/2]

◆ AddableReal() [2/2]

frodo2.solutionSpaces.AddableReal.AddableReal ( double value)

Constructor.

Parameters
valuethe value for the real number

References value.

Member Function Documentation

◆ abs()

AddableReal frodo2.solutionSpaces.AddableReal.abs ( )
See also
Addable.abs()

Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.

References AddableReal(), and value.

Here is the call graph for this function:

◆ add()

AddableReal frodo2.solutionSpaces.AddableReal.add ( final AddableReal o)

Adds this real number with another.

Parameters
othe other real number
Returns
a new real number equal to the sum of the two
See also
Addable#add(Addable)

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().

Here is the call graph for this function:

◆ addDelayed()

AddableDelayed< AddableReal > frodo2.solutionSpaces.AddableReal.addDelayed ( )

◆ compareTo() [1/2]

◆ compareTo() [2/2]

int frodo2.solutionSpaces.AddableReal.compareTo ( final AddableReal o,
double error )

Compares this real number with another one with some error margin.

Parameters
othe other real number
errorthe (non-negative) error margin
Returns
+1 if this number is greater than o, -1 if it is smaller, and 0 if they are equal
See also
java.lang.Comparable#compareTo(java.lang.Object)

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.

Here is the call graph for this function:

◆ divide()

◆ doubleValue()

◆ equals() [1/2]

boolean frodo2.solutionSpaces.AddableReal.equals ( final AddableReal that,
double error )

Compares two AddableReals within some error margin.

Parameters
thatthe other AddableReal
errorthe (non-negative) error margin
Returns
whether the two AddableReals are equal within the given 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.

Here is the call graph for this function:

◆ equals() [2/2]

◆ externalize()

final boolean frodo2.solutionSpaces.AddableReal.externalize ( )

◆ flipSign()

◆ fromInt()

AddableReal frodo2.solutionSpaces.AddableReal.fromInt ( int nbr)
See also
Addable.fromInt(int)

References AddableReal().

Here is the call graph for this function:

◆ fromString()

◆ getMinInfinity()

◆ getPlusInfinity()

AddableReal frodo2.solutionSpaces.AddableReal.getPlusInfinity ( )

◆ getZero()

AddableReal frodo2.solutionSpaces.AddableReal.getZero ( )
See also
Addable.getZero()

References AddableReal().

Here is the call graph for this function:

◆ hashCode()

int frodo2.solutionSpaces.AddableReal.hashCode ( )
See also
java.lang.Object#hashCode()

Reimplemented in frodo2.solutionSpaces.AddableReal.MinInfinity, and frodo2.solutionSpaces.AddableReal.PlusInfinity.

◆ intValue()

int frodo2.solutionSpaces.AddableReal.intValue ( )

◆ log()

AddableReal frodo2.solutionSpaces.AddableReal.log ( )
Returns
the natural logarithm of this number

Reimplemented in frodo2.solutionSpaces.AddableReal.PlusInfinity.

References AddableReal().

Here is the call graph for this function:

◆ max()

AddableReal frodo2.solutionSpaces.AddableReal.max ( final AddableReal o)
Parameters
oThe maximum of this value and the input
Returns
the max of this addable real and o
See also
Addable#max(AddableLimited)

References AddableReal(), and compareTo().

Referenced by frodo2.algorithms.duct.Normalize< V extends Addable< V > >.notifyIn().

Here is the call graph for this function:

◆ min()

AddableReal frodo2.solutionSpaces.AddableReal.min ( final AddableReal o)

Computes the minimum of two AddableReals.

Parameters
othe AddableReal to compare to
Returns
the minimum of the two
See also
Addable#min(AddableLimited)

References AddableReal(), and compareTo().

Here is the call graph for this function:

◆ multiply()

AddableReal frodo2.solutionSpaces.AddableReal.multiply ( final AddableReal o)

Multiplies this AddableReal with another AddableReal.

Parameters
othe AddableReal to be multiplied with
Returns
a new AddableReal equal to the product
See also
Addable#multiply(Addable)

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().

Here is the call graph for this function:

◆ range()

Addable< AddableReal >[] frodo2.solutionSpaces.AddableReal.range ( AddableReal begin,
AddableReal end )
See also
Addable#range(Addable, Addable)

References AddableReal().

Here is the call graph for this function:

◆ readExternal()

void frodo2.solutionSpaces.AddableReal.readExternal ( ObjectInput arg0) throws IOException, ClassNotFoundException

◆ readResolve()

◆ subtract()

AddableReal frodo2.solutionSpaces.AddableReal.subtract ( final AddableReal o)

◆ toString()

String frodo2.solutionSpaces.AddableReal.toString ( )

◆ writeExternal()

void frodo2.solutionSpaces.AddableReal.writeExternal ( ObjectOutput arg0) throws IOException
See also
java.io.Externalizable#writeExternal(java.io.ObjectOutput)

Member Data Documentation

◆ serialVersionUID

final long frodo2.solutionSpaces.AddableReal.serialVersionUID = -2877043522184206202L
staticprivate

Used for serialization.

◆ value


The documentation for this class was generated from the following file: