public class IntegerSubsumerGraphImpl extends Object implements IntegerSubsumerGraph
Constructor and Description |
---|
IntegerSubsumerGraphImpl(int bottom,
int top)
Constructs an empty subsumer graph.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(int vertex)
Adds a new vertex to the graph.
|
boolean |
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.
|
long |
getDeepSize()
Returns the number of elements in the internal maps that are referred by
the keys, without counting the keys themselves.
|
Collection<Integer> |
getElements()
Returns the collection of vertices in the graph.
|
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 IntegerSubsumerGraphImpl(int bottom, int top)
bottom
- bottom class identifiertop
- top class identifierpublic boolean add(int vertex)
vertex
- vertextrue
if and only if the vertex was addedpublic boolean addAncestor(int subId, int superId)
subId
- the subsumeesuperId
- the subsumertrue
if and only if the relation was addedpublic 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 long getDeepSize()
public Collection<Integer> getElements()
IntegerSubsumerGraph
getElements
in interface IntegerSubsumerGraph
public 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.