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