at.jku.risc.stout.nau.data.atom
public class Permutation extends Object implements DeepCopy<Permutation>
Constructor and Description |
---|
Permutation() |
Permutation(int initSize) |
Modifier and Type | Method and Description |
---|---|
void |
addSwappingHead(Atom a1,
Atom a2)
Adds a swapping at the head (left) of this sequence of swappings.
|
void |
addSwappingTail(Atom a1,
Atom a2)
Adds a swapping at the tail (right) of this sequence of swappings.
|
void |
clear() |
static Permutation |
compose(Permutation permHeadLeft,
Permutation permTailRight)
Returns a new permutation which is a composition of the two given ones.
|
Permutation |
deepCopy()
Returns a deep copy of this object.
|
boolean |
equals(Object other) |
Set<Atom[]> |
getDisagreementSet(Permutation otherPerm,
Variable var,
FreshnessCtx nabla)
Returns the set of disagreements between this permutation and another
one.
|
Map<Atom,Atom> |
getInverse()
The internal Map representation of the inverse permutation.
|
Map<Atom,Atom> |
getPerm()
The internal Map representation of the permutation.
|
Permutation |
inverse()
Returns the inverse permutation of this one.
|
boolean |
isEmpty() |
Atom |
permute(Atom key)
Applies the permutation to the given Atom and returns the
permuted atom.
|
Atom |
permuteInverse(Atom key)
Applies the inverse permutation to the given Atom and
returns the inverse permuted atom.
|
String |
toString() |
String |
toString(boolean useIdString) |
public static String idString
public void addSwappingHead(Atom a1, Atom a2) throws MalformedSortException
MalformedSortException
public void addSwappingTail(Atom a1, Atom a2) throws MalformedSortException
MalformedSortException
public void clear()
public static Permutation compose(Permutation permHeadLeft, Permutation permTailRight)
public Permutation deepCopy()
DeepCopy
deepCopy
in interface DeepCopy<Permutation>
public Set<Atom[]> getDisagreementSet(Permutation otherPerm, Variable var, FreshnessCtx nabla)
public Map<Atom,Atom> getInverse()
public Permutation inverse()
public boolean isEmpty()
public Atom permute(Atom key)
public Atom permuteInverse(Atom key)
public String toString(boolean useIdString)