TypeVertex
- The type of values stored in the vertices. Must be a Comparable type.TypeEdgeReal
- The real type of edges. Must inherits Edge.public interface Edges<TypeVertex extends java.lang.Comparable<TypeVertex>,TypeEdgeReal extends Edge<TypeVertex>>
extends java.util.Collection<TypeEdgeReal>
Modifier and Type | Method and Description |
---|---|
boolean |
add(TypeVertex head,
TypeVertex tail)
Add a new edge in the graph.
|
boolean |
add(Vertex<TypeVertex> head,
Vertex<TypeVertex> tail)
Add a new edge in the graph.
|
boolean |
contains(TypeVertex head,
TypeVertex tail)
Returns true if this collection contains the specified edge.
|
boolean |
contains(Vertex<TypeVertex> head,
Vertex<TypeVertex> tail)
Returns true if this collection contains the specified edge.
|
boolean add(TypeVertex head, TypeVertex tail)
head
- The head of the edge (interchangeable with the tail if the graph is undirected).tail
- The tail of the edge (interchangeable with the head if the graph is undirected).boolean add(Vertex<TypeVertex> head, Vertex<TypeVertex> tail)
head
- The head of the edge (interchangeable with the tail if the graph is undirected).tail
- The tail of the edge (interchangeable with the head if the graph is undirected).boolean contains(TypeVertex head, TypeVertex tail)
head
- The head of the edge (interchangeable with the tail if the graph is undirected).tail
- The tail of the edge (interchangeable with the head if the graph is undirected).boolean contains(Vertex<TypeVertex> head, Vertex<TypeVertex> tail)
head
- The head of the edge (interchangeable with the tail if the graph is undirected).tail
- The tail of the edge (interchangeable with the head if the graph is undirected).