std Namespace Reference

STL namespace. More...

Classes

struct  less< const Rivet::Projection * >
 This is the function called when comparing two (const) pointers to Rivet::Projection. More...
class  allocator
 STL class.
class  auto_ptr
 STL class.
class  ios_base
 STL class.
class  basic_ios
 STL class.
class  basic_istream
 STL class.
class  basic_ostream
 STL class.
class  basic_iostream
 STL class.
class  basic_ifstream
 STL class.
class  basic_ofstream
 STL class.
class  basic_fstream
 STL class.
class  basic_istringstream
 STL class.
class  basic_ostringstream
 STL class.
class  basic_stringstream
 STL class.
class  ios
 STL class.
class  wios
 STL class.
class  istream
 STL class.
class  wistream
 STL class.
class  ostream
 STL class.
class  wostream
 STL class.
class  ifstream
 STL class.
class  wifstream
 STL class.
class  ofstream
 STL class.
class  wofstream
 STL class.
class  fstream
 STL class.
class  wfstream
 STL class.
class  istringstream
 STL class.
class  wistringstream
 STL class.
class  ostringstream
 STL class.
class  wostringstream
 STL class.
class  stringstream
 STL class.
class  wstringstream
 STL class.
class  basic_string
 STL class.
class  string
 STL class.
class  wstring
 STL class.
class  complex
 STL class.
class  bitset
 STL class.
class  deque
 STL class.
class  list
 STL class.
class  map
 STL class.
class  multimap
 STL class.
class  set
 STL class.
class  multiset
 STL class.
class  vector
 STL class.
class  queue
 STL class.
class  priority_queue
 STL class.
class  stack
 STL class.
class  valarray
 STL class.
class  exception
 STL class.
class  bad_alloc
 STL class.
class  bad_cast
 STL class.
class  bad_typeid
 STL class.
class  logic_error
 STL class.
class  runtime_error
 STL class.
class  bad_exception
 STL class.
class  domain_error
 STL class.
class  invalid_argument
 STL class.
class  length_error
 STL class.
class  out_of_range
 STL class.
class  range_error
 STL class.
class  overflow_error
 STL class.
class  underflow_error
 STL class.

Functions

template<typename T >
void operator+= (set< T > &s1, const set< T > &s2)
template<typename T >
set< T > operator+ (const set< T > &s1, const set< T > &s2)
template<typename T >
string join (const set< T > &s, const string &sep=" ")
template<typename T >
void operator+= (vector< T > &v1, const vector< T > &v2)
template<typename T >
vector< T > operator+ (const vector< T > &v1, const vector< T > &v2)
template<typename T >
string join (const vector< T > &v, const string &sep=" ")

Detailed Description

STL namespace.


Function Documentation

string std::join ( const vector< T > &  v,
const string &  sep = " " 
) [inline]

Definition at line 149 of file Utils.hh.

00149                                                                   {
00150     stringstream out;
00151     for (size_t i = 0; i < v.size(); ++i) {
00152       if (i != 0) out << sep;
00153       out << v[i];
00154     }
00155     return out.str();
00156   }

string std::join ( const set< T > &  s,
const string &  sep = " " 
) [inline]

Definition at line 119 of file Utils.hh.

Referenced by VetoedFinalState::project().

00119                                                                {
00120     stringstream out;
00121     bool first = false;
00122     for (typename set<T>::const_iterator it = s.begin(); it != s.end(); ++it) {
00123       if (first) {
00124         first = false;
00125       } else {
00126         out << sep;
00127       }
00128       out << *it;
00129     }
00130     return out.str();
00131   }

vector<T> std::operator+ ( const vector< T > &  v1,
const vector< T > &  v2 
) [inline]

Definition at line 142 of file Utils.hh.

00142                                                                        {
00143     vector<T> rtn(v1);
00144     rtn += v2;
00145     return rtn;
00146   }

set<T> std::operator+ ( const set< T > &  s1,
const set< T > &  s2 
) [inline]

Definition at line 112 of file Utils.hh.

00112                                                               {
00113     set<T> rtn(s1);
00114     rtn += s2;
00115     return rtn;
00116   }

void std::operator+= ( vector< T > &  v1,
const vector< T > &  v2 
) [inline]

Definition at line 135 of file Utils.hh.

References Rivet::s.

00135                                                              {
00136     for (typename vector<T>::const_iterator s = v2.begin(); s != v2.end(); ++s) {
00137       v1.push_back(*s);
00138     }
00139   }

void std::operator+= ( set< T > &  s1,
const set< T > &  s2 
) [inline]

Definition at line 105 of file Utils.hh.

References Rivet::s.

00105                                                        {
00106     for (typename set<T>::const_iterator s = s2.begin(); s != s2.end(); ++s) {
00107       s1.insert(*s);
00108     }
00109   }