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

Timestamp mechanism for AFB. More...

Inheritance diagram for frodo2.algorithms.afb.Timestamp:

Public Member Functions

 Timestamp (int n)
 Constructor.
 Timestamp ()
 Default constructor used for externalization.
Timestamp clone ()
 Timestamp (int[] counters)
 Constructor.
String toString ()
void setCounter (int pos, int counterValue)
 Method to assign a value to a given counter.
void readExternal (ObjectInput in) throws IOException, ClassNotFoundException
void writeExternal (ObjectOutput out) throws IOException

Package Functions

int compare (Timestamp timestampToCompare, final int pos)
 Method to lexicographically compare the current timestamp with another, up to but excluding a given position.

Package Attributes

int[] counters
 The assignment counter for each variable.

Detailed Description

Timestamp mechanism for AFB.

Author
Alexandra Olteanu, Thomas Leaute

Constructor & Destructor Documentation

◆ Timestamp() [1/3]

frodo2.algorithms.afb.Timestamp.Timestamp ( int n)

Constructor.

Parameters
nthe number of assignment counters

Referenced by clone(), and compare().

◆ Timestamp() [2/3]

frodo2.algorithms.afb.Timestamp.Timestamp ( )

Default constructor used for externalization.

Referenced by clone().

◆ Timestamp() [3/3]

frodo2.algorithms.afb.Timestamp.Timestamp ( int[] counters)

Constructor.

Parameters
countersthe assignment counters

References counters.

Member Function Documentation

◆ clone()

◆ compare()

int frodo2.algorithms.afb.Timestamp.compare ( Timestamp timestampToCompare,
final int pos )
package

Method to lexicographically compare the current timestamp with another, up to but excluding a given position.

Parameters
timestampToComparethe timestamp to compare to
posthe index position. Comparison would be done up to position pos-1
Returns
-1 if the current timestamp is less than the timestamp to compare to 0 if the current timestamp is equal to the timestamp to compare to +1 if the current timestamp is greater than the timestamp to compare to

References counters, and Timestamp().

Here is the call graph for this function:

◆ readExternal()

void frodo2.algorithms.afb.Timestamp.readExternal ( ObjectInput in) throws IOException, ClassNotFoundException
See also
Externalizable#readExternal(java.io.ObjectInput)

References counters.

Referenced by frodo2.algorithms.afb.AFBBaseMsg< V extends Addable< V >, U extends Addable< U > >.readExternal().

◆ setCounter()

void frodo2.algorithms.afb.Timestamp.setCounter ( int pos,
int counterValue )

Method to assign a value to a given counter.

Parameters
posthe index position of the counter
counterValuethe value to assign to counter at position pos

Referenced by frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.assign_CPA(), and frodo2.algorithms.afb.AFB< V extends Addable< V >, U extends Addable< U > >.backtrack().

◆ toString()

String frodo2.algorithms.afb.Timestamp.toString ( )
See also
java.lang.Object#toString()

◆ writeExternal()

void frodo2.algorithms.afb.Timestamp.writeExternal ( ObjectOutput out) throws IOException
See also
Externalizable#writeExternal(java.io.ObjectOutput)

Referenced by frodo2.algorithms.afb.AFBBaseMsg< V extends Addable< V >, U extends Addable< U > >.writeExternal().

Member Data Documentation

◆ counters

int [] frodo2.algorithms.afb.Timestamp.counters
package

The assignment counter for each variable.

Referenced by compare(), readExternal(), and Timestamp().


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