00001 #include <TooN/TooN.h> 00002 #include <TooN/helpers.h> 00003 00004 using namespace std; 00005 using namespace TooN; 00006 00007 int main() 00008 { 00009 double data[]={1, 2, 3, 4, 5, 6}; 00010 00011 00012 cout << Matrix<2,3,double, Reference::RowMajor> (data) << endl; 00013 cout << Matrix<2,-1,double, Reference::RowMajor> (data,2,3) << endl; 00014 cout << Matrix<-1,3,double, Reference::RowMajor> (data,2,3) << endl; 00015 cout << Matrix<-1,-1,double, Reference::RowMajor> (data,2,3) << endl; 00016 00017 00018 00019 cout << Matrix<2,3,double, Reference::ColMajor> (data) << endl; 00020 cout << Matrix<2,-1,double, Reference::ColMajor> (data,2,3) << endl; 00021 cout << Matrix<-1,3,double, Reference::ColMajor> (data,2,3) << endl; 00022 cout << Matrix<-1,-1,double, Reference::ColMajor> (data,2,3) << endl; 00023 00024 cout << wrapVector<6>(data) << endl; 00025 cout << wrapVector(data, 6) << endl; 00026 cout << Vector<6,double,Reference> (data) << endl; 00027 cout << Vector<-1,double,Reference> (data,6) << endl; 00028 00029 };