Package science.aist.gtf.graph.impl
Class GraphImpl<V,E>
- java.lang.Object
-
- science.aist.gtf.graph.impl.MetaTagCollectionImpl
-
- science.aist.gtf.graph.impl.GraphImpl<V,E>
-
- Type Parameters:
V- the type of the decorated vertex valueE- the type of the decorated edge value
- All Implemented Interfaces:
Iterable<Vertex<V,E>>,Graph<V,E>,MetaTagCollection
public class GraphImpl<V,E> extends MetaTagCollectionImpl implements Graph<V,E>
Implementation of a graph
- Since:
- 1.0
- Author:
- Andreas Schuler, Andreas Pointner
-
-
Constructor Summary
Constructors Constructor Description GraphImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <V,E>
Graph<V,E>create(GraphStateAccessor<V,E> graphState)Creates a new GraphCollection<Vertex<V,E>>getVertices()gets value of field verticesIterator<Vertex<V,E>>iterator()Iterates over all Vertices (depth first Search Strategy)voidtraverseEdges(VertexVisitor<V,E> visitor, EdgeVisitor<V,E> edgeVisitor)traverses through the graphvoidtraverseVertices(VertexVisitor<V,E> visitor)traverses through the graph-
Methods inherited from class science.aist.gtf.graph.impl.MetaTagCollectionImpl
addMetaTag, getMetaTags, removeMetaTag
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface science.aist.gtf.graph.Graph
getEdges, getGraphState, setVertexTraversalStrategy, stream
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface science.aist.gtf.graph.MetaTagCollection
addMetaTag, getMetaTags, getMetaTagValue, getMetaTagValue, removeMetaTag, removeMetaTag, tryGetMetaTagValue, tryGetMetaTagValue
-
-
-
-
Method Detail
-
create
public static <V,E> Graph<V,E> create(GraphStateAccessor<V,E> graphState)
Creates a new Graph- Type Parameters:
V- the type of the decorated vertex valueE- the type of the decorated edge value- Parameters:
graphState- the internal data state representation of the graph- Returns:
- a new graph
-
getVertices
public Collection<Vertex<V,E>> getVertices()
Description copied from interface:Graphgets value of field vertices- Specified by:
getVerticesin interfaceGraph<V,E>- Returns:
- value of field vertices
-
traverseVertices
public void traverseVertices(VertexVisitor<V,E> visitor)
traverses through the graph- Specified by:
traverseVerticesin interfaceGraph<V,E>- Parameters:
visitor- the visitor which is executed for every visited vertex
-
traverseEdges
public void traverseEdges(VertexVisitor<V,E> visitor, EdgeVisitor<V,E> edgeVisitor)
traverses through the graph- Specified by:
traverseEdgesin interfaceGraph<V,E>- Parameters:
visitor- the visitor which his executed for every visited vertexedgeVisitor- the visitor which is executed for every visited edge
-
-