- Main Page
- Related Pages
- Modules
- Classes
- Files

# itppconf.h

    00001 #include <libconfig.h++>
    00002 #include <itpp/itbase.h>
    00003
    00004 #ifndef ITPPCONF
    00005 #define ITPPCONF
    00006
    00007 using namespace libconfig;
    00008 using namespace bdm;
    00009
    00010 vec getVec(Setting &S){
    00011         vec tmp;
    00012         int len;
    00013         Setting::Type T=S.getType();
    00014         if(T==Setting::TypeArray) {
    00015                 len = S.getLength();
    00016                 tmp.set_length(len);
    00017                 for (int i=0; i<len;i++){
    00018                         switch (S[i].getType()) {
    00019                         case Setting::TypeFloat :
    00020                                 tmp[i]=double(S[i]);break;
    00021                         case Setting::TypeInt :
    00022                                 tmp[i]=int(S[i]);break;
    00023                         case Setting::TypeBoolean :
    00024                                 tmp[i]=bool(S[i]);break;
    00025                         }
    00026                 }
    00027         }
    00028         return tmp;
    00029 }
    00030
    00031 vec xxx(){return vec_1(3.2);}
    00032
    00033 #endif ITPPCONF