public class IntegerSubsumerBidirectionalGraphImpl extends Object implements IntegerSubsumerBidirectionalGraph
Constructor and Description |
---|
IntegerSubsumerBidirectionalGraphImpl(int bottom,
int top)
Constructs an empty subsumer bidirectional graph.
|
Modifier and Type | Method and Description |
---|---|
void |
add(int vertex)
Adds a new vertex to the invGraph.
|
void |
addAncestor(int subId,
int superId)
Defines that one vertex is a subsumee of another vertex.
|
boolean |
containsPair(int subsumee,
int subsumer)
Tells whether this subsumer graph contains the given pair.
|
boolean |
equals(Object o) |
int |
getBottomElement()
Returns the bottom element.
|
Collection<Integer> |
getElements()
Returns the collection of vertices in the graph.
|
Collection<Integer> |
getSubsumees(int vertex)
Returns the collection of subsumees of a given vertex.
|
Collection<Integer> |
getSubsumers(int vertex)
Returns the collection of subsumers of a given vertex.
|
int |
getTopElement()
Returns the top element.
|
int |
hashCode() |
void |
retainAll(Collection<Integer> collection)
Retains only the elements contained in the collection.
|
String |
toString() |
public IntegerSubsumerBidirectionalGraphImpl(int bottom, int top)
bottom
- bottom class identifiertop
- top class identifierpublic void add(int vertex)
vertex
- vertexpublic void addAncestor(int subId, int superId)
subId
- the subsumeesuperId
- the subsumerpublic boolean containsPair(int subsumee, int subsumer)
IntegerSubsumerGraph
containsPair
in interface IntegerSubsumerGraph
subsumee
- subsumeesubsumer
- subsumertrue
if and only if this subsumer graph contains the
given pairpublic int getBottomElement()
IntegerSubsumerGraph
getBottomElement
in interface IntegerSubsumerGraph
public Collection<Integer> getElements()
IntegerSubsumerGraph
getElements
in interface IntegerSubsumerGraph
public Collection<Integer> getSubsumees(int vertex)
IntegerSubsumerBidirectionalGraph
getSubsumees
in interface IntegerSubsumerBidirectionalGraph
vertex
- to get the collection of subsumeespublic Collection<Integer> getSubsumers(int vertex)
IntegerSubsumerGraph
getSubsumers
in interface IntegerSubsumerGraph
vertex
- to get the collection of subsumerspublic int getTopElement()
IntegerSubsumerGraph
getTopElement
in interface IntegerSubsumerGraph
public void retainAll(Collection<Integer> collection)
collection
- collection of elements to be retainedCopyright © 2009–2015 Chair of Automata Theory - TU Dresden. All rights reserved.