Package net.automatalib.graph.base
Class AbstractCompactGraph<E extends CompactEdge<EP>,NP,EP>
- java.lang.Object
-
- net.automatalib.graph.base.AbstractCompactGraph<E,NP,EP>
-
- All Implemented Interfaces:
Iterable<Integer>,FiniteRepresentation,NodeIDs<Integer>,Graph<Integer,E>,Graph.IntAbstraction<E>,IndefiniteGraph<Integer,E>,IndefiniteSimpleGraph<Integer>,MutableGraph<Integer,E,NP,EP>,MutableGraph.IntAbstraction<E,NP,EP>,SimpleGraph<Integer>,SimpleGraph.IntAbstraction,UniversalGraph<Integer,E,NP,EP>,UniversalGraph.IntAbstraction<E,NP,EP>,UniversalIndefiniteGraph<Integer,E,NP,EP>
- Direct Known Subclasses:
AbstractCompactBidiGraph,CompactGraph,CompactPMPG,CompactSimpleGraph
public abstract class AbstractCompactGraph<E extends CompactEdge<EP>,NP,EP> extends Object implements MutableGraph<Integer,E,NP,EP>, MutableGraph.IntAbstraction<E,NP,EP>, NodeIDs<Integer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.automatalib.graph.MutableGraph
MutableGraph.IntAbstraction<E extends Object,NP extends Object,EP extends Object>
-
-
Constructor Summary
Constructors Constructor Description AbstractCompactGraph()AbstractCompactGraph(int initialCapacity)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intaddIntNode(@Nullable NP property)IntegeraddNode(@Nullable NP property)Econnect(int source, int target, @Nullable EP property)Econnect(Integer source, Integer target, @Nullable EP property)protected abstract EcreateEdge(int source, int target, @Nullable EP property)EPgetEdgeProperty(E edge)intgetIntTarget(E edge)IntegergetNode(int id)intgetNodeId(Integer node)NPgetNodeProperty(Integer node)Collection<Integer>getNodes()Collection<E>getOutgoingEdges(int node)Collection<E>getOutgoingEdges(Integer node)IntegergetTarget(E edge)NodeIDs<Integer>nodeIDs()voidsetEdgeProperty(E edge, EP property)voidsetNodeProperty(Integer node, @Nullable NP property)intsize()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.automatalib.graph.Graph
getAdjacentNodes, getOutgoingEdgesIterator, getVisualizationHelper
-
Methods inherited from interface net.automatalib.graph.Graph.IntAbstraction
getEdgesBetween, getOutgoingEdgesIterator, isConnected
-
Methods inherited from interface net.automatalib.graph.IndefiniteGraph
getAdjacentNodesIterator, getEdgesBetween
-
Methods inherited from interface net.automatalib.graph.IndefiniteSimpleGraph
createDynamicNodeMapping, createStaticNodeMapping, isConnected
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface net.automatalib.graph.MutableGraph
addNode, connect
-
Methods inherited from interface net.automatalib.graph.MutableGraph.IntAbstraction
addIntNode, connect, setNodeProperty
-
Methods inherited from interface net.automatalib.graph.SimpleGraph
iterator
-
Methods inherited from interface net.automatalib.graph.UniversalGraph.IntAbstraction
getNodeProperty
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceFiniteRepresentation- Specified by:
sizein interfaceSimpleGraph<E extends CompactEdge<EP>>
-
getNodes
public Collection<Integer> getNodes()
- Specified by:
getNodesin interfaceSimpleGraph<E extends CompactEdge<EP>>
-
nodeIDs
public NodeIDs<Integer> nodeIDs()
- Specified by:
nodeIDsin interfaceSimpleGraph<E extends CompactEdge<EP>>
-
getOutgoingEdges
public Collection<E> getOutgoingEdges(Integer node)
- Specified by:
getOutgoingEdgesin interfaceGraph<E extends CompactEdge<EP>,NP>
-
getOutgoingEdges
public Collection<E> getOutgoingEdges(int node)
- Specified by:
getOutgoingEdgesin interfaceGraph.IntAbstraction<E extends CompactEdge<EP>>
-
getTarget
public Integer getTarget(E edge)
- Specified by:
getTargetin interfaceIndefiniteGraph<E extends CompactEdge<EP>,NP>
-
getIntTarget
public int getIntTarget(E edge)
- Specified by:
getIntTargetin interfaceGraph.IntAbstraction<E extends CompactEdge<EP>>
-
addNode
public Integer addNode(@Nullable NP property)
- Specified by:
addNodein interfaceMutableGraph<Integer,E extends CompactEdge<EP>,NP,EP>
-
addIntNode
public int addIntNode(@Nullable NP property)
- Specified by:
addIntNodein interfaceMutableGraph.IntAbstraction<E extends CompactEdge<EP>,NP,EP>
-
setNodeProperty
public void setNodeProperty(Integer node, @Nullable NP property)
- Specified by:
setNodePropertyin interfaceMutableGraph<Integer,E extends CompactEdge<EP>,NP,EP>
-
connect
public E connect(Integer source, Integer target, @Nullable EP property)
- Specified by:
connectin interfaceMutableGraph<Integer,E extends CompactEdge<EP>,NP,EP>
-
connect
public E connect(int source, int target, @Nullable EP property)
- Specified by:
connectin interfaceMutableGraph.IntAbstraction<E extends CompactEdge<EP>,NP,EP>
-
setEdgeProperty
public void setEdgeProperty(E edge, EP property)
- Specified by:
setEdgePropertyin interfaceMutableGraph<Integer,E extends CompactEdge<EP>,NP,EP>- Specified by:
setEdgePropertyin interfaceMutableGraph.IntAbstraction<E extends CompactEdge<EP>,NP,EP>
-
getNodeId
public int getNodeId(Integer node)
- Specified by:
getNodeIdin interfaceNodeIDs<E extends CompactEdge<EP>>
-
getNode
public Integer getNode(int id)
- Specified by:
getNodein interfaceNodeIDs<E extends CompactEdge<EP>>
-
getNodeProperty
public NP getNodeProperty(Integer node)
- Specified by:
getNodePropertyin interfaceUniversalIndefiniteGraph<Integer,E extends CompactEdge<EP>,NP,EP>
-
getEdgeProperty
public EP getEdgeProperty(E edge)
- Specified by:
getEdgePropertyin interfaceUniversalGraph.IntAbstraction<E extends CompactEdge<EP>,NP,EP>- Specified by:
getEdgePropertyin interfaceUniversalIndefiniteGraph<Integer,E extends CompactEdge<EP>,NP,EP>
-
-