FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNode< U extends Addable< U >, L extends LeafNode< U > > Class Template Reference

The inner node of a tree. More...

Inheritance diagram for frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNode< U extends Addable< U >, L extends LeafNode< U > >:

Public Member Functions

 InnerNode (int nbrOfChildren)
 A constructor.
 InnerNode (Node< U >[] children)
 A constructor.
void setUtil (int index, boolean direct)
 Set the maximal utility for this node.
void enlargeChildrenArray (int enlargement, boolean dummy)
 If maxUBChild points to the dummy child, its value should be increased by 1.
boolean removeDummy ()
 Method to remove the dummy child.
boolean check1 ()
boolean check2 (final boolean maximize)
boolean check4 ()
boolean recalculateUtil ()
Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >
 InnerNode (int nbrOfChildren)
 A constructor.
Node< U > getExample ()
getMaxUB ()
int getMaxUBChild ()
int getMaxChild ()
getMaxUtil ()
void setUtil (int index, boolean direct)
 Set the maximal utility for this node.
void setUB (int index, boolean direct)
 Set the maximal upper bound for this node.
void enlargeChildrenArray (int enlargement, boolean dummy)
 If maxUBChild points to the dummy child, its value should be increased by 1.
Node< U > getChild (int i)
 Return a specific child of this node.
void setChild (Node< U > child, int position)
 Add a child in a particular position.
void retainOnly (int child)
 This method is used when the assignment belonging to leaf child has been sent as a confirmed good.
boolean utilCandidate (U maxUtil, final boolean maximize)
boolean ubCandidate (U maxUB, final boolean maximize)
getUtil ()
getUB ()
boolean hasUtil ()
boolean hasUB ()
boolean check1 ()
 If there is a util, there must be an upperbound as well.
boolean check2 (final boolean maximize)
 Either the utility is lower than the upperbound, or the utility is not up to date.
boolean check3 (final boolean maximize)
 Either the utility is not up to date or it is not greater than the upper bound.
boolean check4 ()
 If there is an upper bound, and its utility is up to date, then there must also be a utility.
boolean check5 (U[] upperBoundSums, final boolean maximize)
 Check whether the upperbound is up to date.
boolean recalculateUtil ()

Public Attributes

boolean real
 True if this node is a dummy node, and false otherwise.
Public Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >
Node< U >[] children
 The children of this node.

Additional Inherited Members

Protected Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >
int maxChild
 the branch from this node to the assignment that has the highest utility
int maxUBChild
 the branch from this node to the assignment that has the highest upper bound
util
 The utility stored in this node.
UB
 The UB stored in this node.

Detailed Description

The inner node of a tree.

Author
brammert
Parameters
<U>the type used to represent a utility value
<L>the type of LeafNode that is to be used

Constructor & Destructor Documentation

◆ InnerNode() [1/2]

frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.InnerNode ( int nbrOfChildren)

A constructor.

Parameters
nbrOfChildrenthe number of children of this node

References real.

Referenced by setUtil().

◆ InnerNode() [2/2]

frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.InnerNode ( Node< U >[] children)

A constructor.

Parameters
childrenthe number of children of this node

References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >.children, and real.

Member Function Documentation

◆ check1()

◆ check2()

◆ check4()

◆ enlargeChildrenArray()

◆ recalculateUtil()

◆ removeDummy()

boolean frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.removeDummy ( )

◆ setUtil()

void frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.setUtil ( int index,
boolean direct )

Set the maximal utility for this node.

Author
Brammert Ottens, 19 nov 2009
Parameters
indexthe index of the child that contains this maximal utility
directtrue when all the children are leafnodes, and false otherwise

References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >.children, InnerNode(), frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >.maxChild, setUtil(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, L >.util.

Referenced by frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.addNewDomainElementNoUB(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.addVariableToTree(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.createPathNoUB(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.createPathWithUB(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.fillTree(), frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.initiateBounds(), setUtil(), and frodo2.algorithms.odpop.goodsTree.InnerNodeTree.InnerNodeTree< Val extends Addable< Val >, U extends Addable< U >, L extends LeafNode< U > >.updatePath().

Here is the call graph for this function:

Member Data Documentation

◆ real


The documentation for this class was generated from the following file: