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

An Addable number based on a BigInteger. More...

Inheritance diagram for frodo2.solutionSpaces.crypto.AddableBigInteger:

Classes

class  MinInfinity
 This class implements the minus infinity element. More...
class  PlusInfinity
 This class implements the plus infinity element. More...
class  AddableBigIntegerDelayed
 Class used to speed up n-ary additions and multiplications. More...

Public Member Functions

 AddableBigInteger ()
 Empty constructor.
 AddableBigInteger (String val)
 Constructor from a String.
 AddableBigInteger (int numBits, Random rnd)
 Random constructor.
 AddableBigInteger (BigInteger val)
 Constructor.
 AddableBigInteger (int val)
 Constructor.
void writeExternal (ObjectOutput out) throws IOException
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
Object readResolve ()
final boolean externalize ()
AddableBigInteger abs ()
AddableBigInteger add (AddableBigInteger o)
AddableDelayed< AddableBigIntegeraddDelayed ()
int compareTo (AddableBigInteger o)
AddableBigInteger divide (AddableBigInteger o)
boolean equals (Object o)
AddableBigInteger flipSign ()
AddableBigInteger fromString (String str)
AddableBigInteger fromInt (int nbr)
AddableBigInteger getMinInfinity ()
AddableBigInteger getPlusInfinity ()
AddableBigInteger getZero ()
int hashCode ()
AddableBigInteger max (AddableBigInteger o)
AddableBigInteger min (AddableBigInteger o)
int intValue ()
double doubleValue ()
boolean isPositive ()
AddableBigInteger multiply (AddableBigInteger o)
AddableBigInteger subtract (AddableBigInteger o)
Addable< AddableBigInteger >[] range (AddableBigInteger begin, AddableBigInteger end)
String toString ()
Public Member Functions inherited from frodo2.solutionSpaces.Addable< T extends Addable< T > >
add (T o)
 Adds an object to this object.
subtract (T o)
 Subtracts an object from this object.
multiply (T o)
 Multiplies an object with this object.
divide (T o)
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.

Private Member Functions

boolean warnTruncation (String str)
 Warns for truncation.

Private Attributes

BigInteger val
 the BigIntger

Static Private Attributes

static final AddableBigInteger ZERO = new AddableBigInteger(BigInteger.ZERO)
 ZERO.

Detailed Description

An Addable number based on a BigInteger.

Author
Thomas Leaute, Eric Zbinden

Constructor & Destructor Documentation

◆ AddableBigInteger() [1/5]

◆ AddableBigInteger() [2/5]

frodo2.solutionSpaces.crypto.AddableBigInteger.AddableBigInteger ( String val)

Constructor from a String.

Parameters
valString representation of an AddableBigInteger, in which "-infinity" and "infinity" are allowed

References val.

◆ AddableBigInteger() [3/5]

frodo2.solutionSpaces.crypto.AddableBigInteger.AddableBigInteger ( int numBits,
Random rnd )

Random constructor.

Parameters
numBitsnumber of bits of this AddableBigInteger
rndrandom number generator

References val.

◆ AddableBigInteger() [4/5]

frodo2.solutionSpaces.crypto.AddableBigInteger.AddableBigInteger ( BigInteger val)

Constructor.

Parameters
valThe value in a BigInteger form

References val.

◆ AddableBigInteger() [5/5]

frodo2.solutionSpaces.crypto.AddableBigInteger.AddableBigInteger ( int val)

Constructor.

Parameters
valThe value

References val.

Member Function Documentation

◆ abs()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.abs ( )

◆ add()

◆ addDelayed()

◆ compareTo()

int frodo2.solutionSpaces.crypto.AddableBigInteger.compareTo ( AddableBigInteger o)

◆ divide()

◆ doubleValue()

double frodo2.solutionSpaces.crypto.AddableBigInteger.doubleValue ( )

◆ equals()

◆ externalize()

final boolean frodo2.solutionSpaces.crypto.AddableBigInteger.externalize ( )

◆ flipSign()

◆ fromInt()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.fromInt ( int nbr)
See also
Addable.fromInt(int)

Implements frodo2.solutionSpaces.Addable< T extends Addable< T > >.

References AddableBigInteger().

Here is the call graph for this function:

◆ fromString()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.fromString ( String str)

◆ getMinInfinity()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.getMinInfinity ( )

◆ getPlusInfinity()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.getPlusInfinity ( )

◆ getZero()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.getZero ( )
See also
Addable.getZero()

Implements frodo2.solutionSpaces.Addable< T extends Addable< T > >.

References AddableBigInteger(), and ZERO.

Here is the call graph for this function:

◆ hashCode()

int frodo2.solutionSpaces.crypto.AddableBigInteger.hashCode ( )

◆ intValue()

◆ isPositive()

boolean frodo2.solutionSpaces.crypto.AddableBigInteger.isPositive ( )
Returns
true if this AddableBigInteger is strictly greater than zero

References compareTo().

Referenced by multiply(), and frodo2.solutionSpaces.crypto.AddableBigInteger.AddableBigIntegerDelayed.multiplyDelayed().

Here is the call graph for this function:

◆ max()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.max ( AddableBigInteger o)
See also
Addable#max(AddableLimited)

References AddableBigInteger(), and compareTo().

Here is the call graph for this function:

◆ min()

AddableBigInteger frodo2.solutionSpaces.crypto.AddableBigInteger.min ( AddableBigInteger o)
See also
AddableLimited#min(AddableLimited)

References AddableBigInteger(), and compareTo().

Here is the call graph for this function:

◆ multiply()

◆ range()

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

References AddableBigInteger().

Here is the call graph for this function:

◆ readExternal()

void frodo2.solutionSpaces.crypto.AddableBigInteger.readExternal ( ObjectInput in) throws IOException, ClassNotFoundException
See also
java.io.Externalizable#readExternal(java.io.ObjectInput)

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

◆ readResolve()

Object frodo2.solutionSpaces.crypto.AddableBigInteger.readResolve ( )

◆ subtract()

◆ toString()

String frodo2.solutionSpaces.crypto.AddableBigInteger.toString ( )

◆ warnTruncation()

boolean frodo2.solutionSpaces.crypto.AddableBigInteger.warnTruncation ( String str)
private

Warns for truncation.

Parameters
strthe string
Returns
true

Referenced by fromString().

◆ writeExternal()

void frodo2.solutionSpaces.crypto.AddableBigInteger.writeExternal ( ObjectOutput out) throws IOException
See also
java.io.Externalizable#writeExternal(java.io.ObjectOutput)

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

Member Data Documentation

◆ val

◆ ZERO


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