Package org.tweetyproject.preferences
Interface BinaryRelation<T>
- Type Parameters:
T
- the generic type of objects/pairs in this binary relation
- All Superinterfaces:
Collection<Triple<T,
,T, Relation>> Iterable<Triple<T,
,T, Relation>> Set<Triple<T,
T, Relation>>
- All Known Implementing Classes:
PreferenceOrder
This abstract class provides a basic implementation of a generic set of pairs to be used for
preference ordering.
- Author:
- Bastian Wolf
-
Method Summary
Modifier and TypeMethodDescriptionboolean
adds a new triple containing two elements and its relationreturns a set of the single elements in this binary relationboolean
returns whether the elements a and b are relatedboolean
isTotal()
checks whether the set is total or notboolean
checks whether the given set is transitive or notboolean
isValid()
checks whether the preference order is valid (transitive, total and unique)toString()
returns a String with the elements of this setMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Method Details
-
add
adds a new triple containing two elements and its relation -
isRelated
-
getDomainElements
-
isTotal
boolean isTotal()checks whether the set is total or not- Returns:
- true if total, false otherwise
-
isTransitive
boolean isTransitive()checks whether the given set is transitive or not- Returns:
- true if transitive, false otherwise
-
isValid
boolean isValid()checks whether the preference order is valid (transitive, total and unique)- Returns:
- true if valid, false if not
-
toString
-