FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.solutionSpaces.Addable< T extends Addable< T > > Interface Template Reference

Defines the methods add() and also multiply(). More...

Inheritance diagram for frodo2.solutionSpaces.Addable< T extends Addable< T > >:

Public Member Functions

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.
Public Member Functions inherited from frodo2.solutionSpaces.AddableLimited< T, T >
add (A other)
 Addition.
min (M other)
 Minimum.
max (M other)
 Maximum.
boolean externalize ()
Object readResolve ()
 Method called just after deserialization.

Detailed Description

Defines the methods add() and also multiply().

Author
Nacereddine Ouaret, Thomas Leaute, Radoslaw Szymanek, Brammert Ottens
Warning
when creating an Addable class, make sure there is a constructor that takes in no arguments.
Parameters
<T>the type of objects to be added to or multiplied with an object of this class

Member Function Documentation

◆ abs()

◆ add()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.add ( T o)

Adds an object to this object.

Parameters
othe object to be added
Returns
object obtained by the sum of this addable with the input object o

◆ addDelayed()

AddableDelayed< T > frodo2.solutionSpaces.Addable< T extends Addable< T > >.addDelayed ( )

Creates an object with the same value as this object, used to delay the resolution of a large number of additions.

Author
Brammert Ottens, 30 mrt 2010
Returns
an object that allows the addition to be delayed

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger, frodo2.solutionSpaces.crypto.AddableBigInteger.MinInfinity, and frodo2.solutionSpaces.crypto.AddableBigInteger.PlusInfinity.

◆ divide()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.divide ( T o)
Parameters
othe number to divide with
Returns
the division of this number by o

◆ doubleValue()

◆ equals()

boolean frodo2.solutionSpaces.Addable< T extends Addable< T > >.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.

Parameters
othe object to be checked for equality
Returns
true if they are equal.

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger, frodo2.solutionSpaces.crypto.AddableBigInteger.MinInfinity, and frodo2.solutionSpaces.crypto.AddableBigInteger.PlusInfinity.

◆ flipSign()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.flipSign ( )

◆ fromInt()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.fromInt ( int nbr)

Creates an instance from an int.

Parameters
nbrthe int
Returns
a new instance

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger.

◆ fromString()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.fromString ( String str)

Parses a string to construct a new instance.

Parameters
strthe string
Returns
a new instance

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger.

◆ getMinInfinity()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.getMinInfinity ( )

Returns the "-infinity" object.

Adding -infinity to any object (except +infinity) should always return -infinity. The -infinity object should be a singleton, so that one can use == to check if an object is -infinity.

Returns
the -infinity object

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger.

◆ getPlusInfinity()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.getPlusInfinity ( )

Returns the "+infinity" object.

Adding +infinity to any object (except -infinity) should always return +infinity. The +infinity object should be a singleton, so that one can use == to check if an object is +infinity.

Returns
the +infinity object

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger.

◆ getZero()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.getZero ( )

Returns a neutral object for the addition operation ("zero").

Returns
a zero object

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger.

◆ hashCode()

int frodo2.solutionSpaces.Addable< T extends Addable< T > >.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.

Returns
hash code for this object

Implemented in frodo2.solutionSpaces.crypto.AddableBigInteger, frodo2.solutionSpaces.crypto.AddableBigInteger.MinInfinity, and frodo2.solutionSpaces.crypto.AddableBigInteger.PlusInfinity.

◆ intValue()

◆ multiply()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.multiply ( T o)

Multiplies an object with this object.

Parameters
othe object to be multiplied with
Returns
object obtained by the product of this Addable with the input object o

◆ range()

Addable< T >[] frodo2.solutionSpaces.Addable< T extends Addable< T > >.range ( T begin,
T end )

Returns an array containing all the values between begin and end.

Author
Brammert Ottens, 3 feb 2010
Parameters
beginthe smallest element of the range
endthe biggest element of the range
Returns
the range of values between begin and end

◆ subtract()

T frodo2.solutionSpaces.Addable< T extends Addable< T > >.subtract ( T o)

Subtracts an object from this object.

Parameters
othe object to be subtracted
Returns
object obtained by the subtraction of the input object o from this addable

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