|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.uconn.mcb.lineageevolver.graph.EdgeListGraph edu.uconn.mcb.lineageevolver.graph.EdgeListGraphTopology
Implementation of a GraphTopology using an EdgeListGraph
Nested Class Summary | |
protected class |
EdgeListGraphTopology.EdgeData
Encapsulation class used for storing multiple items inside an edge for EdgeListGraphTopology objects. |
protected class |
EdgeListGraphTopology.NodeData
Encapuslation class used for storing multiple items inside a node for EdgeListGraphTopology objects. |
Field Summary |
Fields inherited from class edu.uconn.mcb.lineageevolver.graph.EdgeListGraph |
|
Constructor Summary | |
EdgeListGraphTopology()
|
Method Summary | |
GraphEdge |
addEdge(java.lang.Object data,
GraphNode origin,
GraphNode destination)
Adds an edge to this graph. |
void |
addEvent(GenomeVisitor v,
GraphEdge edge,
int time)
Adds an event to a given edge, provided a time interval and a GenomeVisitor. |
GraphNode |
addNode(java.lang.Object data)
Adds a node to this graph. |
void |
applyEvent(GraphTopologyEvent event,
Lineage l)
Applies an event to a Lineage. |
java.lang.Object |
getData(GraphEdge e)
Returns the data stored inside a given edge. |
java.lang.Object |
getData(GraphNode v)
Returns the data stored inside a given node. |
GraphEdge |
getEdge(GraphTopologyEvent event)
Returns the edge associated to a given event. |
GraphTopologyEvent |
getEvent(GraphEdge e)
Returns the next event on the given edge corresponding to the current position on that edge. |
Genome |
getGenome(GraphNode v)
Returns genome stored in the given node. |
java.lang.String |
getName(GraphNode v)
Returns the name of the given node. |
int |
nextEventTime(GraphEdge e)
Gets the evolutionary distance between the current position and the next event on the given edge, in time intervals. |
void |
setData(GraphEdge e,
java.lang.Object data)
Sets the data for a given edge. |
void |
setData(GraphNode v,
java.lang.Object data)
Sets the data for a given node. |
void |
setGenome(GraphNode v,
Genome g)
Sets the genome for a given node. |
void |
setName(GraphNode v,
java.lang.String name)
Sets the name for a given node. |
void |
setSubstitutions(GraphEdge e,
int substitutions)
Sets the branch length for the given edge. |
void |
setTime(GraphEdge e,
int time)
Sets the time associated to the given edge. |
void |
substitute(GraphEdge e,
int time)
Processes substitution on a given edge for a given amount of time. |
float |
substitutionsPerTime(GraphEdge e)
Returns the number of substitutions per time interval for the given edge. |
Methods inherited from class edu.uconn.mcb.lineageevolver.graph.EdgeListGraph |
getAdjacentNodes, getEdges, getNodes, getNodes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.uconn.mcb.lineageevolver.graph.DirectedGraph |
getAdjacentNodes, getEdges, getNodes, getNodes |
Constructor Detail |
public EdgeListGraphTopology()
Method Detail |
public int nextEventTime(GraphEdge e)
GraphTopology
nextEventTime
in interface GraphTopology
e
- the edge on which to operate.
GraphTopology.nextEventTime(GraphEdge)
public float substitutionsPerTime(GraphEdge e)
GraphTopology
substitutionsPerTime
in interface GraphTopology
e
- the edge on which to operate.
GraphTopology.substitutionsPerTime(edu.uconn.mcb.lineageevolver.graph.GraphEdge)
public GraphTopologyEvent getEvent(GraphEdge e)
GraphTopology
getEvent
in interface GraphTopology
e
- the edge on which to operate.
GraphTopology.getEvent(edu.uconn.mcb.lineageevolver.graph.GraphEdge)
public void addEvent(GenomeVisitor v, GraphEdge edge, int time)
GraphTopology
addEvent
in interface GraphTopology
v
- the GenomeVisitor encapsulating the functionality for the newly generated event.edge
- the edge to which the event should be added.time
- the number of time intervals along the given edge that should be processed before the newly generated event is processed.GraphTopology.addEvent(edu.uconn.mcb.lineageevolver.GenomeVisitor, edu.uconn.mcb.lineageevolver.graph.GraphEdge, int)
public GraphEdge getEdge(GraphTopologyEvent event)
GraphTopology
getEdge
in interface GraphTopology
event
- the event whose edge should be returned.
GraphTopology.getEdge(edu.uconn.mcb.lineageevolver.graph.GraphTopologyEvent)
public void applyEvent(GraphTopologyEvent event, Lineage l)
GraphTopology
applyEvent
in interface GraphTopology
event
- the event to apply.l
- the Lineage to which the event is applied.GraphTopology.applyEvent(edu.uconn.mcb.lineageevolver.graph.GraphTopologyEvent, edu.uconn.mcb.lineageevolver.Lineage)
public java.lang.Object getData(GraphEdge e)
DirectedGraph
getData
in interface DirectedGraph
getData
in class EdgeListGraph
DirectedGraph.getData(edu.uconn.mcb.lineageevolver.graph.GraphEdge)
public void setData(GraphEdge e, java.lang.Object data)
DirectedGraph
setData
in interface DirectedGraph
setData
in class EdgeListGraph
DirectedGraph.setData(edu.uconn.mcb.lineageevolver.graph.GraphEdge, java.lang.Object)
public Genome getGenome(GraphNode v)
GraphTopology
getGenome
in interface GraphTopology
v
- the node for which to retrieve the genome.
GraphTopology.getGenome(edu.uconn.mcb.lineageevolver.graph.GraphNode)
public java.lang.String getName(GraphNode v)
GraphTopology
getName
in interface GraphTopology
v
- the node for which to return the name.
GraphTopology.getName(edu.uconn.mcb.lineageevolver.graph.GraphNode)
public void setGenome(GraphNode v, Genome g)
GraphTopology
setGenome
in interface GraphTopology
v
- the node in which to store the provided genome.g
- the genome to store in this node.GraphTopology.setGenome(GraphNode, Genome)
public void setName(GraphNode v, java.lang.String name)
GraphTopology
setName
in interface GraphTopology
v
- the node for which to set the name.name
- the new name for the provided node.GraphTopology.setName(edu.uconn.mcb.lineageevolver.graph.GraphNode, java.lang.String)
public GraphEdge addEdge(java.lang.Object data, GraphNode origin, GraphNode destination)
DirectedGraph
addEdge
in interface DirectedGraph
addEdge
in class EdgeListGraph
Creates an edge with 0 time, 0 substitutions, and no events.
public GraphNode addNode(java.lang.Object data)
DirectedGraph
addNode
in interface DirectedGraph
addNode
in class EdgeListGraph
Creates a node with id 0, and null name.
public java.lang.Object getData(GraphNode v)
DirectedGraph
getData
in interface DirectedGraph
getData
in class EdgeListGraph
DirectedGraph.getData(edu.uconn.mcb.lineageevolver.graph.GraphNode)
public void setData(GraphNode v, java.lang.Object data)
DirectedGraph
setData
in interface DirectedGraph
setData
in class EdgeListGraph
DirectedGraph.setData(edu.uconn.mcb.lineageevolver.graph.GraphNode, java.lang.Object)
public void substitute(GraphEdge e, int time)
GraphTopology
substitute
in interface GraphTopology
e
- the edge on which to process substitutution.time
- the amount of time to process substitution for.GraphTopology.substitute(edu.uconn.mcb.lineageevolver.graph.GraphEdge, int)
public void setSubstitutions(GraphEdge e, int substitutions)
GraphTopology
setSubstitutions
in interface GraphTopology
e
- the edge for which to set the number of substitutions.substitutions
- the number of substitutions to set for the given edge.GraphTopology.setSubstitutions(edu.uconn.mcb.lineageevolver.graph.GraphEdge, int)
public void setTime(GraphEdge e, int time)
GraphTopology
setTime
in interface GraphTopology
e
- the edge for which to set the number of time intervals.time
- the number of time intervals to set for the given edge.GraphTopology.setTime(edu.uconn.mcb.lineageevolver.graph.GraphEdge, int)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |