de.cesr.more.rs.edge
Class MRepastEdge<AgentT>

java.lang.Object
  extended by repast.simphony.space.graph.RepastEdge<AgentT>
      extended by de.cesr.more.rs.edge.MRepastEdge<AgentT>
All Implemented Interfaces:
MoreEdge<AgentT>, MoreFadingWeightEdge, MoreTraceableEdge<AgentT>, MoreGeoEdge<AgentT>

public class MRepastEdge<AgentT>
extends repast.simphony.space.graph.RepastEdge<AgentT>
implements MoreGeoEdge<AgentT>, MoreTraceableEdge<AgentT>, MoreFadingWeightEdge

MORe

Date:
Jan 3, 2011

Field Summary
protected  boolean active
           
protected  double fadeAmount
           
protected  double length
           
 
Fields inherited from class repast.simphony.space.graph.RepastEdge
directed, source, target
 
Constructor Summary
MRepastEdge(AgentT source, AgentT target, boolean directed)
           
MRepastEdge(AgentT source, AgentT target, boolean directed, double weight)
           
 
Method Summary
 void activate()
          Mark the edge active for the current tick.
 void fadeWeight()
          Fades the edge weight by MNetManipulatePa.DYN_FADE_OUT_AMOUNT.
 AgentT getEnd()
          For undirected edges, it returns the node that was given as second node parameter.
 double getLength()
           
 AgentT getStart()
          For undirected edges, it returns the node that was given as first node parameter.
 int hashCode()
           
 boolean isActive()
          True if the edge was/is active during the current tick.
 void setLength(double length)
           
 String toString()
           
 
Methods inherited from class repast.simphony.space.graph.RepastEdge
getSource, getTarget, getWeight, isDirected, setDirected, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.cesr.more.basic.edge.MoreEdge
getWeight, isDirected, setWeight
 

Field Detail

length

protected double length

fadeAmount

protected double fadeAmount

active

protected boolean active
Constructor Detail

MRepastEdge

public MRepastEdge(AgentT source,
                   AgentT target,
                   boolean directed)
Parameters:
source -
target -
directed -
Throws:
MIdentifyCallerException

MRepastEdge

public MRepastEdge(AgentT source,
                   AgentT target,
                   boolean directed,
                   double weight)
Method Detail

getEnd

public AgentT getEnd()
Description copied from interface: MoreEdge
For undirected edges, it returns the node that was given as second node parameter.

Specified by:
getEnd in interface MoreEdge<AgentT>
Returns:
the edge's target node
See Also:
MoreEdge.getEnd()

getStart

public AgentT getStart()
Description copied from interface: MoreEdge
For undirected edges, it returns the node that was given as first node parameter.

Specified by:
getStart in interface MoreEdge<AgentT>
Returns:
the edge's start node
See Also:
MoreEdge.getStart()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

setLength

public void setLength(double length)
Specified by:
setLength in interface MoreGeoEdge<AgentT>
Parameters:
length - this node's geographical length
See Also:
MoreGeoEdge.setLength(double)

getLength

public double getLength()
Specified by:
getLength in interface MoreGeoEdge<AgentT>
Returns:
this node's geographical length
See Also:
MoreGeoEdge.getLength()

activate

public void activate()
Description copied from interface: MoreTraceableEdge
Mark the edge active for the current tick.

Specified by:
activate in interface MoreTraceableEdge<AgentT>
See Also:
MoreTraceableEdge.activate()

isActive

public boolean isActive()
Description copied from interface: MoreTraceableEdge
True if the edge was/is active during the current tick.

Specified by:
isActive in interface MoreTraceableEdge<AgentT>
Returns:
See Also:
MoreTraceableEdge.isActive()

fadeWeight

public void fadeWeight()
Description copied from interface: MoreFadingWeightEdge
Fades the edge weight by MNetManipulatePa.DYN_FADE_OUT_AMOUNT.

Specified by:
fadeWeight in interface MoreFadingWeightEdge
See Also:
MoreFadingWeightEdge.fadeWeight()