本文整理汇总了C++中std::vector::str方法的典型用法代码示例。如果您正苦于以下问题:C++ vector::str方法的具体用法?C++ vector::str怎么用?C++ vector::str使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::vector
的用法示例。
在下文中一共展示了vector::str方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Int4ToAbstractNode
void Int4ToAbstractNode(const std::vector<MyNode>& node, std::vector<AbstractNode<T>* >& out, const JetSize jetSize, T* data)
{
out.resize(node.size());
for(unsigned i=0;i<node.size();++i)
{
AbstractNode<T>* p;
T* left = data + jetSize*node[i].left;
T* right = data + jetSize*node[i].right;
T* result = data + jetSize*node[i].result;
switch(node[i].op)
{
CAPD_MAKE_NODE(NODE_ADD,Add,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_PLUS_VAR,ConstPlusVar,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_PLUS_CONST,ConstPlusConst,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_PLUS_TIME,ConstPlusTime,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_PLUS_FUNTIME,ConstPlusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_TIME_PLUS_VAR,TimePlusVar,left,right,result);
CAPD_MAKE_NODE(NODE_TIME_PLUS_FUNTIME,TimePlusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_FUNTIME_PLUS_VAR,FunTimePlusVar,left,right,result);
CAPD_MAKE_NODE(NODE_FUNTIME_PLUS_FUNTIME,FunTimePlusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_SUB,Sub,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_MINUS_CONST,ConstMinusConst,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_MINUS_VAR,ConstMinusVar,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_MINUS_TIME,ConstMinusTime,left,right,result);
CAPD_MAKE_NODE(NODE_CONST_MINUS_FUNTIME,ConstMinusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_TIME_MINUS_CONST,TimeMinusConst,left,right,result);
CAPD_MAKE_NODE(NODE_TIME_MINUS_FUNTIME,TimeMinusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_TIME_MINUS_VAR,TimeMinusVar,left,right,result);
CAPD_MAKE_NODE(NODE_FUNTIME_MINUS_CONST,FunTimeMinusConst,left,right,result);
CAPD_MAKE_NODE(NODE_FUNTIME_MINUS_TIME,FunTimeMinusTime,left,right,result);
CAPD_MAKE_NODE(NODE_FUNTIME_MINUS_FUNTIME,FunTimeMinusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_FUNTIME_MINUS_VAR,FunTimeMinusVar,left,right,result);
CAPD_MAKE_NODE(NODE_VAR_MINUS_CONST,VarMinusConst,left,right,result);
CAPD_MAKE_NODE(NODE_VAR_MINUS_TIME,VarMinusTime,left,right,result);
CAPD_MAKE_NODE(NODE_VAR_MINUS_FUNTIME,VarMinusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_UNARY_MINUS,UnaryMinus,left,right,result);
CAPD_MAKE_NODE(NODE_UNARY_MINUS_CONST,UnaryMinusConst,left,right,result);
CAPD_MAKE_NODE(NODE_UNARY_MINUS_TIME,UnaryMinusTime,left,right,result);
CAPD_MAKE_NODE(NODE_UNARY_MINUS_FUNTIME,UnaryMinusFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_MUL,Mul,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_CONST_BY_VAR,MulConstByVar,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_CONST_BY_CONST,MulConstByConst,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_CONST_BY_TIME,MulConstByTime,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_CONST_BY_FUNTIME,MulConstByFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_TIME_BY_VAR,MulTimeByVar,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_TIME_BY_FUNTIME,MulTimeByFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_FUNTIME_BY_VAR,MulFunTimeByVar,left,right,result);
CAPD_MAKE_NODE(NODE_MUL_FUNTIME_BY_FUNTIME,MulFunTimeByFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_DIV,Div,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_VAR_BY_CONST,DivVarByConst,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_VAR_BY_TIME,DivVarByTime,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_VAR_BY_FUNTIME,DivVarByFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_TIME_BY_CONST,DivTimeByConst,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_FUNTIME_BY_CONST,DivFunTimeByConst,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_FUNTIME_BY_TIME,DivFunTimeByTime,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_FUNTIME_BY_FUNTIME,DivFunTimeByFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_DIV_CONST_BY_CONST,DivConstByConst,left,right,result);
CAPD_MAKE_NODE(NODE_SQR,Sqr,left,right,result);
CAPD_MAKE_NODE(NODE_SQR_CONST,SqrConst,left,right,result);
CAPD_MAKE_NODE(NODE_SQR_TIME,SqrTime,left,right,result);
CAPD_MAKE_NODE(NODE_SQR_FUNTIME,SqrFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_SQRT,Sqrt,left,right,result);
CAPD_MAKE_NODE(NODE_SQRT_CONST,SqrtConst,left,right,result);
CAPD_MAKE_NODE(NODE_SQRT_TIME,SqrtTime,left,right,result);
CAPD_MAKE_NODE(NODE_SQRT_FUNTIME,SqrtFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_POW,Pow,left,right,result);
CAPD_MAKE_NODE(NODE_POW_CONST,PowConst,left,right,result);
CAPD_MAKE_NODE(NODE_POW_TIME,PowTime,left,right,result);
CAPD_MAKE_NODE(NODE_POW_FUNTIME,PowFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_NATURAL_POW,NaturalPow,left,right,result);
CAPD_MAKE_NODE(NODE_NATURAL_POW_CONST,NaturalPowConst,left,right,result);
CAPD_MAKE_NODE(NODE_NATURAL_POW_TIME,NaturalPowTime,left,right,result);
CAPD_MAKE_NODE(NODE_NATURAL_POW_FUNTIME,NaturalPowFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_INTEGER_POW,IntegerPow,left,right,result);
CAPD_MAKE_NODE(NODE_INTEGER_POW_CONST,IntegerPowConst,left,right,result);
CAPD_MAKE_NODE(NODE_INTEGER_POW_TIME,IntegerPowTime,left,right,result);
CAPD_MAKE_NODE(NODE_INTEGER_POW_FUNTIME,IntegerPowFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_HALF_INTEGER_POW,HalfIntegerPow,left,right,result);
CAPD_MAKE_NODE(NODE_HALF_INTEGER_POW_CONST,HalfIntegerPowConst,left,right,result);
CAPD_MAKE_NODE(NODE_HALF_INTEGER_POW_TIME,HalfIntegerPowTime,left,right,result);
CAPD_MAKE_NODE(NODE_HALF_INTEGER_POW_FUNTIME,HalfIntegerPowFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_EXP,Exp,left,right,result);
CAPD_MAKE_NODE(NODE_EXP_CONST,ExpConst,left,right,result);
CAPD_MAKE_NODE(NODE_EXP_TIME,ExpTime,left,right,result);
CAPD_MAKE_NODE(NODE_EXP_FUNTIME,ExpFunTime,left,right,result);
CAPD_MAKE_NODE(NODE_LOG,Log,left,right,result);
CAPD_MAKE_NODE(NODE_LOG_CONST,LogConst,left,right,result);
CAPD_MAKE_NODE(NODE_LOG_TIME,LogTime,left,right,result);
CAPD_MAKE_NODE(NODE_LOG_FUNTIME,LogFunTime,left,right,result);
//.........这里部分代码省略.........