本文整理汇总了C++中SequenceT类的典型用法代码示例。如果您正苦于以下问题:C++ SequenceT类的具体用法?C++ SequenceT怎么用?C++ SequenceT使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SequenceT类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: trim_left_if
inline void trim_left_if(SequenceT& Input)
{
Input.erase(
Input.begin(),
trim_begin(
Input.begin(),
Input.end() )
);
}
开发者ID:jieah,项目名称:dynd,代码行数:9,代码来源:string_numeric_assignment_kernels.cpp
示例2: trim_right_if
inline void trim_right_if(SequenceT& Input)
{
Input.erase(
trim_end(
Input.begin(),
Input.end() ),
Input.end()
);
}
开发者ID:jieah,项目名称:dynd,代码行数:9,代码来源:string_numeric_assignment_kernels.cpp
示例3: Intersperse
SequenceT Intersperse(const typename SequenceT::value_type & elem, const SequenceT & sequence)
{
if( sequence.size() <= 1 ) return sequence;
SequenceT newSequence;
for( const typename SequenceT::value_type & t : sequence ) {
newSequence.push_back(t);
newSequence.push_back(elem);
}
// Remove the last occurence of elem from the end of the new sequence.
newSequence.pop_back();
return newSequence;
}
开发者ID:danielkarch,项目名称:socioCut,代码行数:16,代码来源:stringfunctions.hpp
示例4: trim_left_if
inline void trim_left_if(SequenceT& Input, PredicateT IsSpace)
{
Input.erase(
::boost::begin(Input),
::boost::algorithm::detail::trim_begin(
::boost::begin(Input),
::boost::end(Input),
IsSpace));
}
开发者ID:00liujj,项目名称:dealii,代码行数:9,代码来源:trim.hpp
示例5: trim_right_if
inline void trim_right_if(SequenceT& Input, PredicateT IsSpace)
{
Input.erase(
::mars_boost::algorithm::detail::trim_end(
::mars_boost::begin(Input),
::mars_boost::end(Input),
IsSpace ),
::mars_boost::end(Input)
);
}
开发者ID:Iinvictus,项目名称:mars,代码行数:10,代码来源:trim.hpp
示例6: SaveData
void SaveData(SequenceT& buf) const
{
switch (_type)
{
case OBJTYPE_INTEGER:
buf.append((typename SequenceT::value_type const*)&_i, sizeof(uint32_t));
break;
case OBJTYPE_REAL:
case OBJTYPE_UNREAL:
buf.append((typename SequenceT::value_type const*)&_f, sizeof(float));
break;
case OBJTYPE_STRING:
buf.append(_s);
buf.push_back('\0');
break;
default:
throw base::exception("Unexpected data type: %d.", _type);
break;
}
}
开发者ID:9tong,项目名称:YDWE,代码行数:20,代码来源:VariableData.hpp
示例7: longestCommonPrefix
std::string longestCommonPrefix(const SequenceT& strings)
{
if (strings.empty())
return "";
typename SequenceT::const_iterator itr = strings.begin();
std::string result = *itr;
for (++itr; itr != strings.end(); ++itr)
{
const std::string& target = *itr;
if (result.empty())
return "";
for (size_t j=0; j < target.length() && j < result.length(); ++j)
if (target[j] != result[j])
{
result.resize(j);
break;
}
}
return result;
}
开发者ID:mobiusklein,项目名称:mzR,代码行数:23,代码来源:String.hpp
示例8: print_sequence
void print_sequence(string name, const SequenceT<T> & printMe) {
print_info(name,printMe);
typename SequenceT<T>::const_iterator i;
for (i = printMe.begin(); i != printMe.end(); ++i)
cout << '\t' << "SequenceT[" << "] is (" << *i << ")" << endl;
}
开发者ID:amiel,项目名称:random-useless-scripts,代码行数:6,代码来源:sequencet-amiel.cpp
示例9: print_info
void print_info(string name, const SequenceT<T> & printMe) {
cout << "PRINTING " << name << ":" << "which has size(" << printMe.size() << ")"
<< " and cap(" << printMe.capacity() << ")" << endl;
}
开发者ID:amiel,项目名称:random-useless-scripts,代码行数:4,代码来源:sequencet-amiel.cpp
注:本文中的SequenceT类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论