Uses of Class
org.jacop.constraints.knapsack.TreeLeaf
Packages that use TreeLeaf
-
Uses of TreeLeaf in org.jacop.constraints.knapsack
Fields in org.jacop.constraints.knapsack declared as TreeLeafModifier and TypeFieldDescriptionTree.criticalLeaf
It specifies the leaf containing the critical item.Tree.first
It specifies the first (counting from left to right), the most efficient item in the tree.Tree.last
It specifies the last (counting from left to right), the least efficient item in the tree.private TreeLeaf[]
Knapsack.leaves
It stores all the leaves of the knapsack tree in one array.Fields in org.jacop.constraints.knapsack with type parameters of type TreeLeafModifier and TypeFieldDescriptionKnapsack.hashForUpdate
It stores for each level the leaves which have changed at this level.Knapsack.variableLeafMapping
It specifies mapping from variables into the leaf of the knapsack tree.Methods in org.jacop.constraints.knapsack that return TreeLeafModifier and TypeMethodDescriptionTree.findNextLeafAtLeastOfWeight
(TreeLeaf leaf, int weight) It finds next leaf of a maximum weight of at least weight, so it can have some parts of it mandatory.Tree.findPreviousLeafAtLeastOfWeight
(TreeLeaf leaf, int weight) It finds previous leaf of a maximum weight of at least weight, so it can have some parts of it forbidden.Tree.getFirst()
Used to search for mandatoryTree.getLast()
It returns the last (the least efficient) item in the tree.Methods in org.jacop.constraints.knapsack with parameters of type TreeLeafModifier and TypeMethodDescriptionTree.findNextLeafAtLeastOfWeight
(TreeLeaf leaf, int weight) It finds next leaf of a maximum weight of at least weight, so it can have some parts of it mandatory.Tree.findPreviousLeafAtLeastOfWeight
(TreeLeaf leaf, int weight) It finds previous leaf of a maximum weight of at least weight, so it can have some parts of it forbidden.Method parameters in org.jacop.constraints.knapsack with type arguments of type TreeLeafModifier and TypeMethodDescriptionvoid
Tree.updateFromList
(List<TreeLeaf> list, int startingPosition) Used for updating the tree using a list of nodes that have changed.Constructors in org.jacop.constraints.knapsack with parameters of type TreeLeafModifierConstructorDescriptionIt constructs a tree out of the list of items and creates proper supporting structures.Constructor parameters in org.jacop.constraints.knapsack with type arguments of type TreeLeaf