Package | Description |
---|---|
org.jacop.constraints.knapsack |
Modifier and Type | Field and Description |
---|---|
TreeLeaf |
Tree.criticalLeaf
It specifies the leaf containing the critical item.
|
TreeLeaf |
Tree.first
It specifies the first (counting from left to right), the most
efficient item in the tree.
|
TreeLeaf |
Tree.last
It specifies the last (counting from left to right), the least
efficient item in the tree.
|
Modifier and Type | Method and Description |
---|---|
TreeLeaf |
Tree.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.
|
TreeLeaf |
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.
|
TreeLeaf |
Tree.getFirst()
Used to search for mandatory
|
TreeLeaf |
Tree.getLast()
It returns the last (the least efficient) item in the tree.
|
Modifier and Type | Method and Description |
---|---|
TreeLeaf |
Tree.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.
|
TreeLeaf |
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.
|
Modifier and Type | Method and Description |
---|---|
void |
Tree.updateFromList(List<TreeLeaf> list,
int startingPosition)
Used for updating the tree using a list of nodes that have changed.
|
Constructor and Description |
---|
Tree(KnapsackItem[] items,
Map<IntVar,TreeLeaf> varPositionMaping,
TreeLeaf[] leaves,
IntVar zero)
It constructs a tree out of the list of items and creates
proper supporting structures.
|
Constructor and Description |
---|
Tree(KnapsackItem[] items,
Map<IntVar,TreeLeaf> varPositionMaping,
TreeLeaf[] leaves,
IntVar zero)
It constructs a tree out of the list of items and creates
proper supporting structures.
|
Copyright © 2022. All rights reserved.