public class AdjacListsGraph extends KahinaGraph
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> |
adjacents |
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.String>> |
edgeLabels |
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Integer>> |
edgeStatus |
protected java.util.Map<java.lang.Integer,java.lang.String> |
vertexLabels |
protected java.util.Map<java.lang.Integer,java.lang.Integer> |
vertexStatus |
needsUpdate
Constructor and Description |
---|
AdjacListsGraph() |
Modifier and Type | Method and Description |
---|---|
void |
addDirectedEdge(int v1,
int v2) |
void |
addDirectedEdge(int v1,
int v2,
int status) |
void |
addDirectedEdge(int v1,
int v2,
java.lang.String label) |
void |
addDirectedEdge(int v1,
int v2,
java.lang.String label,
int status) |
void |
addUndirectedEdge(int v1,
int v2) |
void |
addUndirectedEdge(int v1,
int v2,
int status) |
void |
addUndirectedEdge(int v1,
int v2,
java.lang.String label) |
void |
addUndirectedEdge(int v1,
int v2,
java.lang.String label,
int status) |
void |
addVertex(int v) |
void |
addVertex(int v,
int status) |
void |
addVertex(int v,
java.lang.String label) |
void |
addVertex(int v,
java.lang.String label,
int status) |
java.lang.String |
getEdgeLabel(int v1,
int v2) |
int |
getEdgeStatus(int v1,
int v2)
Returns the status ID of the edge between two nodes.
|
java.util.List<java.lang.Integer> |
getNeighbors(int v) |
protected int |
getNextFreeID() |
java.lang.String |
getVertexLabel(int v) |
int |
getVertexStatus(int v) |
java.util.Set<java.lang.Integer> |
getVertices() |
void |
setEdgeLabel(int v1,
int v2,
java.lang.String label) |
void |
setEdgeStatus(int v1,
int v2,
int status) |
void |
setVertexLabel(int v,
java.lang.String label) |
void |
setVertexStatus(int v,
int status) |
createEmptyGraph, exportTGF, importTGF
needsUpdate, requireUpdate
protected java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> adjacents
protected java.util.Map<java.lang.Integer,java.lang.String> vertexLabels
protected java.util.Map<java.lang.Integer,java.lang.Integer> vertexStatus
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.String>> edgeLabels
protected java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.lang.Integer>> edgeStatus
protected int getNextFreeID()
public java.util.Set<java.lang.Integer> getVertices()
getVertices
in class KahinaGraph
public void addVertex(int v)
addVertex
in class KahinaGraph
public void addVertex(int v, int status)
addVertex
in class KahinaGraph
public void addVertex(int v, java.lang.String label)
addVertex
in class KahinaGraph
public void addVertex(int v, java.lang.String label, int status)
addVertex
in class KahinaGraph
public java.util.List<java.lang.Integer> getNeighbors(int v)
getNeighbors
in class KahinaGraph
public void addDirectedEdge(int v1, int v2)
addDirectedEdge
in class KahinaGraph
public void addDirectedEdge(int v1, int v2, int status)
addDirectedEdge
in class KahinaGraph
public void addDirectedEdge(int v1, int v2, java.lang.String label)
addDirectedEdge
in class KahinaGraph
public void addDirectedEdge(int v1, int v2, java.lang.String label, int status)
addDirectedEdge
in class KahinaGraph
public void addUndirectedEdge(int v1, int v2)
addUndirectedEdge
in class KahinaGraph
public void addUndirectedEdge(int v1, int v2, int status)
addUndirectedEdge
in class KahinaGraph
public void addUndirectedEdge(int v1, int v2, java.lang.String label)
addUndirectedEdge
in class KahinaGraph
public void addUndirectedEdge(int v1, int v2, java.lang.String label, int status)
addUndirectedEdge
in class KahinaGraph
public void setVertexLabel(int v, java.lang.String label)
setVertexLabel
in class KahinaGraph
public java.lang.String getVertexLabel(int v)
getVertexLabel
in class KahinaGraph
public void setEdgeLabel(int v1, int v2, java.lang.String label)
setEdgeLabel
in class KahinaGraph
public java.lang.String getEdgeLabel(int v1, int v2)
getEdgeLabel
in class KahinaGraph
public void setVertexStatus(int v, int status)
setVertexStatus
in class KahinaGraph
public int getVertexStatus(int v)
getVertexStatus
in class KahinaGraph
public void setEdgeStatus(int v1, int v2, int status)
setEdgeStatus
in class KahinaGraph
public int getEdgeStatus(int v1, int v2)
getEdgeStatus
in class KahinaGraph
v1
- the ID of the edge's start nodev2
- the ID of the edge's end node