本文整理汇总了C++中Levels::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ Levels::push_back方法的具体用法?C++ Levels::push_back怎么用?C++ Levels::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Levels
的用法示例。
在下文中一共展示了Levels::push_back方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeBoundaries
/**
* Compute a vector of maximal levels and store information about states.
*/
void computeBoundaries() {
// Compute naive bounds.
for (const SpecieID ID : cscope(model.species)) {
// Maximal values of species
names.push_back(model.species[ID].name);
maxes.push_back(model.species[ID].max_value);
mins.push_back(0);
}
// Add experiment constraints.
ConstraintParser * cons_pars = new ConstraintParser(model.species.size(), ModelTranslators::getMaxLevel(model));
cons_pars->addBoundaries(maxes, true);
cons_pars->applyFormula(ModelTranslators::getAllNames(model), property.getExperiment());
cons_pars->status();
// Compute refined boundaries.
mins = cons_pars->getBounds(false);
maxes = cons_pars->getBounds(true);
rng::transform(maxes, mins, back_inserter(range_size), [](const ActLevel max, const ActLevel min) {
return max - min + 1;
});
}
示例2: new_level
/** Create a new (empty) level. This is the level into which the next higher level's vertices will be partitioned. The
* return value is the new level number. */
size_t new_level(const InputValues &inputs) {
levels.push_back(Level(inputs));
return levels.size()-1;
}