Compounds | |
class | binary_compose |
An SGI extension. More... | |
struct | constant_binary_fun |
An SGI extension. More... | |
struct | constant_unary_fun |
An SGI extension. More... | |
struct | constant_void_fun |
An SGI extension. More... | |
struct | project1st |
An SGI extension. More... | |
struct | project2nd |
An SGI extension. More... | |
struct | select1st |
An SGI extension. More... | |
struct | select2nd |
An SGI extension. More... | |
class | subtractive_rng |
struct | temporary_buffer |
class | unary_compose |
An SGI extension. More... | |
[NOHEADER] | |
bitset< _Nb > & | _Unchecked_set (size_t __pos) |
bitset< _Nb > & | _Unchecked_set (size_t __pos, int __val) |
bitset< _Nb > & | _Unchecked_reset (size_t __pos) |
bitset< _Nb > & | _Unchecked_flip (size_t __pos) |
bool | _Unchecked_test (size_t __pos) const |
Functions | |
template<typename _Tp> const _Tp & | __median (const _Tp &__a, const _Tp &__b, const _Tp &__c) |
Find the median of three values. More... | |
template<typename _Tp, typename _Compare> const _Tp & | __median (const _Tp &__a, const _Tp &__b, const _Tp &__c, _Compare __comp) |
Find the median of three values using a predicate for comparison. More... | |
size_t | _Find_first () const |
Finds the index of the first "on" bit. More... | |
size_t | _Find_next (size_t __prev) const |
Finds the index of the next "on" bit after prev. More... | |
template<typename _InputIter, typename _Size, typename _OutputIter> pair< _InputIter, _OutputIter > | copy_n (_InputIter __first, _Size __count, _OutputIter __result) |
Copies the range [first,first+count) into [result,result+count). More... | |
template<typename _InputIter1, typename _InputIter2> int | lexicographical_compare_3way (_InputIter1 __first1, _InputIter1 __last1, _InputIter2 __first2, _InputIter2 __last2) |
memcmp on steroids. More... | |
template<class _Tp> _Tp | identity_element (std::plus< _Tp >) |
An SGI extension. More... | |
template<class _Tp> _Tp | identity_element (std::multiplies< _Tp >) |
An SGI extension. More... | |
template<class _Operation1, class _Operation2> unary_compose< _Operation1, _Operation2 > | compose1 (const _Operation1 &__fn1, const _Operation2 &__fn2) |
An SGI extension. More... | |
template<class _Operation1, class _Operation2, class _Operation3> binary_compose< _Operation1, _Operation2, _Operation3 > | compose2 (const _Operation1 &__fn1, const _Operation2 &__fn2, const _Operation3 &__fn3) |
An SGI extension. More... | |
template<class _Result> constant_void_fun< _Result > | constant0 (const _Result &__val) |
An SGI extension. More... | |
template<class _Result> constant_unary_fun< _Result, _Result > | constant1 (const _Result &__val) |
An SGI extension. More... | |
template<class _Result> constant_binary_fun< _Result, _Result, _Result > | constant2 (const _Result &__val) |
An SGI extension. More... | |
template<typename _InputIter, typename _Size, typename _ForwardIter> pair< _InputIter, _ForwardIter > | uninitialized_copy_n (_InputIter __first, _Size __count, _ForwardIter __result) |
Copies the range [first,last) into result. More... |
They are additionally documented in the online documentation, a copy of which is also shipped with the library source code (in .../docs/html/documentation.html). You can also read the documentation on SGI's site, which is still running even though the code is not maintained.
NB that the following notes are pulled from various comments all over the place, so they may seem stilted.
The identity_element
functions are not part of the C++ standard; SGI provided them as an extension. Its argument is an operation, and its return value is the identity element for that operation. It is overloaded for addition and multiplication, and you can overload it for your own nefarious operations.
As an extension to the binders, SGI provided composition functors and wrapper functions to aid in their creation. The unary_compose
functor is constructed from two functions/functors, f
and g
. Calling operator()
with a single argument x
returns f(g(x))
. The function compose1
takes the two functions and constructs a unary_compose
variable for you.
binary_compose
is constructed from three functors, f
, g1
, and g2
. Its operator()
returns f(g1(x),g2(x))
. The function @compose2 takes f, g1, and g2, and constructs the binary_compose
instance for you. For example, if f
returns an int, then
int answer = (compose2(f,g1,g2))(x);
int temp1 = g1(x); int temp2 = g2(x); int answer = f(temp1,temp2);
As an extension, SGI provided a functor called identity
. When a functor is required but no operations are desired, this can be used as a pass-through. Its operator()
returns its argument unchanged.
select1st
and select2nd
are extensions provided by SGI. Their operator()s
take a std::pair
as an argument, and return either the first member or the second member, respectively. They can be used (especially with the composition functors) to "strip" data from a sequence before performing the remainder of an algorithm.
The operator()
of the project1st
functor takes two arbitrary arguments and returns the first one, while project2nd
returns the second one. They are extensions provided by SGI.
These three functors are each constructed from a single arbitrary variable/value. Later, their operator()s
completely ignore any arguments passed, and return the stored value.
constant_void_fun's
operator()
takes no argumentsconstant_unary_fun's
operator()
takes one argument (ignored)constant_binary_fun's
operator()
takes two arguments (ignored)constant0
, constant1
, and constant2
each take a "result" argument and construct variables of the appropriate functor type.
|
Find the median of three values using a predicate for comparison.
{l,m,n} is some convolution of {a,b,c} such that comp(l,m) and comp(m,n) are both true then the value returned will be m . This is an SGI extension.
Definition at line 120 of file stl_algo.h. |
|
Find the median of three values.
{l,m,n} is some convolution of {a,b,c} such that l<=m<=n then the value returned will be m . This is an SGI extension.
Definition at line 86 of file stl_algo.h. Referenced by std::nth_element(). |
|
Finds the index of the first "on" bit.
|
|
Finds the index of the next "on" bit after prev.
|
|
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking. |
|
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking. |
|
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking. |
|
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking. |
|
These versions of single-bit set, reset, flip, and test are extensions from the SGI version. They do no range checking. |
|
An SGI extension.
Definition at line 143 of file ext/functional. |
|
An SGI extension.
Definition at line 170 of file ext/functional. |
|
An SGI extension.
Definition at line 305 of file ext/functional. |
|
An SGI extension.
Definition at line 312 of file ext/functional. |
|
An SGI extension.
Definition at line 320 of file ext/functional. |
|
Copies the range [first,first+count) into [result,result+count).
memmove whenever possible. Failing that, if random access iterators are passed, then the loop count will be known (and therefore a candidate for compiler optimizations such as unrolling).
Definition at line 121 of file ext/algorithm. |
|
An SGI extension.
Definition at line 91 of file ext/functional. |
|
An SGI extension.
Definition at line 87 of file ext/functional. |
|
Definition at line 200 of file ext/algorithm. |
|
Copies the range [first,last) into result.
Definition at line 128 of file ext/memory. |