public final class ReorderOper
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends java.lang.Comparable<T>> |
ArrangeCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
int count)
Generates all arrangements of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where where n = (number of arrangements) * Distance(first1, last1).
|
static <T> int |
ArrangeCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
int count,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Generates all arrangements of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where where n = (number of arrangements) * Distance(first1, last1).
|
static <T extends java.lang.Comparable<T>,TOutIter extends IOutIter<T,TOutIter>> |
ArrangeCopy(T[] x,
int first1,
int last1,
TOutIter first2,
int count)
Generates all arrangements of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where where n = (number of arrangements) * Distance(first1, last1).
|
static <T,TOutIter extends IOutIter<T,TOutIter>> |
ArrangeCopy(T[] x,
int first1,
int last1,
TOutIter first2,
int count,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Generates all arrangements of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where where n = (number of arrangements) * Distance(first1, last1).
|
static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
ArrangeCopy(TBidIter first1,
TBidIter last1,
TOutIter first2,
int count)
Generates all arrangements of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where where n = (number of arrangements) * Distance(first1, last1).
|
static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
ArrangeCopy(TBidIter first1,
TBidIter last1,
TOutIter first2,
int count,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Generates all arrangements of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where where n = (number of arrangements) * Distance(first1, last1).
|
static <T> int |
CombineCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
int count)
Generates all combinations of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where n = (number of combinations) * Distance(first1, last1).
|
static <T,TOutIter extends IOutIter<T,TOutIter>> |
CombineCopy(T[] x,
int first1,
int last1,
TOutIter first2,
int count)
Generates all combinations of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where n = (number of combinations) * Distance(first1, last1).
|
static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
CombineCopy(TBidIter first1,
TBidIter last1,
TOutIter first2,
int count)
Generates all combinations of elements from the [first1, last1) range
taken count at a time, into the range* [first2, first2 + n),
where n = (number of combinations) * Distance(first1, last1).
|
static <T extends java.lang.Comparable<T>> |
NextPermutation(T[] x,
int first,
int last)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically next greater permutation if it exists.
|
static <T> boolean |
NextPermutation(T[] x,
int first,
int last,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically next greater permutation if it exists,
where the sense of next is specified with a binary predicate.
|
static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>> |
NextPermutation(TBidIter first,
TBidIter last)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically next greater permutation if it exists.
|
static <T,TBidIter extends IBidIter<T,TBidIter>> |
NextPermutation(TBidIter first,
TBidIter last,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically next greater permutation if it exists,
where the sense of next is specified with a binary predicate.
|
static <T> int |
Partition(T[] x,
int first,
int last,
IPredicate<T> pred)
Classifies elements in a range into two disjoint sets,
with those elements satisfying a unary predicate preceding those
that fail to satisfy it.
|
static <T,TBidIter extends IBidIter<T,TBidIter>> |
Partition(TBidIter first,
TBidIter last,
IPredicate<T> pred)
Classifies elements in a range into two disjoint sets,
with those elements satisfying a unary predicate preceding those
that fail to satisfy it.
|
static <T extends java.lang.Comparable<T>> |
PermuteCopy(T[] x,
int first1,
int last1,
T[] y,
int first2)
Generates all permutations from the range [first1, last1) into the range
[first2, first2 + n), where n = (number of permutations) * Distance(first1, last1).
|
static <T> int |
PermuteCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Generates all permutations from the range [first1, last1) into the range
[first2, first2 + n), where n = (number of permutations) * Distance(first1, last1).
|
static <T extends java.lang.Comparable<T>,TOutIter extends IOutIter<T,TOutIter>> |
PermuteCopy(T[] x,
int first1,
int last1,
TOutIter first2)
Generates all permutations from the range [first1, last1) into the range
[first2, first2 + n), where n = (number of permutations) * Distance(first1, last1).
|
static <T,TOutIter extends IOutIter<T,TOutIter>> |
PermuteCopy(T[] x,
int first1,
int last1,
TOutIter first2,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Generates all permutations from the range [first1, last1) into the range
[first2, first2 + n), where n = (number of permutations) * Distance(first1, last1).
|
static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
PermuteCopy(TBidIter first1,
TBidIter last1,
TOutIter first2)
Generates all permutations from the range [first1, last1) into the range
[first2, first2 + n), where n = (number of permutations) * Distance(first1, last1).
|
static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
PermuteCopy(TBidIter first1,
TBidIter last1,
TOutIter first2,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Generates all permutations from the range [first1, last1) into the range
[first2, first2 + n), where n = (number of permutations) * Distance(first1, last1).
|
static <T> void |
PReverse(T[] x,
int first,
int last)
Parallel Reverse: Reverses the order of the elements within a range.
|
static <T,TBidIter extends IBidIter<T,TBidIter>> |
PReverse(TBidIter first,
TBidIter last)
Parallel Reverse: Reverses the order of the elements within a range.
|
static <T> int |
PReverseCopy(T[] x,
int first1,
int last1,
T[] y,
int first2)
Parallel ReverseCopy: Reverses the order of the elements within a source range
while copying them into a destination range.
|
static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
PReverseCopy(TBidIter first1,
TBidIter last1,
TOutIter first2)
Parallel ReverseCopy: Reverses the order of the elements within a source range
while copying them into a destination range.
|
static <T extends java.lang.Comparable<T>> |
PrevPermutation(T[] x,
int first,
int last)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically previous smaller permutation if it exists.
|
static <T> boolean |
PrevPermutation(T[] x,
int first,
int last,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically previous smaller permutation if it exists,
where the sense of next is specified with a binary predicate.
|
static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>> |
PrevPermutation(TBidIter first,
TBidIter last)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically previous smaller permutation if it exists.
|
static <T,TBidIter extends IBidIter<T,TBidIter>> |
PrevPermutation(TBidIter first,
TBidIter last,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Reorders the elements in a range so that the original ordering
is replaced by the lexicographically previous smaller permutation if it exists,
where the sense of next is specified with a binary predicate.
|
static <T> void |
PRotate(T[] x,
int first,
int middle,
int last)
Parallel Rotate: Exchanges the elements in two adjacent ranges.
|
static <T,TFwdIter extends IFwdIter<T,TFwdIter>> |
PRotate(TFwdIter first,
TFwdIter middle,
TFwdIter last)
Parallel Rotate: Exchanges the elements in two adjacent ranges.
|
static <T> int |
PRotateCopy(T[] x,
int first1,
int middle,
int last1,
T[] y,
int first2)
Parallel RotateCopy: Exchanges the elements in two adjacent ranges within a source
range and copies the result to a destination range.
|
static <T,TFwdIter extends IFwdIter<T,TFwdIter>,TOutIter extends IOutIter<T,TOutIter>> |
PRotateCopy(TFwdIter first,
TFwdIter middle,
TFwdIter last,
TOutIter result)
Parallel RotateCopy: Exchanges the elements in two adjacent ranges within a source
range and copies the result to a destination range.
|
static <T> int |
RandomSample(T[] x,
int first,
int last,
T[] y,
int destFirst,
int destLast)
Copies a sample of n elements, where n is min(last – first,
destLast - destFirst), from the range [first, last) into the range
[destFirst, destLast).
|
static <T,TInpIter extends IInpIter<T,TInpIter>,TRanIter extends IRanIter<T,TRanIter>> |
RandomSample(TInpIter first,
TInpIter last,
TRanIter destFirst,
TRanIter destLast)
Copies a sample of n elements, where n is min(last – first,
destLast - destFirst), from the range [first, last) into the range
[destFirst, destLast).
|
static <T> void |
RandomShuffle(T[] x,
int first,
int last)
Rearranges a sequence of N elements in a range into one
of N! possible arrangements selected at random.
|
static <T,TRanIter extends IRanIter<T,TRanIter>> |
RandomShuffle(TRanIter first,
TRanIter last)
Rearranges a sequence of N elements in a range into one
of N! possible arrangements selected at random.
|
static <T> void |
Reverse(T[] x,
int first,
int last)
Reverses the order of the elements within a range.
|
static <T,TBidIter extends IBidIter<T,TBidIter>> |
Reverse(TBidIter first,
TBidIter last)
Reverses the order of the elements within a range.
|
static <T> int |
ReverseCopy(T[] x,
int first1,
int last1,
T[] y,
int first2)
Reverses the order of the elements within a source range
while copying them into a destination range.
|
static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
ReverseCopy(TBidIter last1,
long n,
TOutIter first2)
Reverses the order of the elements within a source range
while copying them into a destination range.
|
static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> |
ReverseCopy(TBidIter first1,
TBidIter last1,
TOutIter first2)
Reverses the order of the elements within a source range
while copying them into a destination range.
|
static <T> void |
Rotate(T[] x,
int first,
int middle,
int last)
Exchanges the elements in two adjacent ranges.
|
static <T,TFwdIter extends IFwdIter<T,TFwdIter>> |
Rotate(TFwdIter first,
TFwdIter middle,
TFwdIter last)
Exchanges the elements in two adjacent ranges.
|
static <T> int |
RotateCopy(T[] x,
int first1,
int middle,
int last1,
T[] y,
int first2)
Exchanges the elements in two adjacent ranges within a source
range and copies the result to a destination range.
|
static <T,TFwdIter extends IFwdIter<T,TFwdIter>,TOutIter extends IOutIter<T,TOutIter>> |
RotateCopy(TFwdIter first,
TFwdIter middle,
TFwdIter last,
TOutIter result)
Exchanges the elements in two adjacent ranges within a source
range and copies the result to a destination range.
|
static <T> int |
StablePartition(T[] x,
int first,
int last,
IPredicate<T> pred)
Classifies elements in a range into two disjoint sets, with
those elements satisfying a unary predicate preceding those that fail
to satisfy it, preserving the relative order of equivalent elements.
|
static <T,TFwdIter extends IFwdIter<T,TFwdIter>> |
StablePartition(TFwdIter first,
TFwdIter last,
IPredicate<T> pred)
Classifies elements in a range into two disjoint sets, with
those elements satisfying a unary predicate preceding those that fail
to satisfy it, preserving the relative order of equivalent elements.
|
public static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>> boolean NextPermutation(TBidIter first, TBidIter last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.TBidIter - The type of iterators in the specified range.first - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.public static <T,TBidIter extends IBidIter<T,TBidIter>> boolean NextPermutation(TBidIter first, TBidIter last, IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.TBidIter - The type of iterators in the specified range.first - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>> boolean NextPermutation(T[] x,
int first,
int last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.x - The specified array.first - An integer addressing the position of
the first element in the range to be permuted.last - An integer addressing the position one
past the final element in the range to be permuted.public static <T> boolean NextPermutation(T[] x,
int first,
int last,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.x - The specified array.first - An integer addressing the position of
the first element in the range to be permuted.last - An integer addressing the position one
past the final element in the range to be permuted.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>> boolean PrevPermutation(TBidIter first, TBidIter last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.TBidIter - The type of iterators in the specified range.first - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.public static <T,TBidIter extends IBidIter<T,TBidIter>> boolean PrevPermutation(TBidIter first, TBidIter last, IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.TBidIter - The type of iterators in the specified range.first - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>> boolean PrevPermutation(T[] x,
int first,
int last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.x - The specified array.first - An integer addressing the position of
the first element in the range to be permuted.last - An integer addressing the position one
past the final element in the range to be permuted.public static <T> boolean PrevPermutation(T[] x,
int first,
int last,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified range.x - The specified array.first - An integer addressing the position of
the first element in the range to be permuted.last - An integer addressing the position one
past the final element in the range to be permuted.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter PermuteCopy(TBidIter first1, TBidIter last1, TOutIter first2)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last1 - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.public static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter PermuteCopy(TBidIter first1, TBidIter last1, TOutIter first2, IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last1 - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>,TOutIter extends IOutIter<T,TOutIter>> TOutIter PermuteCopy(T[] x, int first1, int last1, TOutIter first2)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TOutIter - The type of iterators in the output range.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.public static <T,TOutIter extends IOutIter<T,TOutIter>> TOutIter PermuteCopy(T[] x, int first1, int last1, TOutIter first2, IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TOutIter - The type of iterators in the output range.x - The specified input array.first1 - An integer addressing the position of
the first element in the range to be permuted.last1 - An integer addressing to the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>> int PermuteCopy(T[] x,
int first1,
int last1,
T[] y,
int first2)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.public static <T> int PermuteCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing the position of
the first element in the range to be permuted.last1 - An integer addressing to the position one
past the final element in the range to be permuted.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter CombineCopy(TBidIter first1, TBidIter last1, TOutIter first2, int count)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last1 - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.public static <T,TOutIter extends IOutIter<T,TOutIter>> TOutIter CombineCopy(T[] x, int first1, int last1, TOutIter first2, int count)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TOutIter - The type of iterators in the output range.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.public static <T> int CombineCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
int count)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.public static <T extends java.lang.Comparable<T>,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter ArrangeCopy(TBidIter first1, TBidIter last1, TOutIter first2, int count)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last1 - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.public static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter ArrangeCopy(TBidIter first1, TBidIter last1, TOutIter first2, int count, IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position of
the first element in the range to be permuted.last1 - A bidirectional iterator pointing to the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>,TOutIter extends IOutIter<T,TOutIter>> TOutIter ArrangeCopy(T[] x, int first1, int last1, TOutIter first2, int count)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TOutIter - The type of iterators in the output range.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.public static <T,TOutIter extends IOutIter<T,TOutIter>> TOutIter ArrangeCopy(T[] x, int first1, int last1, TOutIter first2, int count, IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.TOutIter - The type of iterators in the output range.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.first2 - An output iterator addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T extends java.lang.Comparable<T>> int ArrangeCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
int count)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.public static <T> int ArrangeCopy(T[] x,
int first1,
int last1,
T[] y,
int first2,
int count,
IFunc2Arg<T,T,java.lang.Boolean> pred)
Remarks: The ranges referenced must be valid. The complexity is exponential with the range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing to the position of
the first element in the range to be permuted.last1 - An integer addressing the position one
past the final element in the range to be permuted.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.count - The number of elements taken at a time from the source range.pred - A user-defined predicate function object that defines the
comparison criterion to be satisfied by successive elements in the ordering.public static <T,TBidIter extends IBidIter<T,TBidIter>> void Reverse(TBidIter first, TBidIter last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the specified ranges.first - A bidirectional iterator pointing to the position of
the first element in the range to be reversed.last - A bidirectional iterator pointing to the position one
past the final element in the range to be reversed.public static <T,TBidIter extends IBidIter<T,TBidIter>> void PReverse(TBidIter first, TBidIter last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the specified ranges.first - A bidirectional iterator pointing to the position of
the first element in the range to be reversed.last - A bidirectional iterator pointing to the position one
past the final element in the range to be reversed.public static <T> void Reverse(T[] x,
int first,
int last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified ranges.x - The specified array.first - An integer addressing the position of
the first element in the range to be reversed.last - An integer addressing the position one
past the final element in the range to be reversed.public static <T> void PReverse(T[] x,
int first,
int last)
Remarks: The referenced range must be valid. The complexity is linear with at most (last – first) / 2 swaps.
T - The type of elements in the specified ranges.x - The specified array.first - An integer addressing the position of
the first element in the range to be reversed.last - An integer addressing the position one
past the final element in the range to be reversed.public static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter ReverseCopy(TBidIter first1, TBidIter last1, TOutIter first2)
Remarks: The source and destination ranges referenced must be valid. The complexity is linear with the size of the source range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position
of the first element in the source range.last1 - A bidirectional iterator pointing to the position
one past the final element in the source range.first2 - An output iterator pointing to the position
of the first element in the destination range.public static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter ReverseCopy(TBidIter last1, long n, TOutIter first2)
Remarks: The source and destination ranges referenced must be valid. The complexity is linear with the size of the source range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.last1 - A bidirectional iterator pointing to the position
one past the final element in the source range.n - The number of elements in the source range.first2 - An output iterator pointing to the position
of the first element in the destination range.public static <T,TBidIter extends IBidIter<T,TBidIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter PReverseCopy(TBidIter first1, TBidIter last1, TOutIter first2)
Remarks: The source and destination ranges referenced must be valid. The complexity is linear with the size of the source range.
T - The type of elements in the specified ranges.TBidIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first1 - A bidirectional iterator pointing to the position
of the first element in the source range.last1 - A bidirectional iterator pointing to the position
one past the final element in the source range.first2 - An output iterator pointing to the position
of the first element in the destination range.public static <T> int ReverseCopy(T[] x,
int first1,
int last1,
T[] y,
int first2)
Remarks: The source and destination ranges referenced must be valid. The complexity is linear with the size of the source range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing the position
of the first element in the source range.last1 - An integer addressing the position
one past the final element in the source range.y - The specified output array.first2 - An integer addressing the position
of the first element in the destination range.public static <T> int PReverseCopy(T[] x,
int first1,
int last1,
T[] y,
int first2)
Remarks: The source and destination ranges referenced must be valid. The complexity is linear with the size of the source range.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing the position
of the first element in the source range.last1 - An integer addressing the position
one past the final element in the source range.y - The specified output array.first2 - An integer addressing the position
of the first element in the destination range.public static <T,TFwdIter extends IFwdIter<T,TFwdIter>> void Rotate(TFwdIter first, TFwdIter middle, TFwdIter last)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last – first) swaps.
T - The type of elements in the specified ranges.TFwdIter - The type of iterators in the specified ranges.first - A forward iterator addressing the position of
the first element in the range to be rotated.middle - A forward iterator defining the boundary within
the range that addresses the position of the first element in the
second part of the range.last - A forward iterator addressing the position one past
the final element in the range to be rotated.public static <T,TFwdIter extends IFwdIter<T,TFwdIter>> void PRotate(TFwdIter first, TFwdIter middle, TFwdIter last)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last – first) swaps.
T - The type of elements in the specified ranges.TFwdIter - The type of iterators in the specified ranges.first - A forward iterator addressing the position of
the first element in the range to be rotated.middle - A forward iterator defining the boundary within
the range that addresses the position of the first element in the
second part of the range.last - A forward iterator addressing the position one past
the final element in the range to be rotated.public static <T> void Rotate(T[] x,
int first,
int middle,
int last)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last – first) swaps.
T - The type of elements in the specified ranges.x - The specified array.first - An integer addressing the position of
the first element in the range to be rotated.middle - An integer defining the boundary within
the range that addresses the position of the first element in the
second part of the range.last - An integer addressing the position one past
the final element in the range to be rotated.public static <T> void PRotate(T[] x,
int first,
int middle,
int last)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last – first) swaps.
T - The type of elements in the specified ranges.x - The specified array.first - An integer addressing the position of
the first element in the range to be rotated.middle - An integer defining the boundary within
the range that addresses the position of the first element in the
second part of the range.last - An integer addressing the position one past
the final element in the range to be rotated.public static <T,TFwdIter extends IFwdIter<T,TFwdIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter RotateCopy(TFwdIter first, TFwdIter middle, TFwdIter last, TOutIter result)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last – first) swaps.
T - The type of elements in the specified ranges.TFwdIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first - A forward iterator addressing the position of the
first element in the range to be rotated.middle - A forward iterator defining the boundary within the
range that addresses the position of the first element in the second part
of the range.last - A forward iterator addressing the position one past
the final element in the range to be rotated.result - An output iterator addressing the position of the
first element in the destination range.public static <T,TFwdIter extends IFwdIter<T,TFwdIter>,TOutIter extends IOutIter<T,TOutIter>> TOutIter PRotateCopy(TFwdIter first, TFwdIter middle, TFwdIter last, TOutIter result)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last – first) swaps.
T - The type of elements in the specified ranges.TFwdIter - The type of iterators in the input range.TOutIter - The type of iterators in the output range.first - A forward iterator addressing the position of the
first element in the range to be rotated.middle - A forward iterator defining the boundary within the
range that addresses the position of the first element in the second part
of the range.last - A forward iterator addressing the position one past
the final element in the range to be rotated.result - An output iterator addressing the position of the
first element in the destination range.public static <T> int RotateCopy(T[] x,
int first1,
int middle,
int last1,
T[] y,
int first2)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last1 – first1) swaps.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing the position of the
first element in the range to be rotated.middle - An integer defining the boundary within the
range that addresses the position of the first element in the second part
of the range.last1 - An integer addressing the position one past
the final element in the range to be rotated.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.public static <T> int PRotateCopy(T[] x,
int first1,
int middle,
int last1,
T[] y,
int first2)
Remarks: The ranges referenced must be valid. The complexity is linear with at most (last1 – first1) swaps.
T - The type of elements in the specified ranges.x - The specified input array.first1 - An integer addressing the position of the
first element in the range to be rotated.middle - An integer defining the boundary within the
range that addresses the position of the first element in the second part
of the range.last1 - An integer addressing the position one past
the final element in the range to be rotated.y - The specified output array.first2 - An integer addressing the position of the
first element in the destination range.public static <T,TBidIter extends IBidIter<T,TBidIter>> TBidIter Partition(TBidIter first, TBidIter last, IPredicate<T> pred)
Remarks: The referenced range must be valid. The complexity is linear: there are (last – first) applications of pred and at most (last – first) / 2 swaps.
T - The type of elements in the specified range.TBidIter - The type of iterators in the specified rangesfirst - A bidirectional iterator addressing the
position of the first element in the range to be partitioned.last - A bidirectional iterator addressing the position
one past the final element in the range to be partitioned.pred - A user-defined predicate function object that defines the
condition to be satisfied if an element is to be classified.public static <T> int Partition(T[] x,
int first,
int last,
IPredicate<T> pred)
Remarks: The referenced range must be valid. The complexity is linear: there are (last – first) applications of pred and at most (last – first) / 2 swaps.
T - The type of elements in the specified range.x - The specified array.first - An integer addressing the
position of the first element in the range to be partitioned.last - An integer addressing the position
one past the final element in the range to be partitioned.pred - A user-defined predicate function that defines the
condition to be satisfied if an element is to be classified.public static <T,TFwdIter extends IFwdIter<T,TFwdIter>> TFwdIter StablePartition(TFwdIter first, TFwdIter last, IPredicate<T> pred)
Remarks: The referenced range must be valid. The StablePartition algorithm is stable and guarantees that the relative ordering of equivalent elements will be preserved.
T - The type of elements in the specified range.TFwdIter - The type of iterators in the specified range.first - A forward iterator addressing the position
of the first element in the range to be partitioned.last - A forward iterator addressing the position
one past the final element in the range to be partitioned.pred - A user-defined predicate function object that defines
the condition to be satisfied if an element is to be classified.public static <T> int StablePartition(T[] x,
int first,
int last,
IPredicate<T> pred)
Remarks: The referenced range must be valid. The StablePartition algorithm is stable and guarantees that the relative ordering of equivalent elements will be preserved.
T - The type of elements in the specified range.x - The specified input array.first - An integer addressing the position
of the first element in the range to be partitioned.last - An integer addressing the position
one past the final element in the range to be partitioned.pred - A user-defined predicate function object that defines
the condition to be satisfied if an element is to be classified.public static <T,TRanIter extends IRanIter<T,TRanIter>> void RandomShuffle(TRanIter first, TRanIter last)
Remarks: The referenced range must be valid.
T - The type of elements in the specified range.TRanIter - The type of iterators in the specified range.first - A random-access iterator addressing the
position of the first element in the range to be rearranged.last - A random-access iterator addressing the position
one past the final element in the range to be rearranged.public static <T> void RandomShuffle(T[] x,
int first,
int last)
Remarks: The referenced range must be valid.
T - The type of elements in the specified range.x - The specified array.first - An integer addressing the
position of the first element in the range to be rearranged.last - An integer addressing the position
one past the final element in the range to be rearranged.public static <T,TInpIter extends IInpIter<T,TInpIter>,TRanIter extends IRanIter<T,TRanIter>> TRanIter RandomSample(TInpIter first, TInpIter last, TRanIter destFirst, TRanIter destLast)
Remarks: The ranges referenced must be valid.
T - The type of elements in the specified ranges.TInpIter - The type of iterators in the input range.TRanIter - The type of iterators in the output range.first - An input iterator addressing the
position of the first element in the source range.last - An input iterator addressing the position
one past the final element in the source range.destFirst - A random-access iterator addressing the
position of the first element in the destination range.destLast - A random-access iterator addressing the position
one past the final element in the destination range.public static <T> int RandomSample(T[] x,
int first,
int last,
T[] y,
int destFirst,
int destLast)
Remarks: The ranges referenced must be valid.
T - The type of elements in the specified ranges.x - The specified input array.first - An integer addressing the
position of the first element in the source range.last - An integer addressing the position
one past the final element in the source range.y - The specified output array.destFirst - An integer addressing the
position of the first element in the destination range.destLast - An integer addressing the position
one past the final element in the destination range.Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.