00001 #include <TooN/TooN.h> 00002 #include <TooN/sl.h> 00003 00004 #include <iostream> 00005 #include <iomanip> 00006 00007 using namespace TooN; 00008 using namespace std; 00009 00010 int main(int , char ** ){ 00011 SL<3> h(makeVector(1,0,-1,0,0,0,0,0)); 00012 cout << h << endl; 00013 cout << h.inverse() << endl; 00014 cout << SL<3>::exp(makeVector(-1,0,1,0,0,0,0,0)) << endl; 00015 cout << h * h.inverse() << endl; 00016 h *= h.inverse(); 00017 cout << h << endl; 00018 00019 for(int i = 0; i < SL<3>::dim; ++i) 00020 cout << "generator " << i << "\n" << SL<3>::generator(i) << endl; 00021 00022 for(int i = 0; i < SL<2>::dim; ++i) 00023 cout << "generator " << i << "\n" << SL<2>::generator(i) << endl; 00024 00025 cout << SL<2>::exp(makeVector(1,2,3)) << endl; 00026 00027 h = SL<3>::exp(makeVector(1,0,-1,0,0,0,1,0)); 00028 00029 cout << h << "\n"; 00030 Vector<3> t = makeVector(0,1,2); 00031 cout << "with vector " << t << "\n"; 00032 cout << h * t << "\n"; 00033 cout << t * h << "\n"; 00034 00035 Matrix<3,5> m = Zeros; 00036 m[0] = makeVector(0,1,2,3,4); 00037 m[1] = makeVector(1,2,3,4,-5); 00038 m[2] = makeVector(2,3,4,5,8); 00039 00040 cout << "with matrix " << m << "\n"; 00041 cout << h * m << "\n"; 00042 cout << m.T() * h << "\n"; 00043 00044 cout << endl; 00045 00046 return 0; 00047 }