40 return sqrt( a.
_x * a.
_x + a.
_y * a.
_y );
154 case 1:
return a.
x();
166 _x(
in, initial_value.x()),
167 _y(
in, initial_value.y()),
177 _x(in, initial_value.x()),
178 _y(in, initial_value.y()),
221 : input1(i1), input2(i2)
243 Dprintf((
"ctr: _Add2D[%p](in1,in2)",
this));
260 Dprintf((
"ctr: _Sub2D[%p](in1,in2)",
this));
277 Dprintf((
"ctr: _Mul2D1D[%p](in1,in2)",
this));
295 Dprintf((
"ctr: _Div2D[%p](in1_2D,in2)",
this));
323 Dprintf((
"ctr: _UMinus2D[%p](in)",
this));
404 case x:
return a.
x();
405 case y:
return a.
y();
2D vector value that can't be changed
Integrator2D & operator=(const Value2D &a)
virtual Value2D Value() override
simlib3::Integrator2D::special_input in
double Value() override
the state of integrator
Special variable (can't be changed at simulation time)
Parameter2D & operator=(const Value2D &x)
virtual void _Eval() override
evaluate block (with loop detection)
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
_Add2D(Input2D a, Input2D b)
virtual void _Eval() override
virtual Value2D Value() override
virtual void _Eval() override
_Div2D(Input2D a, Input b)
virtual Value2D Value() override
virtual void _Eval() override
_Mul2D1D(Input2D a, Input b)
virtual Value2D Value() override
virtual void _Eval() override
virtual Value2D Value() override
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
_ScalarProduct2D(Input2D a, Input2D b)
virtual void _Eval() override
evaluate block (with loop detection)
virtual void _Eval() override
_Sub2D(Input2D a, Input2D b)
virtual Value2D Value() override
virtual void _Eval() override
virtual Value2D Value() override
_XYpart(Input2D a, WhichPart w)
virtual double Value() override
get block output value this method should be defined in classes derived from aContiBlock
virtual void _Eval() override
evaluate block (with loop detection)
continuous block with single input and alg.
aContiBlock2D1(Input2D i)
continuous block vith 2 inputs and alg.
aContiBlock2D2(Input2D i1, Input2D i2)
aContiBlock2D3(Input2D i1, Input2D i2, Input2D i3)
Abstract 2D block with single 2D output.
virtual Value2D Value()=0
abstract base for continuous blocks with single output suitable for expression-tree building and eval...
Internal header file for SIMLIB/C++.
#define SIMLIB_internal_error()
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
Input operator-(Input a, Input b)
block operator -
void SIMLIB_error(const enum _ErrEnum N)
print error message and abort program
Input operator+(Input a, Input b)
block operator +
double abs(const Value2D &a)
Input Ypart(Input2D a)
get y part of (x,y) vector value
Input Xpart(Input2D a)
get x part of (x,y) vector value
Input operator*(Input a, Input b)
block operator *
double scalar_product(const Value2D &a, const Value2D &b)
Input ScalarProduct(Input2D x, Input2D y)
dot product: xvec . yvec
static Constant2D Zero2D(0, 0)
SIMLIB_Phase_t SIMLIB_Phase
Input operator/(Input a, Input b)
block operator /
Input2D UnitVector(Input2D x)
make unit vector from input (Abs(output_vec)==1)
2D vector block extension
Main SIMLIB/C++ interface.