V
- the vertex type; often Coord
public class Connection<V> extends Edge<V> implements java.io.Serializable
Connection.DirectedConnection
or Connection.UndirectedConnection
.
These subclasses don't add new functionality, but they compare differently during hashing and equality checks.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 Node<V> |
a |
protected Node<V> |
b |
protected static float |
DEFAULT_WEIGHT |
protected float |
weight |
Constructor and Description |
---|
Connection() |
Connection(Node<V> a,
Node<V> b) |
Connection(Node<V> a,
Node<V> b,
float weight) |
Modifier and Type | Method and Description |
---|---|
V |
getA() |
V |
getB() |
protected Node<V> |
getInternalNodeA() |
protected Node<V> |
getInternalNodeB() |
Node<V> |
getNodeA() |
Node<V> |
getNodeB() |
float |
getWeight() |
protected void |
set(Node<V> a,
Node<V> b,
float weight) |
void |
setWeight(float weight) |
protected static final float DEFAULT_WEIGHT
protected float weight
protected Node<V> getInternalNodeA()
getInternalNodeA
in class Edge<V>
protected Node<V> getInternalNodeB()
getInternalNodeB
in class Edge<V>
Copyright © Eben Howard 2012–2022. All rights reserved.