net.sf.myra.framework
Class Edge<V extends Info>

java.lang.Object
  extended by net.sf.myra.framework.Edge<V>
All Implemented Interfaces:
java.lang.Comparable<Edge<V>>, Weighable

public class Edge<V extends Info>
extends java.lang.Object
implements java.lang.Comparable<Edge<V>>, Weighable

This class represents an edge (connection) of the problem construction graph.

Version:
$Revision$ $Date: 2008-04-22 10:15:14#$
Author:
Fernando Esteban Barril Otero

Method Summary
 int compareTo(Edge<V> other)
           
 boolean equals(Edge<V> edge)
           
 boolean equals(java.lang.Object o)
           
 Vertex<V> getFrom()
          Returns the edge's start node.
 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.
 Vertex<V> getTo()
          Returns the edge's end node.
 int hashCode()
           
 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
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getFrom

public Vertex<V> getFrom()
Returns the edge's start node.

Returns:
the edge's start node.

getTo

public Vertex<V> getTo()
Returns the edge's end node.

Returns:
the edge's end node.

compareTo

public int compareTo(Edge<V> other)
Specified by:
compareTo in interface java.lang.Comparable<Edge<V extends Info>>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

equals

public boolean equals(Edge<V> edge)

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.

toString

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


Copyright © 2013. All Rights Reserved.