本文整理汇总了C++中Coll类的典型用法代码示例。如果您正苦于以下问题:C++ Coll类的具体用法?C++ Coll怎么用?C++ Coll使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Coll类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: set_to_zero
void set_to_zero(Coll& collection, tag::std_vector, ashape::scal)
{
using math::zero;
typename Collection<Coll>::value_type ref, my_zero(zero(ref));
std::fill(collection.begin(), collection.end(), my_zero);
}
示例2: main
int main(int, char**) try {
dummies_.clear();
for(int i = 0; i < 12; ++i) dummies_.push_back(Dummy(i));
test(vector<Dummy>());
test(RefVector<Coll>());
test(PtrVector<Dummy>());
test(OwnVector<Dummy>());
return 0;
} catch(cms::Exception const& e) {
std::cerr << e.explainSelf() << std::endl;
return 1;
} catch(std::exception const& e) {
std::cerr << e.what() << std::endl;
return 1;
}
示例3: tokenize
inline void tokenize(const std::string& str, Coll &token, const std::string& separators = std::string(" /\t:,()"))
{
std::string input(str);
std::string::size_type idx = 0;
if ((idx = input.find_first_not_of(separators)) == std::string::npos) {
return;
}
input = input.substr(idx);
while ((idx = input.find_first_of(separators)) != std::string::npos) {
token.push_back(input.substr(0, idx));
input = input.substr(idx + 1);
idx = input.find_first_not_of(separators);
if (idx == std::string::npos) {
break;
}
input = input.substr(idx);
}
if ((input.find_first_of(separators)) == std::string::npos) {
token.push_back(input);
}
}
示例4: removeOperand
void PartyShuffle::setOperand( Coll& operand )
{
removeOperand();
xmmsv_coll_add_operand( coll_, operand.getColl() );
}
示例5: xmmsv_coll_remove_operand
void Nary::removeOperand( Coll& operand )
{
xmmsv_coll_remove_operand( coll_, operand.getColl() );
}
示例6: xmmsv_coll_add_operand
void Nary::addOperand( Coll& operand )
{
xmmsv_coll_add_operand( coll_, operand.getColl() );
}