Overview | Group | Tree | Graph | Index | Concepts |
The IloEvaluator
template class is the base class
for all evaluators. An evaluator is a class that
implements an evaluation on an object (using operator()
)
and returns an IloNum
value. Such classes can be used (along
with classes of IloPredicate
) to
parameterize selectors used in goal-based search.
Evaluators can easily be built by using the
ILOEVALUATOR0
macros or by composing
existing evaluators and predicates.
For more information, see Selectors.
See Also:
IloPredicate, IloTranslator, IloComparator
Method Summary | |
---|---|
public IloComparator< IloObject > | makeGreaterThanComparator() const Creates an evaluator-based comparator. |
public IloComparator< IloObject > | makeLessThanComparator() const Creates an evaluator-based comparator. |
public IloNum | operator()(IloObject o, IloAny nu=0) const Evaluates an object. |
Method Detail |
---|
This member function returns a comparator based on the invoking evaluator that prefers the objects with the highest value. More precisely, the comparator will return 1, 0, or -1 if the value of its left hand side is respectively greater than, equivalent, or less than the value of its right hand side.
This member function returns a comparator based on the invoking evaluator that prefers the objects with the smallest value. More precisely, the comparator will return 1, 0, or -1 if the value of its left hand side is respectively less than, equivalent, or greater than the value of its right hand side.
This operator implements the evaluation of o
, an instance of
class IloObject
, given a context nu
. If
the evaluator is a composite evaluator (see operators on
evaluators), the context is also passed to the
components (evaluators or predicates) of the composite
evaluator.