public abstract class TCLOSE extends RelationalOperator
Constructor and Description |
---|
TCLOSE() |
Modifier and Type | Method and Description |
---|---|
static java.util.Set<TupleBuffer> |
computeTclose(MyReadOnlyCollection<TupleBuffer> r,
java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes,
java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
Computes the closure in a straightforward way.
|
static RelationBuffer |
computeTClose(RelationBuffer relationBuffer,
java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes,
java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
Computes the closure.
|
static Relation |
computeTClose(Relation relation,
java.util.Map<NameIdentifier,NameIdentifier> matchby)
Computes the closure.
|
int |
getMaximumArgumentCount()
Gets the maximum argument count for this operator.
|
int |
getMinimumArgumentCount()
Gets the minimum argument count for this operator.
|
java.lang.String |
getName()
Gets the operator name
|
boolean |
isMonoRelationOperator()
Checks if the operator takes only one Relation as input
|
static TCLOSEInvocationResultDetails |
validateExpressionDetails(Heading inputHeading,
java.util.Map<NameIdentifier,NameIdentifier> matchby,
java.lang.String inputPredicate) |
toString
public static java.util.Set<TupleBuffer> computeTclose(MyReadOnlyCollection<TupleBuffer> r, java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes, java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
r
- The relation of which a closure over some set of attributes is to be computedclosureLeftAttributes
- The map mapping the 'from' attributes to the 'to' attributes.closureRightAttributes
- The map of attributes to be paired, having as key the 'to' attributename, with as corresponding value the name of the corresponding 'from' attribute.public static Relation computeTClose(Relation relation, java.util.Map<NameIdentifier,NameIdentifier> matchby) throws EvaluationException
relation
- a relation to be subjected to a transitive closure operationmatchby
- the mapping of which attributes match to which in determining pairs of tuples to apply the transitive operation toEvaluationException
- If an invalid invocation was attempted. The getCause() exception will reveal more detail about the nature of the problem.public static RelationBuffer computeTClose(RelationBuffer relationBuffer, java.util.Map<NameIdentifier,NameIdentifier> closureLeftAttributes, java.util.Map<NameIdentifier,NameIdentifier> closureRightAttributes)
relationBuffer
- a buffer holding a relation to be subjected to a transitive closure operationclosureLeftAttributes
- the mapping of which attributes match to which in determining pairs of tuples to apply the transitive operation toclosureRightAttributes
- The "to-to-from" mapping of attributes to perform the closure overpublic static TCLOSEInvocationResultDetails validateExpressionDetails(Heading inputHeading, java.util.Map<NameIdentifier,NameIdentifier> matchby, java.lang.String inputPredicate) throws DuplicateClosureAttributeException, ClosureAttributesOmittedException, NonExistingAttributeException, IncompatibleClosureTypesException
inputHeading
- The heading of the relation that is subjected to a transitive closure operationmatchby
- The specification of which attributes to compare to which when establishing pairs of tuples that are to be subjected to the transitive operationinputPredicate
- The relation predicate of which the input relation is the extensionDuplicateClosureAttributeException
- If an attribute is mentioned more than once in the matchby specificationClosureAttributesOmittedException
- If not all attributes of the input relation have been mentioned for matching in the matchby specNonExistingAttributeException
- If an attribute is mentioned in the matchby spec that doesn't appear in the headingIncompatibleClosureTypesException
- If two attributes to be compared pairwise in the closure operation have incompatible typespublic final int getMaximumArgumentCount()
RelationalOperator
getMaximumArgumentCount
in class RelationalOperator
public final int getMinimumArgumentCount()
RelationalOperator
getMinimumArgumentCount
in class RelationalOperator
public final java.lang.String getName()
RelationalOperator
getName
in class RelationalOperator
public final boolean isMonoRelationOperator()
RelationalOperator
isMonoRelationOperator
in class RelationalOperator