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

Classes

class  PlusInfinity
 This class implements the plus infinity element. More...
class  MinInfinity
 This class implements the minus infinity element. More...
class  AddableIntegerDelayed
 Class used to make the addition of a large number of integers more efficient. More...

Public Member Functions

 AddableInteger ()
 Empty constructor for creating zero, plus and minus infinity.
 AddableInteger (int integer)
void writeExternal (ObjectOutput arg0) throws IOException
void readExternal (ObjectInput arg0) throws IOException, ClassNotFoundException
final boolean externalize ()
Object readResolve ()
AddableInteger fromString (final String str)
AddableInteger fromInt (int nbr)
int intValue ()
double doubleValue ()
String toString ()
AddableInteger add (final AddableInteger o)
 Adds this AddableInteger with another AddableInteger.
AddableInteger add (int o)
 Adds an int to the value of this AddableInteger.
AddableInteger subtract (final AddableInteger o)
 Subtracts another AddableInteger from this AddableInteger.
AddableInteger subtract (int o)
 Subtracts an integer from this addable integer.
AddableInteger multiply (final AddableInteger o)
 Multiplies this AddableInteger with another AddableInteger.
AddableInteger divide (final AddableInteger o)
AddableInteger min (final AddableInteger o)
 Computes the min of two AddableIntegers.
AddableInteger max (final AddableInteger o)
 Computes the max of two AddableIntegers.
AddableInteger abs ()
int compareTo (final AddableInteger o)
 Compares this AddableInteger with another.
boolean equals (final Object o)
int hashCode ()
AddableInteger getZero ()
AddableInteger getPlusInfinity ()
AddableInteger getMinInfinity ()
AddableInteger flipSign ()
Addable< AddableInteger >[] range (AddableInteger begin, AddableInteger end)
AddableDelayed< AddableIntegeraddDelayed ()
Public Member Functions inherited from frodo2.solutionSpaces.Addable< AddableInteger >
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 Member Functions

boolean warnTruncation (String str)
 Warns for truncation.

Private Attributes

int integer
 The value.

Detailed Description

Author
Radoslaw Szymanek, Thomas Leaute, Brammert Ottens

Constructor & Destructor Documentation

◆ AddableInteger() [1/2]

◆ AddableInteger() [2/2]

frodo2.solutionSpaces.AddableInteger.AddableInteger ( int integer)
Parameters
integerthe integer value

References integer.

Member Function Documentation

◆ abs()

◆ add() [1/2]

◆ add() [2/2]

AddableInteger frodo2.solutionSpaces.AddableInteger.add ( int o)

Adds an int to the value of this AddableInteger.

Parameters
othe int value
Returns
the resulting new AddableInteger

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

References AddableInteger(), and integer.

Here is the call graph for this function:

◆ addDelayed()

◆ compareTo()

◆ divide()

AddableInteger frodo2.solutionSpaces.AddableInteger.divide ( final AddableInteger o)
Parameters
othe integer to divide with
Returns
the result of the division
See also
Addable#divide(Addable)

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

References AddableInteger(), integer, frodo2.solutionSpaces.AddableInteger.MinInfinity.MIN_INF, and frodo2.solutionSpaces.AddableInteger.PlusInfinity.PLUS_INF.

Here is the call graph for this function:

◆ doubleValue()

double frodo2.solutionSpaces.AddableInteger.doubleValue ( )

◆ equals()

boolean frodo2.solutionSpaces.AddableInteger.equals ( final Object o)
See also
java.lang.Object#equals(java.lang.Object)

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

References AddableInteger(), integer, frodo2.solutionSpaces.AddableInteger.MinInfinity.MIN_INF, and frodo2.solutionSpaces.AddableInteger.PlusInfinity.PLUS_INF.

Referenced by frodo2.solutionSpaces.crypto.ElGamalSchemeTest.add(), frodo2.algorithms.dpop.stochastic.test.ExpectedUTILtest.Listener.checkOutput(), frodo2.algorithms.dpop.privacy.test.FakeCryptoSchemeTest.decrypt(), frodo2.algorithms.dpop.privacy.test.FakeCryptoScheme.encrypt(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.getUtility(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.getUtility(), frodo2.solutionSpaces.JaCoP.JaCoPutilSpaceIter< U extends Addable< U > >.JaCoPutilSpaceIter(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.join(), frodo2.solutionSpaces.crypto.ElGamalSchemeTest.min(), frodo2.solutionSpaces.crypto.ElGamalSchemeTest.partialEncrypt(), frodo2.solutionSpaces.crypto.ElGamalSchemeTest.randomDecrypt(), frodo2.solutionSpaces.crypto.ElGamalSchemeTest.randomDecryptOnce(), frodo2.algorithms.mpc_discsp.MPC_DisCSP4< V extends Addable< V > >.recordCandidateSol(), frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.slice(), frodo2.algorithms.maxsum.tests.MaxSumTests< V extends Addable< V >, U extends Addable< U > >.test(), frodo2.solutionSpaces.hypercube.tests.HypercubeIterBestFirstTest.testMaximize(), frodo2.solutionSpaces.hypercube.tests.HypercubeIterBestFirstTest.testMinimize(), frodo2.algorithms.dpop.count.test.TestCountSolutions.testRandom(), and frodo2.solutionSpaces.vehiclerouting.VehicleRoutingSpace< U extends Addable< U > >.VRPiterator.VRPiterator().

Here is the call graph for this function:

◆ externalize()

◆ flipSign()

AddableInteger frodo2.solutionSpaces.AddableInteger.flipSign ( )
See also
Addable.flipSign()

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

References AddableInteger(), and integer.

Here is the call graph for this function:

◆ fromInt()

◆ fromString()

◆ getMinInfinity()

AddableInteger frodo2.solutionSpaces.AddableInteger.getMinInfinity ( )
See also
Addable.getMinInfinity()

References AddableInteger(), and frodo2.solutionSpaces.AddableInteger.MinInfinity.MIN_INF.

Here is the call graph for this function:

◆ getPlusInfinity()

AddableInteger frodo2.solutionSpaces.AddableInteger.getPlusInfinity ( )

◆ getZero()

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

References AddableInteger().

Referenced by frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >.readExternal().

Here is the call graph for this function:

◆ hashCode()

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

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

References integer.

◆ intValue()

◆ max()

AddableInteger frodo2.solutionSpaces.AddableInteger.max ( final AddableInteger o)

Computes the max of two AddableIntegers.

Parameters
othe AddableInteger to compare to
Returns
the maximum of this and the input AddableInteger
See also
Addable#max(AddableLimited)

References AddableInteger(), and compareTo().

Here is the call graph for this function:

◆ min()

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

Computes the min of two AddableIntegers.

Parameters
othe AddableInteger to compare to
Returns
the minimum of this and the input AddableInteger
See also
Addable#min(AddableLimited)

References AddableInteger(), and compareTo().

Referenced by frodo2.algorithms.mpc_discsp.MPC_DisWCSP4< V extends Addable< V > >.recordCandidateSol().

Here is the call graph for this function:

◆ multiply()

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

◆ range()

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

References AddableInteger(), integer, and range().

Referenced by range().

Here is the call graph for this function:

◆ readExternal()

void frodo2.solutionSpaces.AddableInteger.readExternal ( ObjectInput arg0) throws IOException, ClassNotFoundException
See also
java.io.Externalizable#readExternal(java.io.ObjectInput)

Referenced by frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >.readExternal().

◆ readResolve()

◆ subtract() [1/2]

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

Subtracts another AddableInteger from this AddableInteger.

Parameters
othe other AddableInteger
Returns
the result of the subtraction
See also
Addable#subtract(Addable)

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

References AddableInteger(), integer, frodo2.solutionSpaces.AddableInteger.MinInfinity.MIN_INF, and frodo2.solutionSpaces.AddableInteger.PlusInfinity.PLUS_INF.

Here is the call graph for this function:

◆ subtract() [2/2]

AddableInteger frodo2.solutionSpaces.AddableInteger.subtract ( int o)

Subtracts an integer from this addable integer.

Parameters
othe integer to subtract
Returns
the result of the subtraction

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

References AddableInteger(), and integer.

Here is the call graph for this function:

◆ toString()

◆ warnTruncation()

boolean frodo2.solutionSpaces.AddableInteger.warnTruncation ( String str)
private

Warns for truncation.

Parameters
strthe string
Returns
true

Referenced by fromString().

◆ writeExternal()

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

Referenced by frodo2.solutionSpaces.JaCoP.JaCoPutilSpace< V extends Addable< V > >.writeExternal().

Member Data Documentation

◆ integer


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