Class Connection<V>
java.lang.Object
com.github.yellowstonegames.path.Edge<V>
com.github.yellowstonegames.path.Connection<V>
- Type Parameters:
V- the vertex type; oftenCoord
- Direct Known Subclasses:
Connection.DirectedConnection, Connection.UndirectedConnection
The most-commonly-used class that represents an edge between nodes on a Graph. Different kinds of graph will use
different subclasses of this to represent their edges:
Connection.DirectedConnection or Connection.UndirectedConnection.
These subclasses don't add new functionality, but they compare differently during hashing and equality checks.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Connection that treats A-to-B as a different edge from B-to-A.static classA Connection that treats A-to-B and B-to-A as the same edge. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConnection(Node<V> a, Node<V> b) Connection(Node<V> a, Node<V> b, float weight) -
Method Summary
Methods inherited from class Edge
hasEndpoint, hasEndpoints
-
Field Details
-
DEFAULT_WEIGHT
protected static final float DEFAULT_WEIGHT- See Also:
-
a
-
b
-
weight
protected float weight
-
-
Constructor Details
-
Connection
public Connection() -
Connection
-
Connection
-
-
Method Details
-
set
-
getInternalNodeA
- Specified by:
getInternalNodeAin classEdge<V>
-
getInternalNodeB
- Specified by:
getInternalNodeBin classEdge<V>
-
getA
-
getB
-
getWeight
-
setWeight
-
getNodeA
-
getNodeB
-