#include <OptVar.hh>
Inherits OptVar.
Inheritance diagram for UnivOptVar:
Public Member Functions | |
QECODE_EXPORT | UnivOptVar (int scope, OptVar *zevar, Aggregator *agg) |
constructor for an universal optimization variable | |
virtual QECODE_EXPORT int | getVal (Strategy s) |
returns value of this optimization variable in the substrategy s | |
virtual QECODE_EXPORT int | getScope () |
returns the scope where this optimization variable belong | |
virtual | ~UnivOptVar () |
Private Attributes | |
int | scopeId |
OptVar * | var |
Aggregator * | fct |
This class defines a universal optimization variable. Such a variable represents the result of an aggregator on the set of values that an inner optimization variable takes in every sub-strategy of the current scope.
Definition at line 103 of file OptVar.hh.
UnivOptVar::UnivOptVar | ( | int | scope, | |
OptVar * | zevar, | |||
Aggregator * | agg | |||
) |
constructor for an universal optimization variable
Builds a universal optimzation variable at a given (universal) scope, that will represent the result of the agg aggregator on the set of all values taken by the optimization variable zevar in each substrategy below the current point.
scope | the scope where this optimization variable belong | |
zevar | the inner optimization variable that will be aggregated | |
agg | the aggregator function to be used |
int UnivOptVar::getVal | ( | Strategy | s | ) | [virtual] |
returns value of this optimization variable in the substrategy s
Implements OptVar.
Definition at line 52 of file OptVar.cc.
References Strategy::degree(), Aggregator::eval(), fct, Strategy::getChild(), OptVar::getVal(), Strategy::isDummy(), Strategy::isFalse(), Strategy::isTrue(), Strategy::quantifier(), Strategy::scope(), scopeId, and var.
int UnivOptVar::getScope | ( | ) | [virtual] |
int UnivOptVar::scopeId [private] |
OptVar* UnivOptVar::var [private] |
Aggregator* UnivOptVar::fct [private] |