net.sf.myra.framework
Class Graph.Element

java.lang.Object
  extended by net.sf.myra.framework.Graph.Element
All Implemented Interfaces:
java.lang.Cloneable, Weighable
Direct Known Subclasses:
Vertex
Enclosing class:
Graph<V extends Info>

public static class Graph.Element
extends java.lang.Object
implements java.lang.Cloneable, Weighable

This class represents an element of the graph.


Method Summary
protected  java.lang.Object clone()
          Creates and returns a copy of this weighted component instance.
 HeuristicValue getHeuristicValue()
          Returns the heuristic value associated with this component.
 HeuristicValue getHeuristicValue(int level)
          Returns the heuristic value associated with this component.
 Pheromone getPheromone()
          Returns the pheromone value associated with this component.
 Pheromone getPheromone(int level)
          Returns the pheromone value associated with this component at the specified level.
 int levels()
          Returns the number of pheromone levels of this element.
 void setHeuristicValue(HeuristicValue heuristicValue)
          Sets the heuristic value associated with this component.
 void setHeuristicValue(HeuristicValue heuristicValue, int level)
          Sets the heuristic value associated with this component.
 void setPheromone(Pheromone pheromone)
          Sets the pheromone value associated with this component.
 void setPheromone(Pheromone pheromone, int level)
          Sets the pheromone value associated with this component at the specified level.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getHeuristicValue

public HeuristicValue getHeuristicValue()
Description copied from interface: Weighable
Returns the heuristic value associated with this component.

Specified by:
getHeuristicValue in interface Weighable
Returns:
the heuristic value associated with this component.
See Also:
Weighable.getHeuristicValue(int)

getHeuristicValue

public HeuristicValue getHeuristicValue(int level)
Description copied from interface: Weighable
Returns the heuristic value associated with this component.

Specified by:
getHeuristicValue in interface Weighable
Parameters:
level - the level of the heuristic value.
Returns:
the heuristic value associated with this component.

setHeuristicValue

public void setHeuristicValue(HeuristicValue heuristicValue)
Description copied from interface: Weighable
Sets the heuristic value associated with this component.

Specified by:
setHeuristicValue in interface Weighable
Parameters:
heuristicValue - the value to be set.
See Also:
Weighable.setHeuristicValue(HeuristicValue, int)

setHeuristicValue

public void setHeuristicValue(HeuristicValue heuristicValue,
                              int level)
Description copied from interface: Weighable
Sets the heuristic value associated with this component.

Specified by:
setHeuristicValue in interface Weighable
Parameters:
heuristicValue - the value to be set.
level - the level of the heuristic value.

getPheromone

public Pheromone getPheromone()
Description copied from interface: Weighable
Returns the pheromone value associated with this component. This is equivalent of setting the pheromone at level 0.

Specified by:
getPheromone in interface Weighable
Returns:
the pheromone value associated with this component.
See Also:
Weighable.getPheromone(int)

getPheromone

public Pheromone getPheromone(int level)
Description copied from interface: Weighable
Returns the pheromone value associated with this component at the specified level.

Specified by:
getPheromone in interface Weighable
Parameters:
level - the level of the pheromone.
Returns:
the pheromone value associated with this component.

setPheromone

public void setPheromone(Pheromone pheromone)
Description copied from interface: Weighable
Sets the pheromone value associated with this component. This is equivalent of setting the pheromone at level 0.

Specified by:
setPheromone in interface Weighable
Parameters:
pheromone - the value to be set.
See Also:
Weighable.setPheromone(Pheromone, int)

setPheromone

public void setPheromone(Pheromone pheromone,
                         int level)
Description copied from interface: Weighable
Sets the pheromone value associated with this component at the specified level.

Specified by:
setPheromone in interface Weighable
Parameters:
pheromone - the value to be set.
level - the level of the pheromone.

levels

public int levels()
Returns the number of pheromone levels of this element.

Returns:
the number of pheromone levels of this element.

clone

protected java.lang.Object clone()
Creates and returns a copy of this weighted component instance.

Overrides:
clone in class java.lang.Object
Returns:
a copy of this weighted component instance.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2013. All Rights Reserved.