12 #ifndef ValueVectorFunctionHppIncluded 13 #define ValueVectorFunctionHppIncluded 31 template <
typename value,
typename metric = value, VectorType vectorType = FactorVector>
46 Serial const FieldSerial) const override final;
50 (
Order const MaxiOrMini) const override final;
68 ValueVectorFunction(
System * const pSystem,
Order const MaxiOrMini, Dim const ParamCount);
69 ValueVectorFunction(ValueVectorFunction<value,metric,vectorType> && that) noexcept = delete;
70 ValueVectorFunction(ValueVectorFunction<value,metric,vectorType> const & that) = delete;
71 ValueVectorFunction<value,metric,vectorType> & operator =
72 (ValueVectorFunction<value,metric,vectorType> && that) noexcept = delete;
73 ValueVectorFunction<value,metric,vectorType> & operator =
74 (ValueVectorFunction<value,metric,vectorType> const & that) = delete;
101 virtual void setupUndoPatrons() override final;
102 virtual
void undoVectors(Serial const ParamSerial) override;
105 #endif // ComputeLazy 123 template<
typename value,
typename metric, VectorType vectorType>
125 Order const MaxiOrMini, Dim
const ParamCount) :
126 Function(pSystem, ParamCount), mExprValueRecord(nullptr),
127 mExprVectorRecord(nullptr), mMetricOptiOrder(MaxiOrMini)
138 template<
typename value,
typename metric, VectorType vectorType>
152 template<
typename value,
typename metric, VectorType vectorType>
156 return Wrap(mExprValueRecord->ExecData());
165 template<
typename value,
typename metric, VectorType vectorType>
177 template<
typename value,
typename metric, VectorType vectorType>
181 return mExprVectorRecord->FieldCount();
189 template<
typename value,
typename metric, VectorType vectorType>
191 (
Order const MaxiOrMini, Serial
const FieldSerial)
const 195 return Wrap(mExprVectorRecord->Field(FieldSerial).ExecData());
204 template<
typename value,
typename metric, VectorType vectorType>
208 return mExprValueRecord->ExecData();
217 template<
typename value,
typename metric, VectorType vectorType>
229 template<
typename value,
typename metric, VectorType vectorType>
231 (
Order MaxiOrMini, Serial
const FieldSerial)
const 235 return mExprVectorRecord->Field(FieldSerial).ExecData();
244 template<
typename value,
typename metric, VectorType vectorType>
256 template<
typename value,
typename metric, VectorType vectorType>
269 template<
typename value,
typename metric, VectorType vectorType>
282 template<
typename value,
typename metric, VectorType vectorType>
295 template<
typename value,
typename metric, VectorType vectorType>
308 template<
typename value,
typename metric, VectorType vectorType>
312 if (MaxiOrMini == mMetricOptiOrder)
324 template<
typename value,
typename metric, VectorType vectorType>
337 template<
typename value,
typename metric, VectorType vectorType>
350 template<
typename value,
typename metric, VectorType vectorType>
354 if (mExprValueRecord) mExprValueRecord->syncExecClock();
355 if (mExprVectorRecord) mExprVectorRecord->syncExecClock();
364 template<
typename value,
typename metric, VectorType vectorType>
368 if (mExprValueRecord) mExprValueRecord->syncSimulClock();
378 template<
typename value,
typename metric, VectorType vectorType>
392 template<
typename value,
typename metric, VectorType vectorType>
396 setupScalarUndoPatrons();
397 setupVectorUndoPatrons();
408 template<
typename value,
typename metric, VectorType vectorType>
422 #endif//ValueVectorFunctionHppIncluded virtual void syncExecClock()
Synchronise the execution clock.
Definition: valueVectorFunction.hpp:351
Order
Orders.
Definition: datatypes.hpp:156
virtual VectorType ExprVectorType() const overridefinal
Expression vector type.
Definition: valueVectorFunction.hpp:245
Clock SimulClock() const
Get the simulation clock.
Definition: system1.hpp:249
Functions that depend on other expressions.
Definition: function0.hpp:31
virtual Wrap ExecWrappedValue() const overridefinal
Execution value wrap.
Definition: valueVectorFunction.hpp:153
void setExprModel(Identifier const pModel)
Set expression model.
Definition: expression1.hpp:592
value ValueType
Value type.
Definition: valueVectorFunction.hpp:39
value ExecValue() const
Execution value.
Definition: valueVectorFunction.hpp:205
ValueRecord< value > * mExprValueRecord
Point to the value record.
Definition: valueVectorFunction.hpp:81
#define openKangarooSpace
Open the project namespace.
Definition: project.hpp:74
virtual Serial ValueTypeSerial() const overridefinal
Value type serial.
Definition: valueVectorFunction.hpp:270
virtual void syncSimulClock()
synchronise the simulation clock.
Definition: valueVectorFunction.hpp:365
Vector record to store expression vector metrics.
Definition: vectorrecord.hpp:50
Order MetricOptiOrder() const
Metric optimisation ordering.
Definition: valueVectorFunction.hpp:257
virtual Wrap ExecWrappedVectorField(Order const MaxiOrMini, Serial const FieldSerial) const overridefinal
Execution value wrap of a vector field.
Definition: valueVectorFunction.hpp:191
virtual VectorRecord< metric > const * ExprVectorRecord(Order const MaxiOrMini) const overridefinal
Expression metric.
Definition: valueVectorFunction.hpp:309
constexpr char const * kVectorUndoNotDefined
Vector undo not defined.
Definition: messages.hpp:32
Index for Library Frames.
value SimulValue() const
Simulation value.
Definition: valueVectorFunction.hpp:218
void defineExprValueRecord()
Define expression value.
Definition: valueVectorFunction.hpp:325
VectorType
Vector type.
Definition: vectorrecord.hpp:31
Unique identifier of a class.
metric MetricType
Metric type.
Definition: valueVectorFunction.hpp:40
void defineExprVectorRecord(Dim const FieldCount)
Define vector record.
Definition: valueVectorFunction.hpp:338
virtual Wrap ExecWrappedScalar(Order const MaxiOrMini) const
Execution scalar wrap of the expression—throws error.
Definition: valueVectorFunction.hpp:379
Constraint-based local search systems.
Definition: system0.hpp:45
Value vector function model.
Definition: valueVectorFunction.hpp:32
Order const mMetricOptiOrder
Maximisation or minimisation?
Definition: valueVectorFunction.hpp:83
System *const SysMaster
The system that contains this expression.
Definition: expression0.hpp:281
ValueVectorFunction(System *const pSystem, Order const MaxiOrMini, Dim const ParamCount)
Param constructor.
Definition: valueVectorFunction.hpp:124
#define closeKangarooSpace
Close the project namespace.
Definition: project.hpp:75
metric ExecVectorField(Order MaxiOrMini, Serial const FieldSerial) const
Execution metric of a vector field.
Definition: valueVectorFunction.hpp:231
virtual ValueRecord< value > const * ExprValueRecord() const overridefinal
Expression value.
Definition: valueVectorFunction.hpp:296
virtual ~ValueVectorFunction()
Destructor.
Definition: valueVectorFunction.hpp:139
VectorRecord< metric > * mExprVectorRecord
Point to the vector record.
Definition: valueVectorFunction.hpp:82
constexpr char const * kExprVectorNotDefined
Vector not defined for the expression.
Definition: messages.hpp:140
Wrappers for values.
Definition: wrapper.hpp:68
Wrapper Wrap
Shortcut for Wrapper.
Definition: wrapper.hpp:321
virtual void syncExecClock() override
Synchronize the execution clock.
Definition: function1.hpp:304
Represents data type meta.
Definition: datatypes.hpp:73
Value records store expression values.
Definition: valuerecord.hpp:32
virtual Serial MetricTypeSerial() const overridefinal
Metric type serial.
Definition: valueVectorFunction.hpp:283
constexpr char const * kExprScalarNotDefined
Scalar not defined for the expression.
Definition: messages.hpp:139
virtual Dim VectorFieldCount() const overridefinal
Number of fields in the vectors.
Definition: valueVectorFunction.hpp:178
virtual void syncSimulClock()
Synchronize the simulation clock.
Definition: expression1.hpp:771
virtual Wrap SimulWrappedValue() const overridefinal
Simulation value wrap.
Definition: valueVectorFunction.hpp:166