This function loops over the "inputFeatures" option to find (weight,featureDef)-pairs and adds them to DistributedAccess.
Definition at line 54 of file mainPrecomputeKernelMatrix.cpp. References Impala::CmdOptions::GetString(), ILOG_DEBUG, and ILOG_VAR. Referenced by Precompute(). 00055 { 00056 ILOG_VAR(Impala.Application.Precompute.CheckFeatures); 00057 00058 /* add input features through the INI file */ 00059 String inputFeatures = options.GetString("inputFeatures"); 00060 if (!inputFeatures.empty()) 00061 { 00062 ILOG_DEBUG("imput features: "<< inputFeatures); 00063 Util::StringParser p(inputFeatures); 00064 while (!p.TheEnd()) 00065 { 00066 double weight = p.GetDouble(); 00067 ILOG_DEBUG("w: "<<weight); 00068 if (weight == 0.0) 00069 { 00070 ILOG_ERROR_HEADNODE("\"" << inputFeatures << 00071 "\" contains a zero weight"); 00072 return false; 00073 } 00074 String name = p.GetString(' ', false); 00075 if (name.empty()) 00076 { 00077 ILOG_ERROR_HEADNODE("inputFeatures: no name for weight"); 00078 return false; 00079 } 00080 ILOG_DEBUG("n: "<< name); 00081 String indexCat = options.GetString("featureIndexCat"); 00082 FeatureLocator loc(thisSet->GetLocator(), false, true, indexCat, 00083 name, ""); 00084 if (!FeatureTableRepository().Exists(loc)) 00085 { 00086 ILOG_ERROR_HEADNODE("Could not open \"" << name << "\""); 00087 return false; 00088 } 00089 da->AddFeature(name, weight, -1); 00090 } 00091 } 00092 return true; 00093 }
Here is the call graph for this function:
|