uka.graph.dlf
Class DLFProposalMessage

java.lang.Object
  extended byuka.graph.Message
      extended byuka.graph.dlf.DLFProposalMessage
All Implemented Interfaces:
Anonymous, java.lang.Comparable, Immutable, Printable, java.io.Serializable

public class DLFProposalMessage
extends uka.graph.Message
implements java.lang.Comparable

In the DLF-algorithm each nodes makes some proposals about its futur color. This proposal it transmitted as a DLFProposalMessage.

Author:
Björn-Oliver Hartmann
See Also:
Serialized Form

Field Summary
protected  int degree
          The degree of the source node.
protected  int proposedColor
          The color, which the source node proposes for itself.
protected  int randomNumber
          A random number chosen by the source node.
 
Fields inherited from class uka.graph.Message
fromRank
 
Constructor Summary
DLFProposalMessage(int fromRank, int proposedColor, int degree, int randomNumber)
           
 
Method Summary
 void appendTo(ToString s)
          This method should append the contents of each instance variable of the current object to the given ToString object.
 int compareTo(java.lang.Object other)
          Compare messages according to their priority.
 int getDegree()
          Returns the source-nodes degree.
 int getProposedColor()
           
 int getRandomNumber()
          Returns the source-nodes random-number.
 
Methods inherited from class uka.graph.Message
getFromRank
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

proposedColor

protected final int proposedColor
The color, which the source node proposes for itself.


degree

protected final int degree
The degree of the source node.


randomNumber

protected final int randomNumber
A random number chosen by the source node.

Constructor Detail

DLFProposalMessage

public DLFProposalMessage(int fromRank,
                          int proposedColor,
                          int degree,
                          int randomNumber)
Method Detail

getProposedColor

public int getProposedColor()
Returns:
the color, which the source node proposes for itself.

getDegree

public int getDegree()
Returns the source-nodes degree.

Returns:
The source-nodes degree.

getRandomNumber

public int getRandomNumber()
Returns the source-nodes random-number.

Returns:
The source-nodes random-number.

compareTo

public int compareTo(java.lang.Object other)
Compare messages according to their priority.

Specified by:
compareTo in interface java.lang.Comparable

appendTo

public void appendTo(ToString s)
Description copied from interface: Printable
This method should append the contents of each instance variable of the current object to the given ToString object. The appended data should be labeled with the name of the corresponding instance variable.

Specified by:
appendTo in interface Printable
See Also:
Object.toString()