Class TupleMaskIdentity
- java.lang.Object
-
- org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask
-
- org.eclipse.viatra.query.runtime.matchers.tuple.TupleMaskIdentity
-
public final class TupleMaskIdentity extends TupleMask
- Since:
- 1.7
-
-
Field Summary
-
Fields inherited from class org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask
indices, sourceWidth
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisIdentity()TuplerevertFrom(ITuple masked)Returns a tuple `result` that satisfies `this.transform(result).equals(masked)`.<T> java.util.List<T>transform(java.util.List<T> original)Generates an immutable, masked view of the original tuple.Tupletransform(ITuple original)Generates an immutable, masked view of the original tuple.TupleMasktransform(TupleMask mask)Transforms a given mask directly, instead of transforming tuples that were transformed by the other mask.-
Methods inherited from class org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask
append, combine, constructLinearSequence, displace, empty, equals, fromKeepIndicators, fromNonNullIndices, fromSelectedIndices, fromSelectedIndices, fromSelectedIndicesInternal, fromSelectedMonotonicIndicesInternal, getFirstOmittedIndex, getIndicesAsList, getSize, getSourceWidth, getValue, hashCode, identity, integersToIntArray, isNonrepeating, keepSelectedIndices, linear, omit, selectSingle, set, toString, transformUnique
-
-
-
-
Method Detail
-
transform
public <T> java.util.List<T> transform(java.util.List<T> original)
Description copied from class:TupleMaskGenerates an immutable, masked view of the original tuple.The list will have arity
TupleMask.getSize(), and will consist of the elements of the original tuple, at positions indicated by this mask.
-
transform
public Tuple transform(ITuple original)
Description copied from class:TupleMaskGenerates an immutable, masked view of the original tuple.The new tuple will have arity
TupleMask.getSize(), and will consist of the elements of the original tuple, at positions indicated by this mask.
-
transform
public TupleMask transform(TupleMask mask)
Description copied from class:TupleMaskTransforms a given mask directly, instead of transforming tuples that were transformed by the other mask.
-
revertFrom
public Tuple revertFrom(ITuple masked)
Description copied from class:TupleMaskReturns a tuple `result` that satisfies `this.transform(result).equals(masked)`. Positions of the result tuple that are not determined this way will be filled with null.- Overrides:
revertFromin classTupleMask
-
isIdentity
public boolean isIdentity()
- Overrides:
isIdentityin classTupleMask- Returns:
- true iff this mask is a no-op
-
-