Package org.tweetyproject.arg.adf.util
Class ExcludeSubinterpretationsIterator
java.lang.Object
org.tweetyproject.arg.adf.util.ExcludeSubinterpretationsIterator
- All Implemented Interfaces:
Iterator<Interpretation>
Iterates through all interpretations except the ones equal to or more
specific than the provided ones.
- Author:
- Mathias Hofer
-
Constructor Summary
ConstructorDescriptionExcludeSubinterpretationsIterator
(List<Interpretation> interpretations) Constructs a newExcludeSubinterpretationsIterator
that iterates over a list of interpretations, excluding subinterpretations according to a specific order and structure. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
ExcludeSubinterpretationsIterator
Constructs a newExcludeSubinterpretationsIterator
that iterates over a list of interpretations, excluding subinterpretations according to a specific order and structure.The constructor initializes the iterator by ordering the interpretations based on the first interpretation in the list. It then builds a tree-like structure rooted in an
InnerNode
, where each interpretation is added to the tree. This structure allows efficient exclusion of subinterpretations during iteration.- Parameters:
interpretations
- A list ofInterpretation
objects to be iterated over.- Throws:
NoSuchElementException
- if the list of interpretations is empty.
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceIterator<Interpretation>
-
next
- Specified by:
next
in interfaceIterator<Interpretation>
-