Package | Description |
---|---|
lib.easyjava.graph | |
lib.easyjava.graph.directed | |
lib.easyjava.graph.undirected |
Modifier and Type | Method and Description |
---|---|
Vertex<T> |
Graph.addVertex(T data)
Adds a new vertex to the graph with the given data
|
Modifier and Type | Method and Description |
---|---|
abstract java.util.Set<? extends Vertex<T>> |
Vertex.getAdjacentVertices()
Gets all the vertices adjacent to this one.
|
java.util.Set<? extends Vertex<T>> |
Graph.getVertices()
Gets all the vertices in the graph
|
Modifier and Type | Method and Description |
---|---|
Edge<T> |
UnweightedGraph.addEdge(Vertex<T> source,
Vertex<T> target)
Adds an edge to the graph between two Vertices
|
Edge<T> |
UnweightedGraph.addEdge(Vertex<T> source,
Vertex<T> target)
Adds an edge to the graph between two Vertices
|
Edge<T> |
WeightedGraph.addEdge(Vertex<T> source,
Vertex<T> target,
double weight)
Adds an Edge to the graph between two Vertices with the given weight
|
Edge<T> |
WeightedGraph.addEdge(Vertex<T> source,
Vertex<T> target,
double weight)
Adds an Edge to the graph between two Vertices with the given weight
|
Edge<T> |
UnweightedVertex.connectTo(Vertex<T> target)
Connects the vertex to another in its graph
|
Edge<T> |
WeightedVertex.connectTo(Vertex<T> target,
double weight)
Connects the vertex to another in its graph
|
Modifier and Type | Class and Description |
---|---|
class |
DirectedVertex<T>
An vertex of a directed graph which stores some data
|
class |
UnweightedDirectedVertex<T>
A vertex of an unweighted directed graph which stores some data
|
class |
WeightedDirectedVertex<T>
A vertex of a weighted directed graph which stores some data
|
Modifier and Type | Method and Description |
---|---|
DirectedEdge<T> |
UnweightedDirectedGraph.addEdge(Vertex<T> source,
Vertex<T> target) |
DirectedEdge<T> |
UnweightedDirectedGraph.addEdge(Vertex<T> source,
Vertex<T> target) |
WeightedDirectedEdge<T> |
WeightedDirectedGraph.addEdge(Vertex<T> source,
Vertex<T> target,
double weight) |
WeightedDirectedEdge<T> |
WeightedDirectedGraph.addEdge(Vertex<T> source,
Vertex<T> target,
double weight) |
DirectedEdge<T> |
UnweightedDirectedVertex.connectTo(Vertex<T> target) |
DirectedEdge<T> |
WeightedDirectedVertex.connectTo(Vertex<T> target,
double weight) |
void |
DirectedEdge.setSource(Vertex<T> source)
Sets a different vertex to be the source for this edge
|
void |
DirectedEdge.setTarget(Vertex<T> target)
Sets a different vertex to be the target for this edge
|
Modifier and Type | Class and Description |
---|---|
class |
UndirectedVertex<T>
An vertex of an undirected graph which stores some data
|
class |
UnweightedUndirectedVertex<T>
A vertex of an unweighted undirected graph which stores some data
|
class |
WeightedUndirectedVertex<T>
A vertex of a weighted undirected graph which stores some data
|
Modifier and Type | Method and Description |
---|---|
UndirectedEdge<T> |
UnweightedUndirectedGraph.addEdge(Vertex<T> one,
Vertex<T> other) |
UndirectedEdge<T> |
UnweightedUndirectedGraph.addEdge(Vertex<T> one,
Vertex<T> other) |
WeightedUndirectedEdge<T> |
WeightedUndirectedGraph.addEdge(Vertex<T> one,
Vertex<T> other,
double weight) |
WeightedUndirectedEdge<T> |
WeightedUndirectedGraph.addEdge(Vertex<T> one,
Vertex<T> other,
double weight) |
UndirectedEdge<T> |
UnweightedUndirectedVertex.connectTo(Vertex<T> target) |
UndirectedEdge<T> |
WeightedUndirectedVertex.connectTo(Vertex<T> target,
double weight) |