Stl Quick Reference Card Page 5

ADVERTISEMENT

STL Quick Reference – Version 1.29
5
April 20, 2007
[A4]
utputIterator
utputIterator
,
past end
=
for
0
O
4.3.5
Min and Max
4.3.7
Lexicographic Order
O
1
2
1
set symmetric difference
adjacent difference
(
(
=
0
0
nputIterator
nputIterator
1
first1,
first,
I
I
nputIterator
const
min
const
const
lexicographical compare
nputIterator
&
(
& x0,
& x1);
bool
(
T
T
T
nputIterator
1
last1,
last,
I
I
nputIterator
utputIterator
1
first1,
I
nputIterator
min
const
&
(
const
&
x0,
T
T
2
first2,
result);
I
O
nputIterator
1
last1,
I
nputIterator
const
&
x1,
T
2
last2,
I
utputIterator
ompare
utputIterator
2
first2,
I
nputIterator
as above but using binop
comp);
O
result);
C
O
2
last2);
I
adjacent difference
(
utputIterator
nputIterator
as above but using comp
const
&
max
(
const
& x0,
const
& x1);
O
T
T
T
first,
lexicographical compare
I
bool
(
nputIterator
nputIterator
set symmetric difference
(
nputIterator
last,
1
first1,
I
const
max
const
I
&
(
&
x0,
T
T
utputIterator
nputIterator
1
first1,
I
nputIterator
result,
1
last1,
O
const
I
&
x1,
T
inaryOperation
nputIterator
1
last1,
ompare
I
nputIterator
binop);
2
first2,
B
I
comp);
C
nputIterator
2
first2,
I
nputIterator
2
last2,
orwardIterator
I
ompare
2
last2,
I
F
utputIterator
comp);
orwardIterator
C
5
Function Objects
result,
O
min element
(
first,
F
ompare
orwardIterator
comp);
C
last);
F
4.4
Computational
orwardIterator
#include
functional
4.3.4
Heap
F
orwardIterator
#include
numeric
min element
(
first,
F
orwardIterator
rg
esult
void
(last
1) is pushed
last,
andomAccessIterator
F
template class
, class
ompare
7.6
A
R
T
first last
push heap
(
first,
R
[
)
nputIterator
comp);
andomAccessIterator
C
unary function
struct
accumulate
(
first,
rg
I
last);
R
nputIterator
orwardIterator
typedef
argument type
;
A
last,
esult
I
F
orwardIterator
void
as above but using comp
typedef
result type
;
R
andomAccessIterator
max element
initVal);
(
first,
T
F
orwardIterator
push heap
(
first,
R
andomAccessIterator
last);
F
last,
as above but using binop
R
T
ompare
nputIterator
Derived unary objects:
orwardIterator
accumulate
(
first,
comp);
C
I
F
nputIterator
negate
struct
;
orwardIterator
T
last,
max element
I
(
first,
F
void
first is popped
logical not
struct
;
orwardIterator
T
andomAccessIterator
initVal,
T
last,
pop heap
F
7.6
(
first,
inaryOperation
R
ompare
andomAccessIterator
binop);
B
comp);
C
last);
R
rg
rg
1
2
for
( = 1 2)
void
as above but using comp
T
template class
1, class
2,
A
A
nputIterator
andomAccessIterator
4.3.6
Permutations
esult
inner product
(
1
first1,
pop heap
(
first,
I
class
R
R
nputIterator
andomAccessIterator
1
last1,
struct
binary function
last,
I
R
nputIterator
rg
ompare
To get all permutations, start with ascending
2
first2,
typedef
1
first argument type
;
comp);
I
A
C
sequence end with descending.
rg
second argument type
initVal);
typedef
2
;
T
A
esult
void
[first,last) arbitrary ordered
andomAccessIterator
bool
iff available
result type
typedef
;
R
sum
make heap
(
first,
(
)
R
next permutation
Similar, using
and
andomAccessIterator
(
T
mult
idirectionalIterator
nputIterator
last);
R
inner product
(
1
first1,
first,
I
B
idirectionalIterator
nputIterator
Following derived template objects accept two
1
last1,
void
as above but using comp
last);
I
B
nputIterator
andomAccessIterator
operands. Result obvious by the name.
make heap
2
first2,
(
first,
I
R
andomAccessIterator
bool
as above but using comp
initVal,
last,
T
struct
plus
;
R
T
next permutation
inaryOperation
ompare
(
idirectionalIterator
sum,
comp);
B
struct
minus
;
C
T
inaryOperation
first,
B
idirectionalIterator
mult);
B
multiplies
struct
;
T
void
sort the [first,last) heap
last,
B
andomAccessIterator
ompare
utputIterator
divides
struct
;
sort heap
T
(
first,
first
R
comp);
+
C
andomAccessIterator
=
O
modulus
nputIterator
first
struct
;
=
T
last);
R
partial sum
(
first,
bool
iff available
I
equal to
nputIterator
struct
;
T
void
as above but using comp
prev permutation
last,
(
I
andomAccessIterator
not equal to
utputIterator
struct
;
idirectionalIterator
T
sort heap
(
first,
R
result);
first,
O
andomAccessIterator
B
greater
idirectionalIterator
struct
;
T
last,
utputIterator
R
last);
ompare
B
less
struct
;
T
as above but using binop
O
comp);
C
struct
greater equal
;
partial sum
(
T
bool
as above but using comp
nputIterator
struct
less equal
;
prev permutation
(
first,
I
T
idirectionalIterator
nputIterator
logical and
first,
last,
struct
;
B
I
T
idirectionalIterator
utputIterator
logical or
last,
result,
struct
;
B
O
T
ompare
inaryOperation
comp);
binop);
C
B
Yotam Medini c 1998-2007

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 8