FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.algorithms.odpop.goodsTree.InnerNodeTreeBinaryDomains.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.InnerNodeTreeBinaryDomains.InnerNode< U extends Addable< U >, L extends LeafNode< U > >:

Public Member Functions

 InnerNode ()
 A constructor.
 InnerNode (Node< U >[] children)
 A constructor.
Node< U > getExample ()
Node< U > getChild (int i)
void retainOnly (int child)
void setChild (Node< U > child, int position)
 Add a child in a particular position.
Public Member Functions inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, LeafNode< U > >
 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 ()

Additional Inherited Members

Public Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, LeafNode< U > >
Node< U >[] children
 The children of this node.
Protected Attributes inherited from frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, LeafNode< U > >
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]

◆ InnerNode() [2/2]

A constructor.

Parameters
childrenthe number of children of this node

References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, LeafNode< U > >.children.

Member Function Documentation

◆ getChild()

◆ getExample()

◆ retainOnly()

◆ setChild()

void frodo2.algorithms.odpop.goodsTree.InnerNodeTreeBinaryDomains.InnerNode< U extends Addable< U >, L extends LeafNode< U > >.setChild ( Node< U > child,
int position )

Add a child in a particular position.

Parameters
childthe child to be updated
positionthe position of the child
Warning
this method overrides the previous Node in this position

References frodo2.algorithms.odpop.goodsTree.InnerNodeTreeFullDomain.InnerNode< U, LeafNode< U > >.children.


The documentation for this class was generated from the following file:
  • src/frodo2/algorithms/odpop/goodsTree/InnerNodeTreeBinaryDomains/InnerNode.java