Overview | Group | Tree | Graph | Index | Concepts |
The IloBestSelector
template class is a subclass of
selector that implements the selection of an object of type
IloObject
provided by a container of
typeIloContainer
based on:
IloVisitor<IloObject,IloContainer>
IloPredicate<IloObject>
IloComparator<IloObject>
The selector will select an instance of IloObject
visited by the visitor that satisfies the predicate and that is the
best according to the comparator.
In the case where no visitor is provided, the selector uses the default
visitor provided for the template
<IloObject,IloContainer>
(see macro
ILODEFAULTVISITOR
). In the case where no
predicate is provided, the default is a predicate that always
returns IloTrue
. In the case where no comparator is provided,
the default is a comparator that considers all objects as being
equal.
For more information, see Selectors.
See Also:
IloVisitor, IloPredicate, IloComparator
Constructor Summary | |
---|---|
public | IloBestSelector(IloMemoryManager manager)
Creates a selector returning an |
public | IloBestSelector(IloVisitor< IloObject, IloContainer > visitor, IloPredicate< IloObject > pred=0, IloComparator< IloObject > cmp=0)
Creates a selector returning an |
public | IloBestSelector(IloPredicate< IloObject > pred, IloComparator< IloObject > cmp=0)
Creates a selector returning an |
public | IloBestSelector(IloComparator< IloObject > cmp)
Creates a selector returning an |
public | IloBestSelector(IloVisitor< IloObject, IloContainer > visitor, IloComparator< IloObject > cmp)
Creates a selector returning an |
Method Summary | |
---|---|
public IloComparator< IloObject > | getComparator() const Returns the selector's comparator. |
public IloPredicate< IloObject > | getPredicate() const Returns the selector's predicate. |
public IloVisitor< IloObject, IloContainer > | getVisitor() const Returns the selector's visitor. |
Inherited Methods from IloSelector |
---|
select |
Constructor Detail |
---|
IloObject
from an IloContainer
.
This constructor creates a
selector that uses a default visitor allocated on the memory mananger
manager
.
IloObject
from an IloContainer
.
This constructor creates a selector that uses the
visitor visitor
, the predicate pred
, and
the comparator cmp
given as arguments.
IloObject
from an IloContainer
.
This constructor creates a selector that uses the
predicate pred
and the comparator cmp
given as arguments.
IloObject
from an IloContainer
.
This constructor creates a selector that uses the
comparator cmp
given as argument.
IloObject
from an IloContainer
.
This constructor creates a selector that uses the
visitor visitor
and the comparator cmp
given as arguments.
Method Detail |
---|
This member function returns the comparator associated with the invoking selector.
This member function returns the predicate associated with the invoking selector.
This member function returns the visitor associated with the invoking selector.