Package org.xcsp.common.predicates
Class MatcherInterface.Matcher
- java.lang.Object
-
- org.xcsp.common.predicates.MatcherInterface.Matcher
-
- All Implemented Interfaces:
MatcherInterface
- Enclosing interface:
- MatcherInterface
public static class MatcherInterface.Matcher extends Object implements MatcherInterface
This class allows us to perform matching tests between trees.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.xcsp.common.predicates.MatcherInterface
MatcherInterface.AbstractOperation, MatcherInterface.Matcher
-
-
Field Summary
-
Fields inherited from interface org.xcsp.common.predicates.MatcherInterface
add_mul_vals, add_mul_vars, add_vars, any, any_add_val, anyc, k_mul_x, logic_vars, max_vars, min_vars, mul_vars, not, set_vals, sub, val, var, var_add_val, varOrVal, x_mul_k, x_mul_y
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XNode<IVar>
target()
Returns the target tree, which may possibly involve some form of abstraction by means of special nodes.boolean
validForSpecialTargetNode(XNode<? extends IVar> node, int level)
Returnstrue
if the specified node (considered at the specified level/depth) is valid with respect to the target tree when assuming that the corresponding node in the target tree is a special node.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.xcsp.common.predicates.MatcherInterface
matches, matching
-
-
-
-
Method Detail
-
target
public XNode<IVar> target()
Description copied from interface:MatcherInterface
Returns the target tree, which may possibly involve some form of abstraction by means of special nodes.- Specified by:
target
in interfaceMatcherInterface
- Returns:
- the target tree
-
validForSpecialTargetNode
public boolean validForSpecialTargetNode(XNode<? extends IVar> node, int level)
Description copied from interface:MatcherInterface
Returnstrue
if the specified node (considered at the specified level/depth) is valid with respect to the target tree when assuming that the corresponding node in the target tree is a special node.- Specified by:
validForSpecialTargetNode
in interfaceMatcherInterface
- Parameters:
node
- a (source) nodelevel
- the level/depth associated with the node- Returns:
true
if the specified source node is valid with respect to a corresponding special node in the target tree
-
-