|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.uu.cs.treewidth.graph.NeighborHashSetGraph<Data>
Data
-
@Deprecated public class NeighborHashSetGraph<Data>
Standard datastructure for representing graphs. Its main use is as
a standardized way to communicate graphs throughout the framework.
(For example, a GraphInput
returns a Graph and an
Algorithm
gets its input as a Graph.)
TODO More explanation of how the datastructure works.
Example usage: Read a graph from a file in DGF format.
GraphInput input = new DgfReader( "myGraph.dgf" ); Graph g = new Graph(); try { g = input.get(); } catch (InputException e) { ... }
Example usage: Manually create C3
Graph g = new Graph(); Vertex v1 = new Vertex(); g.addVertex( v1 ); Vertex v2 = new Vertex(); g.addVertex( v2 ); Vertex v3 = new Vertex(); g.addVertex( v3 ); g.addEdge( v1, v2 ); g.addEdge( v2, v3 ); g.addEdge( v3, v1 );
Nested Class Summary | |
---|---|
static interface |
NeighborHashSetGraph.Convertor<OldData,NewData>
Deprecated. |
static class |
NeighborHashSetGraph.Copier<CopiedData>
Deprecated. Does NOT make a deep copy of the vertices' data. |
Field Summary | |
---|---|
Graph<Data> |
original
Deprecated. |
java.util.ArrayList<NeighborHashSetVertex<Data>> |
vertices
Deprecated. List of the vertices of the graph. |
Constructor Summary | |
---|---|
NeighborHashSetGraph()
Deprecated. Creates an empty graph with no comments. |
|
NeighborHashSetGraph(Graph<? extends OldData> g,
Graph.Convertor<OldData,Data> dataConvertor)
Deprecated. |
|
NeighborHashSetGraph(Graph<Data> g)
Deprecated. |
Method Summary | ||
---|---|---|
void |
addComment(java.lang.String c)
Deprecated. Adds a new line of comments to the graph. |
|
void |
addEdge(NeighborHashSetVertex<Data> a,
NeighborHashSetVertex<Data> b)
Deprecated. Adds an edge between a and b in the graph. |
|
void |
addVertex(NeighborHashSetVertex<Data> v)
Deprecated. Adds a vertex to the graph. |
|
void |
clearEdgeCache()
Deprecated. Makes sure the cached edgelist is no longer used. |
|
void |
contractEdge(NeighborHashSetVertex<Data> vertex1,
NeighborHashSetVertex<Data> vertex2)
Deprecated. |
|
static
|
copy(NeighborHashSetGraph<OldData> oldG,
NeighborHashSetGraph.Convertor<OldData,NewData> dataConvertor)
Deprecated. |
|
void |
deEliminateVertex(NeighborHashSetVertex<Data> v,
java.util.ArrayList<NeighborHashSetEdge<Data>> addedEdges)
Deprecated. |
|
|
eliminateVertex(NeighborHashSetVertex<T> v)
Deprecated. Eliminates a vertex from the copy of the graph by marrying the neighbors and removing the vertex. |
|
|
eliminateVertex2(NeighborHashSetVertex<T> v)
Deprecated. Warning - Testingfunction for QuickBB3 : Work in progress |
|
java.lang.String |
getComments()
Deprecated. |
|
java.util.ArrayList<NeighborHashSetEdge<Data>> |
getEdges()
Deprecated. Computes the edgelist of the graph. |
|
java.util.ArrayList<NeighborHashSetVertex<Data>> |
getSimplicialVertices()
Deprecated. |
|
void |
removeEdge(NeighborHashSetEdge<Data> e)
Deprecated. |
|
void |
removeVertex(NeighborHashSetVertex<Data> v)
Deprecated. |
|
static
|
shallowCopy(NeighborHashSetGraph<CopiedData> g)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Graph<Data> original
public java.util.ArrayList<NeighborHashSetVertex<Data>> vertices
Constructor Detail |
---|
public NeighborHashSetGraph()
public NeighborHashSetGraph(Graph<Data> g)
public NeighborHashSetGraph(Graph<? extends OldData> g, Graph.Convertor<OldData,Data> dataConvertor)
Method Detail |
---|
public void addVertex(NeighborHashSetVertex<Data> v)
v
- The vertex to add.public void addEdge(NeighborHashSetVertex<Data> a, NeighborHashSetVertex<Data> b)
a
- b
- public void addComment(java.lang.String c)
c
- The comment linepublic java.lang.String getComments()
public java.util.ArrayList<NeighborHashSetEdge<Data>> getEdges()
public static <CopiedData> NeighborHashSetGraph<CopiedData> shallowCopy(NeighborHashSetGraph<CopiedData> g)
public static <OldData,NewData> NeighborHashSetGraph<NewData> copy(NeighborHashSetGraph<OldData> oldG, NeighborHashSetGraph.Convertor<OldData,NewData> dataConvertor)
public void contractEdge(NeighborHashSetVertex<Data> vertex1, NeighborHashSetVertex<Data> vertex2)
public void removeVertex(NeighborHashSetVertex<Data> v)
public <T> void eliminateVertex(NeighborHashSetVertex<T> v)
v
- The vertex to remove from the copy of the graph.public void clearEdgeCache()
public <T> java.util.ArrayList<NeighborHashSetEdge<T>> eliminateVertex2(NeighborHashSetVertex<T> v)
public void deEliminateVertex(NeighborHashSetVertex<Data> v, java.util.ArrayList<NeighborHashSetEdge<Data>> addedEdges)
public void removeEdge(NeighborHashSetEdge<Data> e)
public java.util.ArrayList<NeighborHashSetVertex<Data>> getSimplicialVertices()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |