graphlab.dense
Class DenseGraph
java.lang.Object
graphlab.SparseGraph
graphlab.dense.DenseGraph
- All Implemented Interfaces:
- Graph
public class DenseGraph
- extends SparseGraph
Graph class that has more compact data structure. As a trade-off, it only
allows vertices of type DenseVertex.
This class is not final quality. TODO.
- Author:
- akyrola
| Methods inherited from class graphlab.SparseGraph |
addEdge, checksize, children, getEdge, getNumOfVertices, getVertex, getVertices, isColoringEnabled, parents, setVertexColor, toString, vertices |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DenseGraph
public DenseGraph(int n)
addVertex
public Vertex addVertex(Vertex vertex)
- Description copied from class:
SparseGraph
- Add a vertex to the graph.
- Specified by:
addVertex in interface Graph- Overrides:
addVertex in class SparseGraph
- Parameters:
vertex - object containing vertex data
- Returns:
- the vertex object. Now id-field is set
addVertex
public Vertex addVertex(int vertexId,
Vertex vertex)
- Overrides:
addVertex in class SparseGraph
addWeightedEdge
public void addWeightedEdge(int from,
int to,
float weight,
float initialValue)
setVertexIncomingData
public void setVertexIncomingData(int to,
int indexAtDest,
float x)
finalizeGraph
public void finalizeGraph()
- Specified by:
finalizeGraph in interface Graph- Overrides:
finalizeGraph in class SparseGraph