Package | Description |
---|---|
squidpony.squidai.graph |
Graphs and graph algorithms used primarily (but not exclusively) for pathfinding.
|
Modifier and Type | Class and Description |
---|---|
static class |
Connection.DirectedConnection<V>
A Connection that treats A-to-B as a different edge from B-to-A.
|
static class |
Connection.UndirectedConnection<V>
A Connection that treats A-to-B and B-to-A as the same edge.
|
Modifier and Type | Field and Description |
---|---|
protected OrderedMap<Connection<V>,Connection<V>> |
Graph.edgeMap |
protected OrderedMap<Connection<V>,Connection<V>> |
Graph.edgeMap |
protected java.util.HashMap<Node<V>,Connection<V>> |
Node.neighbors |
protected java.util.ArrayList<Connection<V>> |
Node.outEdges |
Modifier and Type | Method and Description |
---|---|
protected Connection<V> |
Graph.addConnection(Node<V> a,
Node<V> b) |
protected Connection<V> |
Graph.addConnection(Node<V> a,
Node<V> b,
float weight) |
protected Connection<V> |
UndirectedGraph.addConnection(Node<V> a,
Node<V> b,
float weight) |
protected Connection<V> |
Node.addEdge(Node<V> v,
float weight) |
Connection<V> |
Graph.addEdge(V v,
V w)
Add an edge to the graph, from v to w.
|
Connection<V> |
Graph.addEdge(V v,
V w,
float weight)
Add an edge to the graph, from v to w and with the specified weight.
|
protected Connection<V> |
Node.getEdge(Node<V> v) |
protected Connection<V> |
Graph.getEdge(Node<V> a,
Node<V> b) |
protected Connection<V> |
UndirectedGraph.getEdge(Node<V> a,
Node<V> b) |
protected Connection<V> |
DirectedGraph.obtainEdge() |
protected abstract Connection<V> |
Graph.obtainEdge() |
protected Connection<V> |
UndirectedGraph.obtainEdge() |
protected Connection<V> |
Node.removeEdge(Node<V> v) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<Connection<V>> |
Node.getConnections() |
Modifier and Type | Method and Description |
---|---|
void |
Graph.sortEdges(java.util.Comparator<Connection<V>> comparator)
Sort the edges using the provided comparator.
|
Copyright © Eben Howard 2012–2022. All rights reserved.