Uses of Class
org.xcsp.common.predicates.XNode
-
Packages that use XNode Package Description org.xcsp.common.predicates org.xcsp.modeler.api org.xcsp.modeler.definitions org.xcsp.modeler.implementation org.xcsp.parser.callbacks org.xcsp.parser.entries -
-
Uses of XNode in org.xcsp.common.predicates
Subclasses of XNode in org.xcsp.common.predicates Modifier and Type Class Description class
XNodeLeaf<V extends IVar>
The class used for representing a leaf node in a syntactic tree.class
XNodeParent<V extends IVar>
The class used for representing a parent node in a syntactic tree.class
XNodeParentSpecial<V extends IVar>
Fields in org.xcsp.common.predicates declared as XNode Modifier and Type Field Description XNode<V>[]
XNode. sons
The sons (children) of the node.Methods in org.xcsp.common.predicates that return XNode Modifier and Type Method Description abstract XNode<V>
XNode. abstraction(List<Object> args, boolean abstractIntegers, boolean multiOccurrences)
Returns a new tree representing an abstraction of the tree rooted by this node.XNode<V>
XNodeLeaf. abstraction(List<Object> args, boolean abstractIntegers, boolean multiOccurrences)
XNode<V>
XNodeParent. abstraction(List<Object> args, boolean abstractIntegers, boolean multiOccurrences)
abstract XNode<V>
XNode. canonization()
Returns a new tree, equivalent to the tree rooted by this node, and in canonical form.XNode<V>
XNodeLeaf. canonization()
XNode<V>
XNodeParent. canonization()
abstract XNode<V>
XNode. concretization(Object[] args)
Returns a new tree representing a concretization of the tree rooted by this node.XNode<V>
XNodeLeaf. concretization(Object[] args)
XNode<V>
XNodeParent. concretization(Object[] args)
abstract XNode<V>
XNode. firstNodeSuchThat(java.util.function.Predicate<XNode<V>> p)
Returns the first node accepted by the specified predicate in the tree rooted by this node, ornull
otherwise.XNode<V>
XNodeLeaf. firstNodeSuchThat(java.util.function.Predicate<XNode<V>> p)
XNode<V>
XNodeParent. firstNodeSuchThat(java.util.function.Predicate<XNode<V>> p)
abstract XNode<V>
XNode. replaceLeafValues(java.util.function.Function<Object,Object> f)
a new tree, obtained from the tree rooted by this node by replacing values of leaves, as defined by the specified functionXNode<V>
XNodeLeaf. replaceLeafValues(java.util.function.Function<Object,Object> f)
XNode<V>
XNodeParent. replaceLeafValues(java.util.function.Function<Object,Object> f)
abstract XNode<V>
XNode. replacePartiallyParameters(Object[] valueParameters)
XNode<V>
XNodeLeaf. replacePartiallyParameters(Object[] valueParameters)
XNode<V>
XNodeParent. replacePartiallyParameters(Object[] valueParameters)
abstract XNode<V>
XNode. replaceSymbols(Map<String,Integer> mapOfSymbols)
Returns a new tree, obtained from the tree rooted by this node by replacing symbols with integers, as defined by the specified map.XNode<V>
XNodeLeaf. replaceSymbols(Map<String,Integer> mapOfSymbols)
XNode<V>
XNodeParent. replaceSymbols(Map<String,Integer> mapOfSymbols)
static XNode<IVar>
XNodeParent. set(int[] operands)
static XNode<IVar>
XNodeParent. set(Object... operands)
XNode<IVar>
MatcherInterface.Matcher. target()
XNode<IVar>
MatcherInterface. target()
Returns the target tree, which may possibly involve some form of abstraction by means of special nodes.Methods in org.xcsp.common.predicates that return types with arguments of type XNode Modifier and Type Method Description LinkedList<XNode<V>>
XNode. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p)
Returns a list containing all nodes accepted by the specified predicate in the tree rooted by this node.abstract LinkedList<XNode<V>>
XNode. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
Adds to the specified list all nodes accepted by the specified predicate in the tree rooted by this node.LinkedList<XNode<V>>
XNodeLeaf. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
LinkedList<XNode<V>>
XNodeParent. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
Methods in org.xcsp.common.predicates with parameters of type XNode Modifier and Type Method Description int
XNodeLeaf. compareTo(XNode<V> obj)
int
XNodeParent. compareTo(XNode<V> obj)
default boolean
MatcherInterface. matches(XNode<? extends IVar> tree)
Returnstrue
if the predefined target tree matches the specified (source) tree.default boolean
MatcherInterface. matching(XNode<? extends IVar> source, XNode<IVar> target, int level)
Returnstrue
if the specified source tree matches the specified target tree (at the specified level).static <V extends IVar>
XNodeParent<V>XNode. node(MatcherInterface.AbstractOperation type, XNode<V> son)
static <V extends IVar>
XNodeParent<V>XNode. node(MatcherInterface.AbstractOperation type, XNode<V> left, XNode<V> right)
static <V extends IVar>
XNodeParent<V>XNode. node(Types.TypeExpr type, XNode<V> son)
static <V extends IVar>
XNodeParent<V>XNode. node(Types.TypeExpr type, XNode<V>[] sons)
static <V extends IVar>
XNodeParent<V>XNode. node(Types.TypeExpr type, XNode<V> left, XNode<V> right)
boolean
MatcherInterface.Matcher. validForSpecialTargetNode(XNode<? extends IVar> node, int level)
boolean
MatcherInterface. 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.Method parameters in org.xcsp.common.predicates with type arguments of type XNode Modifier and Type Method Description LinkedList<XNode<V>>
XNode. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p)
Returns a list containing all nodes accepted by the specified predicate in the tree rooted by this node.abstract LinkedList<XNode<V>>
XNode. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
Adds to the specified list all nodes accepted by the specified predicate in the tree rooted by this node.abstract LinkedList<XNode<V>>
XNode. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
Adds to the specified list all nodes accepted by the specified predicate in the tree rooted by this node.LinkedList<XNode<V>>
XNodeLeaf. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
LinkedList<XNode<V>>
XNodeLeaf. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
LinkedList<XNode<V>>
XNodeParent. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
LinkedList<XNode<V>>
XNodeParent. allNodesSuchThat(java.util.function.Predicate<XNode<V>> p, LinkedList<XNode<V>> list)
abstract XNode<V>
XNode. firstNodeSuchThat(java.util.function.Predicate<XNode<V>> p)
Returns the first node accepted by the specified predicate in the tree rooted by this node, ornull
otherwise.XNode<V>
XNodeLeaf. firstNodeSuchThat(java.util.function.Predicate<XNode<V>> p)
XNode<V>
XNodeParent. firstNodeSuchThat(java.util.function.Predicate<XNode<V>> p)
static <V extends IVar>
XNodeParent<V>XNode. node(Types.TypeExpr type, List<XNode<V>> sons)
static <V extends IVar>
XNodeParent<V>XNode. node(Types.TypeExpr type, java.util.stream.Stream<XNode<V>> sons)
Constructors in org.xcsp.common.predicates with parameters of type XNode Constructor Description Matcher(XNode<IVar> target)
Builds aMatcher
object with the specified target tree.Matcher(XNode<IVar> target, java.util.function.BiPredicate<XNode<? extends IVar>,Integer> p)
Builds aMatcher
object with the specified target tree.TreeEvaluator(XNode<? extends IVar> tree)
TreeEvaluator(XNode<? extends IVar> tree, Map<String,Integer> mapOfSymbols)
XNode(Types.TypeExpr type, XNode<V>[] sons)
Builds a node for a syntactic tree, with the specified type and the specified sons (children).XNodeParent(Types.TypeExpr type, XNode<V> son)
Builds a parent node for a syntactic tree, with the specified type and the specified son.XNodeParent(Types.TypeExpr type, XNode<V>[] sons)
Builds a parent node for a syntactic tree, with the specified type and the specified sons.XNodeParent(Types.TypeExpr type, XNode<V> son1, XNode<V> son2)
Builds a parent node for a syntactic tree, with the specified type and the two specified sons.XNodeParentSpecial(String specialName, XNode<V> son)
XNodeParentSpecial(String specialName, XNode<V> son1, XNode<V> son2)
Constructor parameters in org.xcsp.common.predicates with type arguments of type XNode Constructor Description Matcher(XNode<IVar> target, java.util.function.BiPredicate<XNode<? extends IVar>,Integer> p)
Builds aMatcher
object with the specified target tree.XNodeParent(Types.TypeExpr type, List<XNode<V>> sons)
Builds a parent node for a syntactic tree, with the specified type and the specified sons. -
Uses of XNode in org.xcsp.modeler.api
Methods in org.xcsp.modeler.api that return XNode Modifier and Type Method Description default XNode<IVar>
ProblemAPI. set(int[] operands)
Returns the node of a syntactic tree built with the operatorset
applied to the integers from the specified array.default XNode<IVar>
ProblemAPI. set(Object... operands)
Returns the root of a syntactic tree built with the operatorset
applied to the specified operands.Methods in org.xcsp.modeler.api that return types with arguments of type XNode Modifier and Type Method Description default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(int[] t, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified array.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(Collection<Integer> c, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified collection.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(java.util.stream.IntStream stream, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified stream.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(IVar[] t, java.util.function.Function<IVar,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each variable of the specified array.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(Range r, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified range.Methods in org.xcsp.modeler.api with parameters of type XNode Modifier and Type Method Description default CtrEntities.CtrEntity
ProblemAPI. allDifferent(XNode<IVar>[] trees)
Builds a constraintallDifferent
on the specified syntactic trees (predicates): the predicates, when evaluated, must all take different values.default ObjEntities.ObjEntity
ProblemAPI. maximize(XNode<IVar> tree)
default ObjEntities.ObjEntity
ProblemAPI. maximize(Types.TypeObjective type, XNode<IVar>[] trees)
default ObjEntities.ObjEntity
ProblemAPI. maximize(Types.TypeObjective type, XNode<IVar>[] trees, int[] coeffs)
default ObjEntities.ObjEntity
ProblemAPI. minimize(XNode<IVar> tree)
default ObjEntities.ObjEntity
ProblemAPI. minimize(Types.TypeObjective type, XNode<IVar>[] trees)
default ObjEntities.ObjEntity
ProblemAPI. minimize(Types.TypeObjective type, XNode<IVar>[] trees, int[] coeffs)
default CtrEntities.CtrEntity
ProblemAPI. sum(XNode<IVar>[] trees, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.default CtrEntities.CtrEntity
ProblemAPI. sum(XNode<IVar>[] trees, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
ProblemAPI. sum(XNode<IVar>[] trees, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
ProblemAPI. sum(XNode<IVar>[] trees, Condition condition)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the specified condition.default CtrEntities.CtrEntity
ProblemAPI. sum(XNode<IVar>[] trees, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
ProblemAPI. sum(XNode<IVar>[] trees, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.Method parameters in org.xcsp.modeler.api with type arguments of type XNode Modifier and Type Method Description default CtrEntities.CtrEntity
ProblemAPI. allDifferent(java.util.stream.Stream<XNode<IVar>> trees)
Builds a constraintallDifferent
on the specified (stream of) syntactic trees (predicates): the predicates, when evaluated, must all take different values.default ObjEntities.ObjEntity
ProblemAPI. maximize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees)
default ObjEntities.ObjEntity
ProblemAPI. maximize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs)
default ObjEntities.ObjEntity
ProblemAPI. minimize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees)
default ObjEntities.ObjEntity
ProblemAPI. minimize(Types.TypeObjective type, java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs)
default CtrEntities.CtrEntity
ProblemAPI. sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Condition condition)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the specified condition.default CtrEntities.CtrEntity
ProblemAPI. sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
ProblemAPI. sum(java.util.stream.Stream<XNode<IVar>> trees, int[] coeffs, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the weighted sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
ProblemAPI. sum(java.util.stream.Stream<XNode<IVar>> trees, Condition condition)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the specified condition.default CtrEntities.CtrEntity
ProblemAPI. sum(java.util.stream.Stream<XNode<IVar>> trees, Types.TypeConditionOperatorRel op, long limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default CtrEntities.CtrEntity
ProblemAPI. sum(java.util.stream.Stream<XNode<IVar>> trees, Types.TypeConditionOperatorRel op, IVar.Var limit)
Builds a constraintsum
from the specified arguments: the (simple) sum must respect the condition expressed by the specified operator and the specified limit.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(int[] t, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified array.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(Collection<Integer> c, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified collection.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(java.util.stream.IntStream stream, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified stream.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(IVar[] t, java.util.function.Function<IVar,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each variable of the specified array.default java.util.stream.Stream<XNode<IVar>>
ProblemAPI. treesFrom(Range r, java.util.function.Function<Integer,XNode<IVar>> f)
Returns a stream of syntactic trees (predicates) built by applying the specified function to each integer of the specified range. -
Uses of XNode in org.xcsp.modeler.definitions
Methods in org.xcsp.modeler.definitions with parameters of type XNode Modifier and Type Method Description static IObj.IObjFunctional
IObj.IObjFunctional. buildFrom(IVar[] scope, boolean minimize, XNode<IVar> tree)
-
Uses of XNode in org.xcsp.modeler.implementation
-
Uses of XNode in org.xcsp.parser.callbacks
-
Uses of XNode in org.xcsp.parser.entries
Fields in org.xcsp.parser.entries declared as XNode Modifier and Type Field Description XNode<? extends XVariables.XVar>
XObjectives.OObjectiveExpr. rootNode
Constructors in org.xcsp.parser.entries with parameters of type XNode Constructor Description OObjectiveExpr(boolean minimize, Types.TypeObjective type, XNode<? extends XVariables.XVar> rootNode)
Builds an objective from the specified functional expression (given by the root of a syntactic tree).
-