File: prevpermutation.yo

package info (click to toggle)
c%2B%2B-annotations 10.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,536 kB
  • ctags: 3,247
  • sloc: cpp: 19,157; makefile: 1,521; ansic: 165; sh: 128; perl: 90
file content (32 lines) | stat: -rw-r--r-- 1,635 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
    hi(prev_permutation)
    itemization(
        it() Header file: tt(<algorithm>)
        it() Function prototypes:
        itemization(
            itt(bool prev_permutation(BidirectionalIterator first,
                BidirectionalIterator last);)
            itt(bool prev_permutation(BidirectionalIterator first,
                BidirectionalIterator last, Comp comp);)
        )
        it() Description:
            itemization(
            it() The first prototype: the previous permutation given the
sequence of elements in the range rangett(first, last) is determined. The
elements in the range are reordered such that the first ordering is obtained
representing a `smaller' value (see tt(next_permutation) (section
ref(NEXTPERM)) for an example involving the opposite ordering). The value
tt(true) is returned if a reordering took place, the value tt(false) is
returned if no reordering took place, which is the case if the provided
sequence was already ordered, according to the ti(operator<) of the data
type to which the iterators point.
            it() The second prototype: the previous permutation given the
sequence of elements in the range rangett(first, last) is determined , using
the binary predicate tt(comp) to compare elements. The elements in the range
are reordered. The value tt(true) is returned if a reordering took place, the
value tt(false) is returned if no reordering took place, which is the case if
the original sequence was already ordered, using the binary predicate tt(comp)
to compare two elements.
            )
        it() Example:
        verbinclude(-a examples/prevpermutation.cc)
    )