|
Revision 147, 1.0 kB
(checked in by smidl, 17 years ago)
|
|
zapomenuty soubor
|
| 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 ( "1","{a }","3","0"); |
|---|
| 15 | RV b = RV ( "2","{b }","2","0"); |
|---|
| 16 | RV c = RV ( "3","{c }","1","0"); |
|---|
| 17 | RV ef = RV ( "4 5","{e f }", " 1 1", "0 0" ); |
|---|
| 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 | //Exit program: |
|---|
| 45 | |
|---|
| 46 | //getchar(); |
|---|
| 47 | return 0; |
|---|
| 48 | |
|---|
| 49 | } |
|---|