13 #ifndef Function0HppIncluded 14 #define Function0HppIncluded 116 Serial RequiredFuncSerial()
const;
117 void setRequiredFuncSerial(Serial
const RequiredFuncSerial);
119 static void setRequirement(
Function *
const pFunction);
120 static void unsetRequirement(
Function *
const pFunction);
121 static void setEnforcement(
Function *
const pFunction);
122 static void unsetEnforcement(
Function *
const pFunction);
124 Bool RequiredFunc()
const;
125 Bool EnforcedFunc()
const;
126 Bool DeferedFunc()
const;
130 Bool mDeferedNotPrompt;
131 Serial mRequiredFuncSerial;
133 #endif // ComputeLazyHalf 157 #if SimulDownwardCache 158 virtual void syncSimulCacheClock();
174 kb<Serial>
const ParamPatrons;
193 static Bool
iof(InputType
const & Left, InputType
const & Right);
204 typedef t2<Expression *,ParamSpecType> InputType;
205 static Bool
iof(InputType
const & Left, InputType
const & Right);
210 Expression *
const *
const pParamExprs,
212 Index *
const pParamIndexes =
nullptr);
215 void setParamPatron(Serial
const ParamSerial, Serial
const PatronSerial);
216 xrl< xb<Serial> >
const mVarUpdatableParams;
217 #endif//ComputeDownward 220 #if UpwardFuncVarToFactorSerialArrayMapNotHash 221 kb<Serial>
const * mFuncVarToFactorSerialMap;
223 xhmi<Serial,Serial>
const mFuncVarToFactorSerialMap;
226 #if ComputeDownward && !ComputeUpward 227 #if DownwardFuncVarToFactorSerialMap == FuncVarToFactorSerialArrayMapAtFunc 228 kb<Serial>
const * mFuncVarToFactorSerialMap;
229 #elif DownwardFuncVarToFactorSerialMap == FuncVarToFactorSerialHashMapAtFunc 230 xhmi<Serial,Serial>
const mFuncVarToFactorSerialMap;
242 Clock mExecBatchClock;
244 #if SimulDownwardFixed 245 Clock mSimulFixedClock;
247 #if SimulDownwardFlexi 248 #if UseOrnamentalFuncFlexiClock 249 Clock mSimulFlexiClock;
251 #endif // SimulDownwardFlexi 252 #if SimulDownwardCache 253 Clock mSimulCacheClock;
257 Bool needExecParamComputation();
259 #if SimulDownwardCache 260 Bool needSimulCacheComputation();
262 #if SimulDownwardFixed 263 Bool needSimulFixedParamComputation();
265 #if SimulDownwardFlexi 266 Bool needSimulFlexiParamComputation();
286 kll<Serial> mExecChangedParams;
287 void clearExecChangedParams();
290 kll<Serial> mSimulChangedParams;
291 void clearSimulChangedParams();
295 #endif //ComputeUpward 303 Bool BacklogExists()
const;
305 void performLikelyUndo(Serial
const ParamSerial);
306 void performScalarUndo(Serial
const ParamSerial);
307 void performVectorUndo(Serial
const ParamSerial);
309 virtual void undoScalars(Serial
const ParamSerial) = 0;
310 virtual void undoVectors(Serial
const ParamSerial) = 0;
312 void setScalarUndoDefined(Bool
const SetNotUnset);
313 void setVectorUndoDefined(Bool
const SetNotUnset);
315 void setupScalarUndoParams();
316 virtual void setupUndoParams() = 0;
319 virtual void notifyDeferedParams() = 0;
320 virtual void notifyEnforcedParams() = 0;
321 #endif //ComputeLazyHalf 323 kll<Serial> mBacklogParams;
324 klf<Serial> * mScalarUndoneParams;
326 Bool
const mScalarUndoDefined;
327 Bool
const mVectorUndoDefined;
339 void listExecParams();
340 void markExecParams();
342 klf<Serial> mLabelExecParams;
343 xb<Serial>
const * mBlockExecParams;
346 #if SimulDownwardFixed 347 void listSimulFixedParams();
348 void markSimulFixedParams();
349 void enumSimulFixedParams(Bool
const MarkNotList);
351 klf<Serial> mLabelSimulFixedParams;
352 xb<Serial>
const * mBlockSimulFixedParams;
355 #if SimulDownwardFlexi 356 void setupSimulFlexiLabels();
357 void listSimulFlexiParams();
358 void markSimulFlexiParams();
359 void enumSimulFlexiParams(Bool
const MarkNotList);
361 klf<Serial> * mLabelSimulFlexiParams;
362 xb<Serial>
const * mBlockSimulFlexiParams;
363 #endif//SimulDownwardFlexi 367 static xb<Serial>
const * ProxyParamBlock();
369 #if MultiVarExecDownward 370 xb<Serial> * mExecMergeBlock;
373 #if MultiVarFixedSimulDownward 374 xb<Serial> * mSimulFixedMergeBlock;
376 #if MultiVarFlexiSimulDownward 377 xb<Serial> * mSimulFlexiMergeBlock;
408 #endif//Function0HppIncluded virtual void syncSimulBatchClock()
Synchronize the simulation batch clock.
Definition: expression1.hpp:797
Functions that depend on other expressions.
Definition: function0.hpp:31
virtual void syncExecBatchClock()
Synchronize the execution batch clock.
Definition: expression1.hpp:785
kb< ParamSpecType > const *const ParamSpecs
Parameter specifications i.e. how to use values and metrics.
Definition: function0.hpp:172
virtual ~Function()
Destructor.
Definition: function1.hpp:55
#define openKangarooSpace
Open the project namespace.
Definition: project.hpp:74
virtual void setupComputation()
Set up various things for computation.
Definition: function1.hpp:1098
ParamOrder
Parameter specification ordering.
Definition: parameter.hpp:63
virtual Identifier CareTabuModel() const
Care for any tabu model?
Definition: function1.hpp:1533
xb< Variable * > const FactorVars
Factor variables that this function transitively depends on.
Definition: function0.hpp:177
Variable locking manager.
Definition: varlock0.hpp:36
void setFuncSerial(Serial const pSerial)
Set function serial.
Definition: function1.hpp:39
kb< Expression * > const ParamExprs
Parameter expressions that this function immediately depends on.
Definition: function0.hpp:171
static Serial defineWithinSystem(Function *const pFunction)
Define the function in the system.
Definition: function1.hpp:1619
void setRootFuncSerial(Serial const RootFuncSerial)
Set the root function serial with the system.
Definition: function1.hpp:510
Hash calcExprHash() const
Calculate expression hash value.
Definition: function1.hpp:855
virtual Bool CareFactorSerial() const
Care factor serial?
Definition: function1.hpp:1588
Tabu heuristic base class.
Definition: tabubase0.hpp:40
SizeTypes< sizeof(void *)>::UnsignedType Identifier
Class identifiers.
Definition: datatypes.hpp:349
void setParameters(ParamOrder const pParamOrder, Dim const ParamCount, Expression *const *const pParamExprs, ParamSpecType const *const pParamSpecs=nullptr, Index *const pParamIndexes=nullptr)
Set the parameters, if unordered then expression pointers along with indexes (if given) are sorted...
Definition: function1.hpp:927
Abstract variable class.
Definition: variable0.hpp:86
Serial FuncVarToFactorSerial(Serial const VarSerial) const
Find the factor serial for a given variable serial.
Definition: function1.hpp:1155
static Bool iof(InputType const &Left, InputType const &Right)
Ordering operator.
Definition: function1.hpp:903
Serial const FuncSerial
Unique over all functions.
Definition: function0.hpp:38
Serial mRootFuncSerial
Root function serial in the system.
Definition: function0.hpp:390
Serial RootFuncSerial() const
The root function serial within the system.
Definition: function1.hpp:498
virtual void computeTabuEffect()
Compute the tabu effect upon callback.
Definition: function1.hpp:1544
void defineRootWithinSystem()
Define as a root within the system.
Definition: function1.hpp:1605
Dereferenced order for expressions.
Definition: function0.hpp:201
virtual Bool equate(Expression const &that) const override
Compare expressions for equality.
Definition: function1.hpp:879
virtual TabuBase const * CareTabuInstance() const
Which tabu instance to care for.
Definition: function1.hpp:1555
void activateLazyHalfAutoExec(Bool const SetNotUnset)
Activate auto execution in lazy half mode.
Definition: function1.hpp:155
virtual void computeLockEffect()
Compute the lock effect up on callback.
Definition: function1.hpp:1577
virtual void adjustMemAuto() override
Adjust memory requirement automatically.
Definition: function1.hpp:551
Constraint-based local search systems.
Definition: system0.hpp:45
BitStr ParamSpecType
Parameter specification type.
Definition: parameter.hpp:76
Bool ActiveLazyHalfAutoExec() const
Whether auto execution in lazy half mode is active?
Definition: function1.hpp:138
Index const NestingIndex
Function nesting index; starts from 0.
Definition: function0.hpp:276
virtual void computeFinal()=0
Computation when function is final.
Function(System *const pSystem, Dim const ParamCount)
Param constructor.
Definition: function1.hpp:763
#define closeKangarooSpace
Close the project namespace.
Definition: project.hpp:75
virtual Bool CareLockEffect() const
Care for lock effect?
Definition: function1.hpp:1566
Dereferenced order for expressions.
Definition: function0.hpp:189
virtual void syncExecClock() override
Synchronize the execution clock.
Definition: function1.hpp:304
Abstract expressions.
Definition: expression0.hpp:41
nrl< xb< Serial > > const ParamFactors
Variables that parameters depend on. Factor serial of the function are use to represent parameter var...
Definition: function0.hpp:178