UnivOptVar Class Reference

Universal optimization variable (aggregator result). More...

#include <OptVar.hh>

Inherits OptVar.

Inheritance diagram for UnivOptVar:

Inheritance graph
[legend]
Collaboration diagram for UnivOptVar:

Collaboration graph
[legend]
List of all members.

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
OptVarvar
Aggregatorfct

Detailed Description

Universal optimization variable (aggregator result).

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.


Constructor & Destructor Documentation

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.

Parameters:
scope the scope where this optimization variable belong
zevar the inner optimization variable that will be aggregated
agg the aggregator function to be used

Definition at line 46 of file OptVar.cc.

References fct, scopeId, and var.

virtual UnivOptVar::~UnivOptVar (  )  [inline, virtual]

Definition at line 120 of file OptVar.hh.


Member Function Documentation

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]

returns the scope where this optimization variable belong

Implements OptVar.

Definition at line 82 of file OptVar.cc.

References scopeId.


Member Data Documentation

int UnivOptVar::scopeId [private]

Definition at line 105 of file OptVar.hh.

Referenced by getScope(), getVal(), and UnivOptVar().

OptVar* UnivOptVar::var [private]

Definition at line 106 of file OptVar.hh.

Referenced by getVal(), and UnivOptVar().

Aggregator* UnivOptVar::fct [private]

Definition at line 107 of file OptVar.hh.

Referenced by getVal(), and UnivOptVar().


The documentation for this class was generated from the following files:
Generated on Tue Jun 10 18:32:02 2008 for qecode by  doxygen 1.5.2