|
Classes |
class | ustl::cmemlink |
| A read-only pointer to a sized block of memory. More...
|
class | ustl::fdostringstream |
| A string stream that writes to an fd. Implements cout and cerr. More...
|
class | ustl::fdistringstream |
| A string stream that reads from an fd. Implements cin. More...
|
class | ustl::memblock |
| Allocated memory block. More...
|
class | ustl::memlink |
| Wrapper for pointer to block with size. More...
|
class | ustl::istream |
| Helper class to read packed binary streams. More...
|
class | ustl::istream_iterator< T > |
| An iterator over an istream to use with uSTL algorithms. More...
|
class | ustl::ostream |
| Helper class to write packed binary streams. More...
|
class | ustl::ostream_iterator< T > |
| An iterator over an ostream to use with uSTL algorithms. More...
|
class | ustl::istringstream |
| A stream that reads textual data from a memory block. More...
|
class | ustl::ostringstream |
| This stream writes textual data into a memory block. More...
|
class | ustl::bitset< Size > |
| bitset is a fixed-size block of memory with addressable bits. More...
|
class | ustl::exception |
| Base class for exceptions, equivalent to std::exception. More...
|
class | ustl::bad_cast |
| Thrown to indicate a bad dynamic_cast usage. More...
|
class | ustl::bad_alloc |
| Exception thrown on memory allocation failure by memblock::reserve. More...
|
class | ustl::libc_exception |
| Thrown when a libc function returns an error. More...
|
class | ustl::file_exception |
| File-related exceptions. More...
|
class | ustl::stream_bounds_exception |
| Stream bounds checking. More...
|
struct | ustl::iterator_traits< Iterator > |
| Contains the type traits of Iterator . More...
|
class | ustl::reverse_iterator< Iterator > |
| Wraps Iterator to behave in an exactly opposite manner. More...
|
class | ustl::insert_iterator< Container > |
| Calls insert on bound container for each assignment. More...
|
class | ustl::back_insert_iterator< Container > |
| Calls push_back on bound container for each assignment. More...
|
class | ustl::index_iterate< RandomAccessIterator, IndexIterator > |
| Allows iteration through an index container. More...
|
struct | ustl::numeric_limits< T > |
| Defines numeric limits for a type. More...
|
class | ustl::list< T > |
| Linked list emulator. More...
|
class | ustl::map< K, V > |
| A sorted associative container of pair<K,V>. More...
|
class | ustl::matrix< NX, NY, T > |
| A two-dimensional array of NX*NY elements of type T. More...
|
class | ustl::auto_ptr< T > |
| A smart pointer. More...
|
class | ustl::multimap< K, V > |
| A sorted associative container that may container multiple entries for each key. More...
|
class | ustl::multiset< T > |
| Multiple sorted container. Unlike set, it may contain multiple copies of each element. More...
|
class | ustl::pair< T1, T2 > |
| Container for two values. More...
|
class | ustl::queue< Sequence > |
| Queue adapter to uSTL containers. More...
|
class | ustl::set< T > |
| Unique sorted container. Sorted vector with all values unique. More...
|
struct | ustl::select1st< Pair > |
| Takes a pair and returns pair.first This is an extension, available in uSTL and the SGI STL. More...
|
struct | ustl::select2nd< Pair > |
| Takes a pair and returns pair.second This is an extension, available in uSTL and the SGI STL. More...
|
class | ustl::stack< Sequence > |
| Stack adapter to uSTL containers. More...
|
class | ustl::logic_error |
| Logic errors represent problems in the internal logic of the program. More...
|
class | ustl::domain_error |
| Reports domain errors ("domain" is in the mathematical sense). More...
|
class | ustl::invalid_argument |
| Reports an invalid argument to a function. More...
|
class | ustl::length_error |
| Reports when an object exceeds its allowed size. More...
|
class | ustl::out_of_range |
| Reports arguments with values out of allowed range. More...
|
class | ustl::runtime_error |
| Reports errors that are dependent on the data being processed. More...
|
class | ustl::range_error |
| Reports data that does not fall within the permitted range. More...
|
class | ustl::overflow_error |
| Reports arithmetic overflow. More...
|
class | ustl::underflow_error |
| Reports arithmetic underflow. More...
|
class | ustl::string |
| STL basic_string equivalent. More...
|
class | ustl::utf8in_iterator< Iterator, WChar > |
| An iterator adaptor to character containers for reading UTF-8 encoded text. More...
|
class | ustl::utf8out_iterator< Iterator, WChar > |
| An iterator adaptor to character containers for writing UTF-8 encoded text. More...
|
class | ustl::tuple< N, T > |
| A fixed-size array of N Ts . More...
|
class | ustl::vector< T > |
| STL vector equivalent. More...
|
Typedefs |
typedef uint32_t | bitset_value_type |
typedef uint32_t | xfmt_t |
Functions |
template<> |
size_t | alignof (cmemlink) |
istream & | operator>> (istream &is, memblock &l) |
| Reads object l from stream is .
|
istream & | operator>> (istream &is, memlink &l) |
| Reads object l from stream is .
|
template<typename T> |
istream & | operator>> (istream &is, T *&v) |
istream & | operator>> (istream &is, int8_t &v) |
istream & | operator>> (istream &is, uint8_t &v) |
istream & | operator>> (istream &is, int16_t &v) |
istream & | operator>> (istream &is, uint16_t &v) |
istream & | operator>> (istream &is, int32_t &v) |
istream & | operator>> (istream &is, uint32_t &v) |
istream & | operator>> (istream &is, float &v) |
istream & | operator>> (istream &is, double &v) |
istream & | operator>> (istream &is, wchar_t &v) |
istream & | operator>> (istream &is, bool &v) |
istream & | operator>> (istream &is, long &v) |
istream & | operator>> (istream &is, unsigned long &v) |
template<typename T> |
ostream & | operator<< (ostream &os, T *v) |
ostream & | operator<< (ostream &os, int8_t v) |
ostream & | operator<< (ostream &os, uint8_t v) |
ostream & | operator<< (ostream &os, int16_t v) |
ostream & | operator<< (ostream &os, uint16_t v) |
ostream & | operator<< (ostream &os, int32_t v) |
ostream & | operator<< (ostream &os, uint32_t v) |
ostream & | operator<< (ostream &os, float v) |
ostream & | operator<< (ostream &os, double v) |
ostream & | operator<< (ostream &os, wchar_t v) |
ostream & | operator<< (ostream &os, bool v) |
ostream & | operator<< (ostream &os, long v) |
ostream & | operator<< (ostream &os, unsigned long v) |
template<typename RealT, typename CastT> |
void | _cast_read (istringstream &is, RealT &v) |
| Reads one type as another.
|
istringstream & | operator>> (istringstream &is, int8_t &v) |
istringstream & | operator>> (istringstream &is, int32_t &v) |
istringstream & | operator>> (istringstream &is, double &v) |
istringstream & | operator>> (istringstream &is, bool &v) |
istringstream & | operator>> (istringstream &is, wchar_t &v) |
istringstream & | operator>> (istringstream &is, string &v) |
template<typename T> |
size_t | stream_size_of (T *) |
| Returns the size of the given object. Overloads for standard types are available.
|
size_t | stream_size_of (int8_t) |
size_t | stream_size_of (uint8_t) |
size_t | stream_size_of (int16_t) |
size_t | stream_size_of (uint16_t) |
size_t | stream_size_of (int32_t) |
size_t | stream_size_of (uint32_t) |
size_t | stream_size_of (float) |
size_t | stream_size_of (double) |
size_t | stream_size_of (bool) |
size_t | stream_size_of (wchar_t) |
size_t | stream_size_of (long v) |
size_t | stream_size_of (unsigned long v) |
template<typename ForwardIterator1, typename ForwardIterator2> |
ForwardIterator2 | swap_ranges (ForwardIterator1 first, ForwardIterator2 last, ForwardIterator2 result) |
template<typename InputIterator, typename EqualityComparable> |
InputIterator | find (InputIterator first, InputIterator last, const EqualityComparable &value) |
template<typename ForwardIterator> |
ForwardIterator | adjacent_find (ForwardIterator first, ForwardIterator last) |
template<typename InputIterator> |
pair< InputIterator, InputIterator > | mismatch (InputIterator first1, InputIterator last1, InputIterator first2) |
template<typename InputIterator> |
bool | equal (InputIterator first1, InputIterator last1, InputIterator first2) |
| Returns true if two ranges are equal. This is an extension, present in uSTL and SGI STL.
|
template<typename InputIterator, typename EqualityComparable> |
size_t | count (InputIterator first, InputIterator last, const EqualityComparable &value) |
template<typename InputIterator, typename OutputIterator, typename UnaryFunction> |
OutputIterator | transform (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op) |
template<typename InputIterator1, typename InputIterator2, typename OutputIterator, typename BinaryFunction> |
OutputIterator | transform (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op) |
template<typename ForwardIterator, typename T> |
void | replace (ForwardIterator first, ForwardIterator last, const T &old_value, const T &new_value) |
template<typename InputIterator, typename OutputIterator, typename T> |
OutputIterator | replace_copy (InputIterator first, InputIterator last, OutputIterator result, const T &old_value, const T &new_value) |
template<typename ForwardIterator, typename Generator> |
void | generate (ForwardIterator first, ForwardIterator last, Generator gen) |
template<typename OutputIterator, typename Generator> |
OutputIterator | generate_n (OutputIterator first, size_t n, Generator gen) |
template<typename BidirectionalIterator> |
void | reverse (BidirectionalIterator first, BidirectionalIterator last) |
template<typename ForwardIterator> |
ForwardIterator | rotate (ForwardIterator first, ForwardIterator middle, ForwardIterator last) |
template<typename InputIterator1, typename InputIterator2, typename OutputIterator> |
OutputIterator | merge (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result) |
| Combines two sorted ranges.
|
template<typename InputIterator> |
void | inplace_merge (InputIterator first, InputIterator middle, InputIterator last) |
template<typename InputIterator, typename OutputIterator, typename T> |
OutputIterator | remove_copy (InputIterator first, InputIterator last, OutputIterator result, const T &value) |
template<typename InputIterator, typename OutputIterator, typename RInputIterator> |
OutputIterator | remove_copy (InputIterator first, InputIterator last, OutputIterator result, RInputIterator rfirst, RInputIterator rlast) |
template<typename ForwardIterator, typename T> |
ForwardIterator | remove (ForwardIterator first, ForwardIterator last, const T &value) |
template<typename InputIterator, typename OutputIterator> |
OutputIterator | unique_copy (InputIterator first, InputIterator last, OutputIterator result) |
template<typename ForwardIterator> |
ForwardIterator | unique (ForwardIterator first, ForwardIterator last) |
template<typename ForwardIterator, typename LessThanComparable> |
ForwardIterator | lower_bound (ForwardIterator first, ForwardIterator last, const LessThanComparable &value) |
template<typename ForwardIterator, typename LessThanComparable> |
ForwardIterator | binary_search (ForwardIterator first, ForwardIterator last, const LessThanComparable &value) |
template<typename ForwardIterator, typename LessThanComparable> |
ForwardIterator | upper_bound (ForwardIterator first, ForwardIterator last, const LessThanComparable &value) |
template<typename ForwardIterator, typename LessThanComparable> |
pair< ForwardIterator, ForwardIterator > | equal_range (ForwardIterator first, ForwardIterator last, const LessThanComparable &value) |
template<typename RandomAccessIterator> |
void | random_shuffle (RandomAccessIterator first, RandomAccessIterator last) |
template<typename RandomAccessIterator, typename Compare> |
void | sort (RandomAccessIterator first, RandomAccessIterator last, Compare comp) |
template<typename RandomAccessIterator> |
void | sort (RandomAccessIterator first, RandomAccessIterator last) |
template<typename RandomAccessIterator> |
void | stable_sort (RandomAccessIterator first, RandomAccessIterator last) |
template<typename RandomAccessIterator, typename Compare> |
void | stable_sort (RandomAccessIterator first, RandomAccessIterator last, Compare comp) |
template<typename RandomAccessIterator> |
void | partial_sort (RandomAccessIterator first, RandomAccessIterator, RandomAccessIterator last) |
| Partially sort the range. Postcondition is that middle has the nth element and [first, middle) has elements smaller than those in (middle, last). In this implementation, the entire array is sorted. I can't think of any use for it where the time gained would be useful.
|
template<typename RandomAccessIterator> |
void | nth_element (RandomAccessIterator first, RandomAccessIterator nth, RandomAccessIterator last) |
| Puts nth element into its sorted position. In this implementation, the entire array is sorted. I can't think of any use for it where the time gained would be useful.
|
template<typename Assignable> |
void | swap (Assignable &a, Assignable &b) |
template<typename Iterator> |
void | iterator_swap (Iterator a, Iterator b) |
template<typename InputIterator, typename OutputIterator> |
OutputIterator | copy (InputIterator first, InputIterator last, OutputIterator result) |
template<typename InputIterator, typename OutputIterator> |
OutputIterator | copy_n (InputIterator first, size_t count, OutputIterator result) |
template<typename InputIterator, typename OutputIterator> |
OutputIterator | copy_backward (InputIterator first, InputIterator last, OutputIterator result) |
| Copy copies elements from the range (last, first] to result.
|
template<typename InputIterator, typename UnaryFunction> |
UnaryFunction | for_each (InputIterator first, InputIterator last, UnaryFunction f) |
template<typename ForwardIterator, typename T> |
void | fill (ForwardIterator first, ForwardIterator last, const T &value) |
template<typename OutputIterator, typename T> |
OutputIterator | fill_n (OutputIterator first, size_t count, const T &value) |
void | convert_to_bitstring (const bitset_value_type *v, size_t n, string &buf) |
void | convert_from_bitstring (const string &buf, bitset_value_type *v, size_t n) |
| Copies bits from buf as MSB "1011001..." LSB into v of size n .
|
template<typename Container, typename OutputIterator> |
OutputIterator | copy (const Container &ctr, OutputIterator result) |
template<typename Container, typename OutputIterator, typename Predicate> |
OutputIterator | copy_if (Container &ctr, OutputIterator result, Predicate pred) |
template<typename Container, typename UnaryFunction> |
UnaryFunction | for_each (Container &ctr, UnaryFunction f) |
template<typename Container, typename UnaryFunction> |
UnaryFunction | for_each (const Container &ctr, UnaryFunction f) |
template<typename Container, typename EqualityComparable> |
Container::const_iterator | find (const Container &ctr, const EqualityComparable &value) |
template<typename Container, typename EqualityComparable> |
Container::iterator | find (Container &ctr, const EqualityComparable &value) |
template<typename Container, typename Predicate> |
Container::const_iterator | find_if (const Container &ctr, Predicate pred) |
template<typename Container, typename Predicate> |
Container::iterator | find_if (Container &ctr, Predicate pred) |
template<typename Container, typename EqualityComparable> |
size_t | count (const Container &ctr, const EqualityComparable &value) |
template<typename Container, typename Predicate> |
size_t | count_if (const Container &ctr, Predicate pred) |
template<typename Container, typename UnaryFunction> |
void | transform (Container &ctr, UnaryFunction op) |
template<typename Container, typename OutputIterator, typename UnaryFunction> |
OutputIterator | transform (Container &ctr, OutputIterator result, UnaryFunction op) |
template<typename Container, typename InputIterator, typename OutputIterator, typename BinaryFunction> |
OutputIterator | transform (Container &ctr, InputIterator first, OutputIterator result, BinaryFunction op) |
template<typename Container, typename T> |
void | replace (Container &ctr, const T &old_value, const T &new_value) |
template<typename Container, typename Predicate, typename T> |
void | replace_if (Container &ctr, Predicate pred, const T &new_value) |
template<typename Container, typename OutputIterator, typename T> |
OutputIterator | replace_copy (const Container &ctr, OutputIterator result, const T &old_value, const T &new_value) |
template<typename Container, typename OutputIterator, typename Predicate, typename T> |
OutputIterator | replace_copy_if (const Container &ctr, OutputIterator result, Predicate pred, const T &new_value) |
template<typename Container, typename T> |
void | fill (Container &ctr, const T &value) |
template<typename Container, typename Generator> |
void | generate (Container &ctr, Generator gen) |
template<typename Container> |
void | random_shuffle (Container &ctr) |
template<typename Container, typename OutputIterator, typename T> |
OutputIterator | remove_copy (const Container &ctr, OutputIterator result, const T &value) |
template<typename Container, typename OutputIterator, typename Predicate> |
OutputIterator | remove_copy_if (const Container &ctr, OutputIterator result, Predicate pred) |
template<typename Container, typename T> |
void | remove (Container &ctr, const T &value) |
template<typename Container, typename ForwardIterator> |
void | remove (Container &ctr, ForwardIterator rfirst, ForwardIterator rlast) |
template<typename Container, typename Predicate> |
void | remove_if (Container &ctr, Predicate pred) |
template<typename Container, typename OutputIterator> |
OutputIterator | unique_copy (const Container &ctr, OutputIterator result) |
template<typename Container> |
void | unique (Container &ctr) |
template<typename Container, typename BinaryPredicate> |
void | unique (Container &ctr, BinaryPredicate binary_pred) |
template<typename Container> |
void | reverse (Container &ctr) |
template<typename Container> |
void | rotate (Container &ctr, off_t offset) |
template<typename Container, typename LessThanComparable> |
Container::const_iterator | lower_bound (const Container &ctr, const LessThanComparable &value) |
template<typename Container, typename LessThanComparable> |
Container::iterator | lower_bound (Container &ctr, const LessThanComparable &value) |
template<typename Container, typename LessThanComparable> |
Container::const_iterator | upper_bound (const Container &ctr, const LessThanComparable &value) |
template<typename Container, typename LessThanComparable> |
Container::iterator | upper_bound (Container &ctr, const LessThanComparable &value) |
template<typename Container> |
Container::const_iterator | binary_search (const Container &ctr, const typename Container::value_type &value) |
template<typename Container> |
Container::iterator | binary_search (Container &ctr, const typename Container::value_type &value) |
template<typename Container, typename LessThanComparable> |
pair< typename Container::const_iterator,
typename Container::const_iterator > | equal_range (const Container &ctr, const LessThanComparable &value) |
template<typename Container, typename LessThanComparable> |
pair< typename Container::iterator,
typename Container::iterator > | equal_range (Container &ctr, const LessThanComparable &value) |
template<typename Container> |
void | sort (Container &ctr) |
template<typename Container, typename Compare> |
void | sort (Container &ctr, Compare comp) |
template<typename Container> |
void | stable_sort (Container &ctr) |
template<typename Container, typename Compare> |
void | stable_sort (Container &ctr, Compare comp) |
template<typename Container> |
Container::iterator | unconst (typename Container::const_iterator i, Container &ctr) |
template<typename Container1, typename Container2> |
Container2::iterator | ibyi (typename Container1::iterator idx, Container1 &ctr1, Container2 &ctr2) |
| Converts a const_iterator in one container into a const_iterator in another container.
|
template<typename Arg, typename Result> |
pointer_to_unary_function<
Arg, Result > | ptr_fun (Result(*pfn)(Arg)) |
| ptr_fun(pfn) wraps function pointer pfn into a functor class that calls it.
|
template<class UnaryFunction> |
unary_negate< UnaryFunction > | unary_negator (UnaryFunction pfn) |
| Returns the functor that negates the result of *pfn().
|
template<typename BinaryFunction> |
binder1st< BinaryFunction > | bind1st (BinaryFunction pfn, typename BinaryFunction::first_argument_type v) |
| Converts pfn into a unary function by binding the first argument to v .
|
template<typename BinaryFunction> |
binder2nd< BinaryFunction > | bind2nd (BinaryFunction pfn, typename BinaryFunction::second_argument_type v) |
| Converts pfn into a unary function by binding the second argument to v .
|
template<class T, typename VT> |
const_mem_var1_t< binder2nd<
equal_to< VT > >, T, VT > | mem_var_equal_to (const VT T::*mvp, const VT &v) |
| Returned functor passes member variable mvp reference of given object to equal<VT>.
|
template<class T, typename VT> |
const_mem_var1_t< binder2nd<
less< VT > >, T, VT > | mem_var_less (const VT T::*mvp, const VT &v) |
| Returned functor passes member variable mvp reference of given object to less<VT>.
|
template<class T, typename VT> |
const_mem_var2_t< equal_to<
VT >, T, VT > | mem_var_equal_to (const VT T::*mvp) |
| Returned functor passes member variable mvp reference of given object to equal<VT>.
|
template<class T, typename VT> |
const_mem_var2_t< less< VT >,
T, VT > | mem_var_less (const VT T::*mvp) |
| Returned functor passes member variable mvp reference of given object to less<VT>.
|
template<typename RandomAccessIterator, typename Compare> |
void | make_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp) |
| make_heap turns the range [first, last) into a heap At completion, is_heap (first, last, comp) is true. The algorithm is adapted from "Classic Data Structures in C++" by Timothy Budd.
|
template<typename RandomAccessIterator, typename Compare> |
void | push_heap (RandomAccessIterator first, RandomAccessIterator last, Compare comp) |
template<typename RandomAccessIterator> |
void | make_heap (RandomAccessIterator first, RandomAccessIterator last) |
| Make_heap turns the range [first, last) into a heap At completion, is_heap (first, last) is true.
|
istream & | operator>> (istream &is, const ios::skip &op) |
ostream & | operator<< (ostream &os, const ios::skip &op) |
size_t | stream_size_of (const ios::skip &op) |
istream & | operator>> (istream &is, const ios::align &op) |
ostream & | operator<< (ostream &os, const ios::align &op) |
size_t | stream_size_of (const ios::align &op) |
ostringstream & | operator<< (ostringstream &os, const ios::width &op) |
ostringstream & | operator<< (ostringstream &os, const ios::base &op) |
template<class Container> |
insert_iterator< Container > | inserter (Container &ctr, typename Container::iterator ip) |
| Returns the insert_iterator for ctr .
|
template<class Container> |
back_insert_iterator< Container > | back_inserter (Container &ctr) |
| Returns the back_insert_iterator for ctr .
|
template<typename RandomAccessIterator, typename IndexIterator> |
index_iterate< RandomAccessIterator,
IndexIterator > | index_iterator (RandomAccessIterator ibase, IndexIterator iindex) |
| Returns an index_iterate for ibase over iindex .
|
template<typename IndexContainer, typename IteratorContainer> |
void | indexv_to_iteratorv (typename IteratorContainer::value_type ibase, const IndexContainer &xc, IteratorContainer &ic) |
| Converts the indexes in xc to iterators in ic of base ibase .
|
template<size_t NX, size_t NY, typename T> |
void | load_identity (matrix< NX, NY, T > &m) |
template<size_t NX, size_t NY, typename T> |
matrix< NY, NY, T > | operator * (const matrix< NX, NY, T > &m1, const matrix< NY, NX, T > &m2) |
template<size_t NX, size_t NY, typename T> |
tuple< NX, T > | operator * (const tuple< NY, T > &t, const matrix< NX, NY, T > &m) |
template<size_t N, typename T> |
void | transpose (matrix< N, N, T > &m) |
template<typename T> |
void | construct (T *p) |
template<typename ForwardIterator> |
void | construct (ForwardIterator first, ForwardIterator last) |
template<typename T> |
void | construct (T *p, const T &value) |
template<typename T> |
void | destroy (T *p) |
template<typename ForwardIterator> |
void | destroy (ForwardIterator first, ForwardIterator last) |
template<typename T> |
T * | cast_to_type (void *p, const T *) |
| Casts p to the type of the second pointer argument.
|
template<typename T> |
pair< T *, ptrdiff_t > | make_temporary_buffer (void *p, size_t n, const T *ptype) |
| Creates a temporary buffer pair from p and n This is intended to be used with alloca to create temporary buffers. The size in the returned pair is set to 0 if the allocation is unsuccessful.
|
template<typename InputIterator, typename ForwardIterator> |
ForwardIterator | uninitialized_copy (InputIterator first, InputIterator last, ForwardIterator result) |
template<typename InputIterator, typename ForwardIterator> |
ForwardIterator | uninitialized_copy_n (InputIterator first, size_t n, ForwardIterator result) |
template<typename ForwardIterator, typename T> |
void | uninitialized_fill (ForwardIterator first, ForwardIterator last, const T &v) |
template<typename ForwardIterator, typename T> |
ForwardIterator | uninitialized_fill_n (ForwardIterator first, size_t n, const T &v) |
template<typename InputIterator, typename T> |
T | accumulate (InputIterator first, InputIterator last, T init) |
template<typename InputIterator, typename T, typename BinaryFunction> |
T | accumulate (InputIterator first, InputIterator last, T init, BinaryFunction binary_op) |
template<typename ForwardIterator, typename T> |
void | iota (ForwardIterator first, ForwardIterator last, T value) |
template<typename InputIterator1, typename InputIterator2, typename T> |
T | inner_product (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init) |
template<typename InputIterator1, typename InputIterator2, typename T, typename BinaryOperation1, typename BinaryOperation2> |
T | inner_product (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init, BinaryOperation1 sumOp, BinaryOperation2 productOp) |
template<typename InputIterator, typename OutputIterator> |
OutputIterator | partial_sum (InputIterator first, InputIterator last, OutputIterator result) |
template<typename InputIterator, typename OutputIterator, typename BinaryOperation> |
OutputIterator | partial_sum (InputIterator first, InputIterator last, OutputIterator result, BinaryOperation sumOp) |
template<typename InputIterator, typename OutputIterator> |
OutputIterator | adjacent_difference (InputIterator first, InputIterator last, OutputIterator result) |
template<typename InputIterator, typename OutputIterator, typename BinaryOperation> |
OutputIterator | adjacent_difference (InputIterator first, InputIterator last, OutputIterator result, BinaryOperation differenceOp) |
template<typename T> |
T | power (T x, unsigned n) |
| Returns x^n. Donald Knuth's Russian Peasant algorithm.
|
template<typename T, typename BinaryOperation> |
T | power (T x, unsigned n, BinaryOperation op) |
| Returns x^n, using op instead of multiplication. Donald Knuth's Russian Peasant algorithm.
|
template<typename T1, typename T2> |
bool | operator== (const pair< T1, T2 > &p1, const pair< T1, T2 > &p2) |
| Compares both values of p1 to those of p2 .
|
template<typename T1, typename T2> |
bool | operator< (const pair< T1, T2 > &p1, const pair< T1, T2 > &p2) |
| Compares both values of p1 to those of p2 .
|
template<typename T1, typename T2> |
pair< T1, T2 > | make_pair (const T1 &a, const T2 &b) |
| Returns a pair object with (a,b).
|
template<typename InputIterator, typename OutputIterator, typename Predicate> |
OutputIterator | copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred) |
template<typename InputIterator, typename Predicate> |
InputIterator | find_if (InputIterator first, InputIterator last, Predicate pred) |
template<typename ForwardIterator, typename BinaryPredicate> |
ForwardIterator | adjacent_find (ForwardIterator first, ForwardIterator last, BinaryPredicate p) |
template<typename InputIterator, typename BinaryPredicate> |
pair< InputIterator, InputIterator > | mismatch (InputIterator first1, InputIterator last1, InputIterator first2, BinaryPredicate comp) |
template<typename InputIterator, typename BinaryPredicate> |
bool | equal (InputIterator first1, InputIterator last1, InputIterator first2, BinaryPredicate comp) |
template<typename InputIterator, typename Predicate> |
size_t | count_if (InputIterator first, InputIterator last, Predicate pred) |
template<typename ForwardIterator, typename Predicate, typename T> |
void | replace_if (ForwardIterator first, ForwardIterator last, Predicate pred, const T &new_value) |
template<typename InputIterator, typename OutputIterator, typename Predicate, typename T> |
OutputIterator | replace_copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred, const T &new_value) |
template<typename InputIterator, typename OutputIterator, typename Predicate> |
OutputIterator | remove_copy_if (InputIterator first, InputIterator last, OutputIterator result, Predicate pred) |
template<typename ForwardIterator, typename Predicate> |
ForwardIterator | remove_if (ForwardIterator first, ForwardIterator last, Predicate pred) |
template<typename InputIterator, typename OutputIterator, typename BinaryPredicate> |
OutputIterator | unique_copy (InputIterator first, InputIterator last, OutputIterator result, BinaryPredicate binary_pred) |
template<typename ForwardIterator, typename BinaryPredicate> |
ForwardIterator | unique (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_pred) |
template<typename ForwardIterator, typename T, typename StrictWeakOrdering> |
ForwardIterator | lower_bound (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp) |
template<typename ForwardIterator, typename T, typename StrictWeakOrdering> |
ForwardIterator | binary_search (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp) |
template<typename ForwardIterator, typename T, typename StrictWeakOrdering> |
ForwardIterator | upper_bound (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp) |
template<typename ForwardIterator, typename T, typename StrictWeakOrdering> |
pair< ForwardIterator, ForwardIterator > | equal_range (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp) |
template<typename RandomAccessIterator, typename Compare> |
void | nth_element (RandomAccessIterator first, RandomAccessIterator, RandomAccessIterator last, Compare comp) |
| Puts nth element into its sorted position. In this implementation, the entire array is sorted. The performance difference is so small and the function use is so rare, there is no need to have code for it.
|
template<> |
void | swap (cmemlink &a, cmemlink &b) |
template<> |
void | swap (memlink &a, memlink &b) |
template<> |
void | swap (memblock &a, memblock &b) |
template<> |
void | swap (string &a, string &b) |
template<typename T> |
void | swap (vector< T > &a, vector< T > &b) |
template<typename T> |
void | swap (set< T > &a, set< T > &b) |
template<typename T> |
void | swap (multiset< T > &a, multiset< T > &b) |
template<size_t N, typename T> |
void | swap (tuple< N, T > &a, tuple< N, T > &b) |
template<typename Container> |
size_t | container_stream_size (const Container &v) |
| Computes the stream size of a standard container.
|
template<typename T1, typename T2> |
istream & | operator>> (istream &is, pair< T1, T2 > &p) |
| Reads pair p from stream is .
|
template<typename T1, typename T2> |
ostream & | operator<< (ostream &os, const pair< T1, T2 > &p) |
| Writes pair p to stream os .
|
template<typename T1, typename T2> |
ostringstream & | operator<< (ostringstream &os, const pair< T1, T2 > &p) |
| Writes pair p to stream os .
|
template<typename T1, typename T2> |
size_t | stream_size_of (const pair< T1, T2 > &v) |
| Returns the written size of the object.
|
template<typename Container> |
pair< typename Container::iterator,
typename Container::iterator > | unconst (const pair< typename Container::const_iterator, typename Container::const_iterator > &i, Container &ctr) |
| Converts a const_iterator pair into an iterator pair Useful for converting pair ranges returned by equal_range, for instance. This is an extension, available in uSTL.
|
template<typename T> |
istream & | operator>> (istream &is, vector< T > &v) |
| Reads the vector from stream is .
|
template<typename T> |
ostream & | operator<< (ostream &os, const vector< T > &v) |
| Writes the vector to stream os .
|
template<typename T> |
ostringstream & | operator<< (ostringstream &os, const vector< T > &v) |
| Writes the vector to stream os .
|
template<typename T> |
size_t | stream_size_of (const vector< T > &v) |
| Returns the number of bytes necessary to write this object to a stream.
|
template<size_t Size> |
istream & | operator>> (istream &is, bitset< Size > &v) |
| Reads bitset v from stream is .
|
template<size_t Size> |
ostream & | operator<< (ostream &os, const bitset< Size > &v) |
| Writes bitset v into stream os .
|
template<size_t Size> |
ostringstream & | operator<< (ostringstream &os, const bitset< Size > &v) |
| Writes bitset v into stream os .
|
template<size_t Size> |
size_t | stream_size_of (const bitset< Size > &v) |
| Returns the number of bytes necessary to write this object to a stream.
|
template<size_t N, typename T> |
istream & | operator>> (istream &is, tuple< N, T > &v) |
| Reads tuple v from stream is .
|
template<size_t N, typename T> |
ostream & | operator<< (ostream &os, const tuple< N, T > &v) |
| Writes tuple v into stream os .
|
template<size_t N, typename T> |
ostringstream & | operator<< (ostringstream &os, const tuple< N, T > &v) |
| Writes tuple v into stream os .
|
template<size_t N> |
ostringstream & | operator<< (ostringstream &os, const tuple< N, uint8_t > &v) |
template<size_t N> |
ostringstream & | operator<< (ostringstream &os, const tuple< N, int8_t > &v) |
template<size_t N, typename T> |
size_t | stream_size_of (const tuple< N, T > &v) |
| Returns the number of bytes necessary to write this object to a stream.
|
template<size_t NX, size_t NY, typename T> |
ostringstream & | operator<< (ostringstream &os, const matrix< NX, NY, T > &v) |
| Writes tuple v into stream os .
|
bool | operator== (const char *s1, const string &s2) |
| Returns true if s1 is equal to s2 .
|
bool | operator!= (const char *s1, const string &s2) |
| Returns true if s1 is not equal to s2 .
|
bool | operator< (const char *s1, const string &s2) |
| Returns true if s1 is equal to s2 .
|
bool | operator<= (const char *s1, const string &s2) |
| Returns true if s1 is less than or equal to s2 .
|
bool | operator> (const char *s1, const string &s2) |
| Returns true if s1 is equal to s2 .
|
bool | operator>= (const char *s1, const string &s2) |
| Returns true if s1 is greater than or equal to s2 .
|
template<> |
size_t | alignof (string) |
template<typename T> |
hashvalue_t | hash_value (const T &v) |
template<> |
hashvalue_t | hash_value (const string::const_pointer &v) |
template<> |
hashvalue_t | hash_value (const string::pointer &v) |
size_t | Utf8Bytes (wchar_t v) |
| Returns the number of bytes required to UTF-8 encode v .
|
size_t | Utf8SequenceBytes (uint8_t c) |
| Returns the number of bytes in a UTF-8 sequence that starts with c .
|
template<typename Iterator> |
utf8out_iterator< Iterator > | utf8out (Iterator i) |
| Returns a UTF-8 adaptor writing to i . Useful in conjuction with back_insert_iterator.
|
template<typename Iterator> |
utf8in_iterator< Iterator > | utf8in (Iterator i) |
| Returns a UTF-8 adaptor reading from i .
|
utf8in_iterator< istream_iterator<
uint8_t > > | utf8in (istream &is) |
| Returns a UTF-8 adaptor reading from is .
|
utf8out_iterator< ostream_iterator<
uint8_t > > | utf8out (ostream &os) |
| Returns a UTF-8 adaptor writing to os .
|
template<size_t N, typename T1, typename T2> |
bool | operator== (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
bool | operator< (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > & | operator+= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > & | operator-= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > & | operator *= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > & | operator/= (tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > | operator+ (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > | operator- (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > | operator * (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<size_t N, typename T1, typename T2> |
const tuple< N, T1 > | operator/ (const tuple< N, T1 > &t1, const tuple< N, T2 > &t2) |
template<typename T1, typename T2> |
const T1 | min (const T1 &a, const T2 &b) |
| Returns the minimum of a and b .
|
template<typename T1, typename T2> |
const T1 | max (const T1 &a, const T2 &b) |
| Returns the maximum of a and b .
|
template<typename T1, typename T2> |
T1 | DivRU (T1 n1, T2 n2) |
| Divides n1 by n2 and rounds the result up. This is in contrast to regular division, which rounds down. Negative numbers are rounded down because they are an unusual case, supporting which would require a branch. Since this is frequently used in graphics, the speed is important.
|
template<typename T> |
T | Align (T n, T grain=c_DefaultAlignment) |
| Rounds n up to be divisible by grain .
|
template<typename T> |
size_t | alignof (T) |
| Returns the recommended alignment for type T .
|
template<> |
size_t | alignof (bool) |
template<typename T> |
T | advance (T i, ssize_t offset) |
| Offsets an iterator.
|
template<typename T1, typename T2> |
ptrdiff_t | distance (T1 i1, T2 i2) |
| Returns the difference p1 - p2 .
|
template<typename T> |
T | absv (T v) |
| Returns the absolute value of v Unlike the stdlib functions, this is inline and works with all types.
|
template<typename T> |
T | sign (T v) |
| Returns -1 for negative values, 1 for positive, and 0 for 0.
|
template<typename T1, typename T2> |
size_t | abs_distance (T1 i1, T2 i2) |
| Returns the absolute value of the distance i1 and i2.
|
template<typename T> |
size_t | size_of_elements (size_t n, const T *) |
| Returns the size of n elements of size T .
|
template<typename T> |
void | Delete (T *&p) |
| Template for for_each to call delete.
|
template<typename T> |
void | DeleteVector (T *&p) |
| Template for for_each to call delete.
|
template<typename T> |
bool | operator!= (const T &x, const T &y) |
| Template of making != from ! and ==.
|
template<typename T> |
bool | operator> (const T &x, const T &y) |
| Template of making > from <.
|
template<typename T> |
bool | operator<= (const T &x, const T &y) |
| Template of making <= from < and ==.
|
template<typename T> |
bool | operator>= (const T &x, const T &y) |
| Template of making >= from < and ==.
|
template<typename TSmall, typename TBig> |
void | pack_type (TSmall s, TBig &b) |
| Packs s multiple times into b . Useful for loop unrolling.
|
bool | TestAndSet (int *pm) |
| Sets the contents of pm to 1 and returns true if the previous value was 0.
|
Variables |
fdistringstream | cin (STDIN_FILENO) |
fdostringstream | cout (STDOUT_FILENO) |
fdostringstream | cerr (STDERR_FILENO) |
const char | endl = '\n' |
| End of line character.
|
const char | ends = '\0' |
| End of string character.
|
const size_t | c_DefaultAlignment = sizeof(void*) |
| The alignment performed by default.
|