/*---  for parameters  ---*/
 virtual void resetParam(AzParam &p) {
   p.vStr(kw_dataproc, &s_dataproc); 
   dataproc = dataproc_Auto; 
   if (s_dataproc.length() <= 0 || 
       s_dataproc.compare("Auto") == 0); 
   else if (s_dataproc.compare("Sparse") == 0) dataproc = dataproc_Sparse; 
   else if (s_dataproc.compare("Dense") == 0)  dataproc = dataproc_Dense; 
   else {
     throw new AzException(AzInputNotValid, kw_dataproc, 
           "must be either \"Auto\", \"Sparse\", or \"Dense\"."); 
   }
 }
Esempio n. 2
0
 int desc2fno(const char *fnm) const {
   int fx; 
   for (fx = 0; fx < featNum(); ++fx) {
     AzBytArr s; 
     desc(fx, &s); 
     if (s.compare(fnm) == 0) {
       return fx; 
     }
   }
   return -1; 
 }
Esempio n. 3
0
 int equals(const char *kw) const {
   int fx; 
   for (fx = 0; fx < featNum(); ++fx) {
     AzBytArr s; 
     desc(fx, &s); 
     if (s.compare(kw) == 0) {
       return fx; 
     }
   } 
   return -1; 
 }