Miscellaneous C++ Sequence Methods

The following C++ Sequence methods take a variety of input sequence arguments and produce result sequences or scalar types as described below:

Sequence<uint8> histogram(T minValue, T maxValue, mco_size_t nIntervals) const
Builds a histogram for the object's sequence. Minimum (inclusive) and maximum (exclusive) values for the input sequence should be specified, as well as the number of intervals (histogram columns). The number of intervals should not be greater than the tile size.
void sort(std::vector<T> const& elements, std::vector<mco_seq_no_t>& permutation, mco_seq_order_t order)
Sorts the sequence elements previously extracted using get() and constructs a permutation array (of positions) that can be used to access the elements of other sequences (also extracted to arrays).
void permutate(Sequence<Chars>& result, std::vector<mco_seq_no_t> const& permutation) const
Sorts the sequence elements using the permutation produced by sort().

The following group of methods applies a specific operation via the function pointer func to this Sequence, or to this and the input Sequence as left and right operands.

Sequence<T> apply(unary_function_t func) const
Applies the unary function pointed to by the argument func to this Sequence.
Sequence<T> apply(Sequence<T> const& other, binary_function_t func) const;
Applies the binary function pointed to by the argument func to this Sequence and other.