org.javanetworkanalyzer.model
Class StrahlerTree<E>

java.lang.Object
  extended by org.jgrapht.graph.AbstractGraph<V,E>
      extended by org.jgrapht.graph.AbstractBaseGraph<V,E>
          extended by org.jgrapht.graph.SimpleGraph<VStrahler,E>
              extended by org.javanetworkanalyzer.model.StrahlerTree<E>
Type Parameters:
E - Edge class.
All Implemented Interfaces:
Serializable, Cloneable, org.jgrapht.Graph<VStrahler,E>, org.jgrapht.UndirectedGraph<VStrahler,E>

public class StrahlerTree<E>
extends org.jgrapht.graph.SimpleGraph<VStrahler,E>

A tree for use in the Strahler algorithm.

Author:
Adam Gouge
See Also:
Serialized Form

Constructor Summary
StrahlerTree(Class<? extends E> edgeClass)
           
StrahlerTree(org.jgrapht.EdgeFactory<VStrahler,E> ef)
           
 
Method Summary
 E addEdge(int source, int target)
          Add an edge from the vertex with id source to the vertex with id target.
 VStrahler getRootVertex()
          Return the root vertex.
 VStrahler getVertex(int id)
          Get the vertex with the given id.
 void setRootVertex(int id)
          Set the root vertex as the vertex with the given id.
 
Methods inherited from class org.jgrapht.graph.AbstractBaseGraph
addEdge, addEdge, addVertex, clone, containsEdge, containsVertex, degreeOf, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, incomingEdgesOf, inDegreeOf, isAllowingLoops, isAllowingMultipleEdges, outDegreeOf, outgoingEdgesOf, removeEdge, removeEdge, removeVertex, setEdgeSetFactory, setEdgeWeight, vertexSet
 
Methods inherited from class org.jgrapht.graph.AbstractGraph
assertVertexExist, containsEdge, equals, hashCode, removeAllEdges, removeAllEdges, removeAllEdges, removeAllVertices, toString, toStringFromSets
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jgrapht.UndirectedGraph
degreeOf
 
Methods inherited from interface org.jgrapht.Graph
addEdge, addEdge, addVertex, containsEdge, containsEdge, containsVertex, edgeSet, edgesOf, getAllEdges, getEdge, getEdgeFactory, getEdgeSource, getEdgeTarget, getEdgeWeight, removeAllEdges, removeAllEdges, removeAllVertices, removeEdge, removeEdge, removeVertex, vertexSet
 

Constructor Detail

StrahlerTree

public StrahlerTree(Class<? extends E> edgeClass)
See Also:
AbstractBaseGraph

StrahlerTree

public StrahlerTree(org.jgrapht.EdgeFactory<VStrahler,E> ef)
See Also:
AbstractBaseGraph
Method Detail

getVertex

public VStrahler getVertex(int id)
Get the vertex with the given id.

Parameters:
id - Id.
Returns:
The vertex with the given id.

setRootVertex

public void setRootVertex(int id)
Set the root vertex as the vertex with the given id.

Parameters:
id - Id.

getRootVertex

public VStrahler getRootVertex()
Return the root vertex.

Returns:
The root vertex.

addEdge

public E addEdge(int source,
                 int target)
Add an edge from the vertex with id source to the vertex with id target.

Parameters:
source - Source id.
target - Target Id.
Returns:
The newly added edge, or null if it was not added.


Copyright © 2014. All Rights Reserved.