uk.ed.inf.graph.state
Class GeneralGraphState<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
java.lang.Object
uk.ed.inf.graph.state.GeneralGraphState<N,E>
- All Implemented Interfaces:
- IGraphState<N,E>
public class GeneralGraphState<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
- extends java.lang.Object
- implements IGraphState<N,E>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GeneralGraphState
public GeneralGraphState(IBasicGraph<N,E> graphToSave,
IBitString nodeStates,
IBitString edgeStates)
getGraph
public IBasicGraph<N,E> getGraph()
- Description copied from interface:
IGraphState
- Get the graph that this momento belong to.
- Specified by:
getGraph
in interface IGraphState<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
- Returns:
- The graph, cannot be null.
getNodeStates
public IBitString getNodeStates()
- Description copied from interface:
IGraphState
- Get the states of the nodes as a bit string: [true => exists, false => removed]. Not that the
bit string may be shorter than the number of nodes in the graph as the graph may have expanded
since it was created.
- Specified by:
getNodeStates
in interface IGraphState<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
- Returns:
- The bit string representing the state of the nodes in graph.
getEdgeStates
public IBitString getEdgeStates()
- Description copied from interface:
IGraphState
- Get the states of the edges as a bit string: [true => exists, false => removed]. Not that the
bit string may be shorter than the number of edges in the graph as the graph may have expanded
since it was created.
- Specified by:
getEdgeStates
in interface IGraphState<N extends IBasicNode<N,? extends IBasicEdge<N,?>>,E extends IBasicEdge<N,E>>
- Returns:
- The bit string representing the state of the edges in the graph.