|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.joensuu.cs.tra.AbstractGraph
public abstract class AbstractGraph
Nested Class Summary | |
---|---|
class |
AbstractGraph.EdgeIteratorWrapper
|
class |
AbstractGraph.VertexIteratorWrapper
|
Field Summary | |
---|---|
static int |
BLACK
Named constant (0) |
static int |
BLUE
Named constant (5) |
static int |
GRAY
Named constant (2) |
static int |
GREEN
Named constant (4) |
static int |
GREY
Named constant (2) |
static int |
NaN
NaN is used to represent a missing color or weight. |
static int |
RED
Named constant (3) |
static int |
WHITE
Named constant (1) |
Method Summary | |
---|---|
Vertex |
addVertex()
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(float weight)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(float weight,
int index)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(int index)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(int color,
float weight)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(int color,
float weight,
int index)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(int color,
int index)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(String label)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(String label,
int index)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(String label,
int color,
float weight)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(String label,
int color,
float weight,
int index)
Adds a Vertex to this graph with the specified attributes. |
Vertex |
addVertex(String label,
int color,
int index)
Adds a Vertex to this graph with the specified attributes. |
Iterator<Edge> |
edgeIterator()
Returns an Iterator over the edges of this graph. |
Iterable<Edge> |
edges()
Returns an Iterable over this graph's edges. |
Vertex |
firstVertex()
Returns the first Vertex in this graph. |
boolean |
isDiGraph()
Returns whether this is a directed graph |
Iterator<Vertex> |
iterator()
Returns an Iterator over the vertices of this graph. |
void |
removeVertex(Vertex vertex)
Removes the specified Vertex and all attached Edges from this graph. |
int |
size()
Returns the number of vertices in this graph. |
String |
toString()
Returns the string representation of this graph. |
int |
vertexCount()
Returns the number of vertices in this graph. |
Iterator<Vertex> |
vertexIterator()
Returns an Iterator over the vertices of this graph. |
Iterable<Vertex> |
vertices()
Returns an Iterable over this graph's vertices. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int BLACK
public static final int WHITE
public static final int GRAY
public static final int GREY
public static final int RED
public static final int GREEN
public static final int BLUE
public static final int NaN
Method Detail |
---|
public int size()
public boolean isDiGraph()
public int vertexCount()
public Vertex addVertex(String label, int color, float weight, int index)
label
- the label for the new Vertexcolor
- the color for the new Vertexweight
- the weight for the new Vertexindex
- the index for the new Vertex
public Vertex addVertex(String label, int color, int index)
label
- the label for the new Vertexcolor
- the color for the new Vertexindex
- the index for the new Vertex
public Vertex addVertex(String label, int index)
label
- the label for the new Vertexindex
- the index for the new Vertex
public Vertex addVertex(int index)
index
- the index for the new Vertex
public Vertex addVertex(int color, float weight, int index)
color
- the color for the new Vertexweight
- the weight for the new Vertexindex
- the index for the new Vertex
public Vertex addVertex(int color, int index)
color
- the color for the new Vertexindex
- the index for the new Vertex
public Vertex addVertex(float weight, int index)
weight
- the weight for the new Vertexindex
- the index for the new Vertex
public Vertex addVertex(String label, int color, float weight)
label
- the label for the new Vertexcolor
- the color for the new Vertexweight
- the weight for the new Vertex
public Vertex addVertex(String label)
label
- the label for the new Vertex
public Vertex addVertex()
public Vertex addVertex(int color, float weight)
color
- the color for the new Vertexweight
- the weight for the new Vertex
public Vertex addVertex(float weight)
weight
- the weight for the new Vertex
public void removeVertex(Vertex vertex)
vertex
- the Vertex to removepublic Iterator<Vertex> iterator()
iterator
in interface Iterable
public Iterator<Vertex> vertexIterator()
public Iterator<Edge> edgeIterator()
public Vertex firstVertex()
public Iterable<Vertex> vertices()
public Iterable<Edge> edges()
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |