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

Convenience class to store assignment/utility combinations in a priority queue. More...

Inheritance diagram for frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >:

Public Member Functions

 Assignment (Val[] assignment, U utility, boolean maximize)
 Constructor.
int compareTo (Assignment< Val, U > a)
 Compares to assignments with each other, based on the utilty belonging to the assignment.
String toString (String[] vars)
 Prints the information in the assignment.

Public Attributes

Val[] assignment
 The assignment.
utility
 The utility belonging to the assignment.

Private Attributes

final boolean maximize
 when true we are maximizing, when false we are minimizing

Detailed Description

Convenience class to store assignment/utility combinations in a priority queue.

Author
Brammert Ottens, 9 nov 2009
Parameters
<Val>type used for variable values
<U>type used for utility values

Constructor & Destructor Documentation

◆ Assignment()

frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >.Assignment ( Val[] assignment,
U utility,
boolean maximize )

Constructor.

Parameters
assignmentThe assignment
utilityThe utility belonging to the assignment
maximizewhen true we are maximizing, when false we are minimizing

References assignment, maximize, and utility.

Referenced by compareTo().

Member Function Documentation

◆ compareTo()

int frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >.compareTo ( Assignment< Val, U > a)

Compares to assignments with each other, based on the utilty belonging to the assignment.

Parameters
athe assignment to which this assignment must be compared
Returns
the difference between a.utility and this assignments utility

References Assignment(), maximize, and utility.

Here is the call graph for this function:

◆ toString()

String frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >.toString ( String[] vars)

Prints the information in the assignment.

Author
Brammert Ottens, 10 nov 2009
Parameters
varsthe variables to which this assignment assigns values
Returns
the string representation of this class

References assignment, and utility.

Member Data Documentation

◆ assignment

Val [] frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >.assignment

The assignment.

Referenced by Assignment(), and toString().

◆ maximize

final boolean frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >.maximize
private

when true we are maximizing, when false we are minimizing

Referenced by Assignment(), and compareTo().

◆ utility

U frodo2.algorithms.odpop.goodsTree.GoodsTree< Val extends Addable< Val >, U extends Addable< U >, L extends Node< U > >.Assignment< Val extends Addable< Val >, U extends Addable< U > >.utility

The utility belonging to the assignment.

Referenced by Assignment(), compareTo(), and toString().


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