T
- the type of Edge
being stored within this set.public interface EdgeSet<T extends Edge> extends Set<T>
Modifier and Type | Method and Description |
---|---|
boolean |
add(T edge)
Adds the edge to the set only if the edge is connected to the root
vertex.
|
IntSet |
connected()
Returns the set of vertices connected to the root edges.
|
boolean |
connects(int vertex)
Returns true if the root vertex is connected to the provided vertex.
|
EdgeSet |
copy(IntSet vertices)
Copies the edges in this set that are connected to any of the vertices in
the provided set.
|
int |
disconnect(int vertex)
Removes all edges instances that connect to the specified vertex,
returning the number of edges that were removed, if any.
|
Set<T> |
getEdges(int vertex)
Returns the set of
Edge instances that connect the root vertex
with this vertex or an empty set if no such edges exist. |
int |
getRoot()
Returns the vertex to which all edges in this set are connected.
|
boolean add(T edge)
IntSet connected()
boolean connects(int vertex)
EdgeSet copy(IntSet vertices)
int disconnect(int vertex)
Set<T> getEdges(int vertex)
Edge
instances that connect the root vertex
with this vertex or an empty set if no such edges exist.int getRoot()
Copyright © 2012. All Rights Reserved.