Sunday, October 17, 2004

S.T.L. Algorithms


  • adjacent_find Find the first adjacent pair of elements in a sequence that are equivalent.

  • binary_search Performs a binary search for a value on a container.

  • copy Copies a range of elements.

  • copy_backward copies values in the range specified by [first, last) into the range specified by [result - (last - first), result), starting from the end of the sequence (last-1) and progressing to the front (first).

  • count Count the number of elements in a container that satisfy a given condition.

  • count_if lets you specify a predicate, and increments n each time an element in the sequence satisfies the predicate.

  • equal Compares two ranges for equivalence.

  • equal_range Determines the valid range for insertion of a value in a container.

  • fill, fill_n Initializes a range with a given value.

  • find Finds a given value

  • find_first_not_of Finds first element not of a given value

  • find_first_of Finds first element of a given value

  • find_if Finds first element of a value which satisfies a codition basecd on a predicate.

  • for_each Applies a function to each element in a range.

  • generate Initializes a range with results of operation

  • generate_n Initializes a range consisting of n elements with results of operation.

  • includes Returns true if every element in first range occurs in second range.

  • inplace_merge Merges ranges 1 and 2 int range 1.

  • iter_swap Swaps values pointed at by two iterators.

  • lexicographical_compare Compares two ranges lexicographically.

  • lower_bound Determines the first valid position for a value in a sorted container.

  • make_heap Imposes a heap on a specified range.

  • max Returns the maximum of a two values.

  • max_element Returns an iterator to the maximum element in a sequence.

  • merge Merges two ranges into output.

  • min Returns the minimum of a two values.

  • min_element Returns an iterator to the minimum element.

  • mismatch Compares two sequences and returns the first two elements that don't match each other.

  • next_permutation Generates successive permutations of a sequence based on an ordering function.

  • nth_element Arranges a container so that all elems lower than n are below in order and all elems higher are above

  • partial_sort Sorts the part of a container delimited by the iterators.

  • partial_sort_copy Copies the partially sorted range see partial_sort to another container/ range

  • partition Places all of the values that satisfy the given predicate before all of the values that do not.

  • pop_heap Pops the heap, removes the ordering imposed by the heap operations make_heap and push_heap

  • prev_permutation Returns true and transforms the sequence if the previous permutation in a generated sequence of permutations can be found.

  • push_heap Orders the heap with the dereferenced first value in the heap as the highest value.

  • random_shuffle Randomly shuffles the elements in a range.

  • remove Move values indicated by an == operation to the front of a container, and return an iterator that describes where the sequence of desired elements ends.

  • remove_copy Copies desired elements to a different container based on values indicated by an == operation.

  • remove_copy_if Copies desired elements to a different container based on values indicated by a predicate.

  • remove_if Move values indicated by a predicate to the front of a container, and return an iterator that describes where the sequence of desired elements ends.

  • replace Substitutes values indicated by an == operation stored in a collection with new values.

  • replace_copy Leaves the original sequence intact and places the revised sequence into result using a == operation.

  • replace_copy_if Leaves the original sequence intact and places the revised sequence into result using a predicate

  • replace_if Substitutes values indicated by a predicate stored in a collection with new values.

  • reverse Reverses the order of elements in a range.

  • reverse_copy Copies the elements of a sequence to another sequence in reverse order.

  • rotate Rotates the elements in a range around a specified element.

  • rotate_copy Copies the rotated see rotate elements from one range to another.

  • search Finds a subsequence within a sequence of values that is element-wise equal to the values in an indicated range.

  • set_difference Outputs a range consisting of values found in only the first of two input ranges.

  • set_intersection Outputs a range of values present in both ranges.

  • set_symmetric_difference Outputs a range consisting of values found exclusively in either of two input ranges.

  • set_union Outputs a range of values consisting of one of any values contained in either or both two input ranges.

  • sort Sorts the elements of a range.

  • sort_heap Sorts a heap.

  • stable_partition Places all of the values that satisfy the given predicate before all of the values that do not, while maintaining the relative order of elements in each group.

  • stable_sort Sorts a range preserving the relative order of the equal elements.

  • swap Swaps two values.

  • swap_ranges Swaps two ranges.

  • transform Produces an output that is a transformation of its input based on an operation.

  • unique Removes consecutive duplicates from a range of values.

  • unique_copy Removes consecutive duplicates from a range of values and places the resulting unique values into the result.

  • upper_bound Determines the last valid position for a value in a sorted container.

No comments: