Revision 182, 1.1 kB
(checked in by smidl, 16 years ago)
|
compilation error!
|
Line | |
---|
1 | #include <itpp/itbase.h> |
---|
2 | #include "../bdm/stat/libBM.h" |
---|
3 | #include "../bdm/math/libDC.h" |
---|
4 | #include "../bdm/math/chmat.h" |
---|
5 | |
---|
6 | using namespace itpp; |
---|
7 | |
---|
8 | //These lines are needed for use of cout and endl |
---|
9 | using std::cout; |
---|
10 | using std::endl; |
---|
11 | |
---|
12 | int main() |
---|
13 | { |
---|
14 | RV a = RV ( "{a }","3"); |
---|
15 | RV b = RV ( "{b }","2"); |
---|
16 | RV c = RV ( "{c }"); |
---|
17 | RV ef = RV ("{e f }"); |
---|
18 | |
---|
19 | cout << "Add a and b"<<endl; |
---|
20 | RV ab = a; |
---|
21 | ab.add(b); |
---|
22 | cout << ab <<endl; |
---|
23 | |
---|
24 | cout << "Concat a,b and c "<<endl; |
---|
25 | RV abc = concat(ab,c); |
---|
26 | cout << abc <<endl; |
---|
27 | cout << "Structure of a,b,c "<<endl; |
---|
28 | str s =abc.tostr(); |
---|
29 | cout << s.ids <<endl; |
---|
30 | cout << s.times <<endl; |
---|
31 | |
---|
32 | cout << "Find a in abc "<<endl; |
---|
33 | cout << a.findself(abc)<<endl; |
---|
34 | cout << "Find abc in a "<<endl; |
---|
35 | cout << abc.findself(a)<<endl; |
---|
36 | |
---|
37 | cout << "Subtract b from abc"<<endl; |
---|
38 | RV ac = abc.subt(b); |
---|
39 | cout << ac <<endl; |
---|
40 | |
---|
41 | cout << "Data index of ac in abc"<<endl; |
---|
42 | cout << ac.dataind(abc) <<endl; |
---|
43 | |
---|
44 | cout<< "copy indeces between ba and ab" << endl; |
---|
45 | RV ba = b; |
---|
46 | ba.add(a); |
---|
47 | |
---|
48 | ivec ai; |
---|
49 | ivec bi; |
---|
50 | ba.dataind(ac,ai,bi); |
---|
51 | cout << "ba(" << ai <<")=ac(" << bi <<")"<<endl; |
---|
52 | |
---|
53 | //Exit program: |
---|
54 | |
---|
55 | //getchar(); |
---|
56 | return 0; |
---|
57 | |
---|
58 | } |
---|