本文整理汇总了C++中Observation::at方法的典型用法代码示例。如果您正苦于以下问题:C++ Observation::at方法的具体用法?C++ Observation::at怎么用?C++ Observation::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Observation
的用法示例。
在下文中一共展示了Observation::at方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: readSharedRAbundVectors
void ClassifySvmSharedCommand::readSharedRAbundVectors(vector<SharedRAbundVector*>& lookup, GroupMap& designMap, LabeledObservationVector& labeledObservationVector, FeatureVector& featureVector) {
for ( int j = 0; j < lookup.size(); j++ ) {
//i++;
vector<individual> data = lookup[j]->getData();
Observation* observation = new Observation(data.size(), 0.0);
string sharedGroupName = lookup[j]->getGroup();
string treatmentName = designMap.getGroup(sharedGroupName);
//std::cout << "shared group name: " << sharedGroupName << " treatment name: " << treatmentName << std::endl;
//labeledObservationVector.push_back(std::make_pair(treatmentName, observation));
labeledObservationVector.push_back(LabeledObservation(j, treatmentName, observation));
//std::cout << " j=" << j << " label : " << lookup[j]->getLabel() << " group: " << lookup[j]->getGroup();
for (int k = 0; k < data.size(); k++) {
//std::cout << " abundance " << data[k].abundance;
observation->at(k) = double(data[k].abundance);
if ( j == 0) {
featureVector.push_back(Feature(k, m->currentSharedBinLabels[k]));
}
}
//std::cout << std::endl;
// let this happen later?
//delete lookup[j];
}
}