Class SerialisationEquivalenceBySequenceNaiv
java.lang.Object
org.tweetyproject.arg.dung.serialisibility.equivalence.SerialisationEquivalenceBySequenceNaiv
- All Implemented Interfaces:
Equivalence<Collection<SerialisationSequence>>
public class SerialisationEquivalenceBySequenceNaiv
extends Object
implements Equivalence<Collection<SerialisationSequence>>
This class represents an comparator, which defines if 2 sets of sequences are equivalent.
Those sets are deemed equivalent, if for each sequence in one set there is an equivalent sequence
in the other set.Two single sequences are expected to be equivalent if they consist of equivalent elements
in a similar order (naive approach).
- Version:
- TweetyProject 1.23
- Author:
- Julian Sander
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isEquivalent
(Collection<Collection<SerialisationSequence>> sequences) Checks whether the specified objects are equivalent, in a sense that every single object is equivalent to every other object in the setboolean
Checks whether the specified objects are equivalent
-
Constructor Details
-
SerialisationEquivalenceBySequenceNaiv
public SerialisationEquivalenceBySequenceNaiv()
-
-
Method Details
-
isEquivalent
public boolean isEquivalent(Collection<SerialisationSequence> seq1, Collection<SerialisationSequence> seq2) Description copied from interface:Equivalence
Checks whether the specified objects are equivalent- Specified by:
isEquivalent
in interfaceEquivalence<Collection<SerialisationSequence>>
- Parameters:
seq1
- an object of the type-parameterseq2
- an object of the type-parameter- Returns:
- true if both theories are equivalent
-
isEquivalent
Description copied from interface:Equivalence
Checks whether the specified objects are equivalent, in a sense that every single object is equivalent to every other object in the set- Specified by:
isEquivalent
in interfaceEquivalence<Collection<SerialisationSequence>>
- Parameters:
sequences
- A collection of objects of the type-parameter- Returns:
- TRUE iff all objects are equivalent
-
getDescription
- Specified by:
getDescription
in interfaceEquivalence<Collection<SerialisationSequence>>
- Returns:
- Description of the definition
-