itpp_sci  1.0.0
it++ based simulation framework for scicoslab, scilab and scipy
_sci_if_op.hpp
1 /*xxx
2 * \brief - define stack - it++ conversion operators - implementation is target dependent
3 * \author maki
4 */
5 
6 #ifndef SCI_PUSH_OP_HPP
7 #define SCI_PUSH_OP_HPP
8 
9 #include <itpp\itbase.h>
10 #include "_sci_if_var_struct.h"
11 
12 #define C_OFFSET(i,j,ROWS,COLS) (j+i*(COLS))
13 #define F_OFFSET(i,j,ROWS,COLS) (i+j*(ROWS))
14 
15 using namespace itpp;
16 using namespace std;
17 
18 /*
19 you can't implement this
21 void operator <=(double &v, var_struct *p_sci);
23 void operator <=(var_struct *p_sci, const double &v);
24 - both operand are considered to be standard type
25 */
26 
27 void push_to_ext_stack(var_struct *p_sci, const double &v);
28 void push_to_ext_stack(var_struct *p_sci, const complex<double> &v);
29 void push_to_ext_stack(var_struct *p_sci, const int &v);
30 void push_to_ext_stack(var_struct *p_sci, const bool &v);
31 
32 void pop_from_ext_stack(double &v, const var_struct *p_sci);
33 void pop_from_ext_stack(complex<double> &v, const var_struct *p_sci);
34 void pop_from_ext_stack(int &v, const var_struct *p_sci);
35 void pop_from_ext_stack(bool &v, const var_struct *p_sci);
36 
37 
38 // vec <= p_var_struct; copy var_struct to vec
39 void operator <=(vec &v, var_struct *p_sci);
40 // p_var_struct <= vec; copy vec to var_struct
41 void operator <=(var_struct *p_sci, const vec &v);
42 
43 // ivec <= p_sci; copy var_struct to ivec
44 void operator <=(ivec &iv, var_struct *p_sci);
45 // p_sci <= ivec; copy ivec to var_struct
46 void operator <=(var_struct *p_sci, const ivec &iv);
47 
48 // bvec <= p_sci; copy var_struct to bvec
49 void operator <=(bvec &b, var_struct *p_sci);
50 // p_sci <= bvec; copy bvec to var_struct
51 void operator <=(var_struct *p_sci, const bvec &b);
52 
53 // cvec <= p_var_struct; ; copy var_struct to cvec
54 void operator <=(cvec &cv, var_struct *p_sci);
55 // p_var_struct <= cvec ; copy vec to sci
56 void operator <=(var_struct *p_sci, const cvec &cv);
57 
58 // mat <= p_sci; copy sci_mat to mat
59 void operator <=(mat &m, var_struct *p_sci);
60 // p_sci <= mat; copy mat to sci_mat
61 void operator <=(var_struct *p_sci, const mat &m);
62 
63 // imat <= p_sci; copy var_struct to imat
64 void operator <=(imat &m, var_struct *p_sci);
65 // p_sci <= mat; copy imat to var_struct
66 void operator <=(var_struct *p_sci, const imat &m);
67 
68 // bmat <= p_sci; copy var_struct to mat
69 void operator <=(bmat &m, var_struct *p_sci);
70 // p_sci <= bat; copy bmat to var_struct
71 void operator <=(var_struct *p_sci, const bmat &m);
72 
73 // cmat <= p_sci; copy var_struct to cmat
74 void operator <=(cmat &cm, var_struct *p_sci);
75 // p_sci <= mat; copy cmat to var_struct
76 void operator <=(var_struct *p_sci, const cmat &cm);
77 
78 #endif
Definition: _sci_assert.cpp:35