diff --git a/.gitignore b/.gitignore index 2a8f4a97..3a6739eb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # ====================================================== # CUSTOM IGNORE # ====================================================== +handbook/ +lib/ *.bat *.lnk \ No newline at end of file diff --git a/ts/src/std/API.ts b/ts/src/std/API.ts index c3f89dc8..b4a8a6e9 100644 --- a/ts/src/std/API.ts +++ b/ts/src/std/API.ts @@ -16,7 +16,6 @@ namespace std { } - /** * Base classes composing STL in background. * diff --git a/ts/src/std/Algorithm.ts b/ts/src/std/Algorithm.ts index bddf70d2..11f7943f 100644 --- a/ts/src/std/Algorithm.ts +++ b/ts/src/std/Algorithm.ts @@ -23,9 +23,9 @@ namespace std FOR_EACH --------------------------------------------------------- */ /** - *
Apply function to range.
+ * Apply function to range. * - *Applies function fn to each of the elements in the range [first, last).
+ * Applies function fn to each of the elements in the range [first, last). * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -70,11 +70,11 @@ namespace std AGGREGATE CONDITIONS --------------------------------------------------------- */ /** - *Test condition on all elements in range.
+ * Test condition on all elements in range. * - * Returns true
if pred returns true
for all the elements in the range
+ * Returns true
if pred returns true
for all the elements in the range
* [first, last) or if the range is {@link Container.empty empty}, and false
otherwise.
- *
Test if any element in range fulfills condition.
+ * Test if any element in range fulfills condition. * - * Returns true
if pred returns true for any of the elements in the range
- * [first, last), and false
otherwise.
true
if pred returns true for any of the elements in the range
+ * [first, last), and false
otherwise.
*
- * If [first, last) is an {@link Container.empty empty} range, the function returns
- * false
.
false
.
*
* @param first An {@link Iterator} to the initial position in a sequence.
* @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last),
@@ -129,11 +129,10 @@ namespace std
}
/**
- * Test if no elements fulfill condition.
+ * Test if no elements fulfill condition. * - * Returns true
if pred returns false for all the elements in the range
+ * Returns true
if pred returns false for all the elements in the range
* [first, last) or if the range is {@link Container.empty empty}, and false
otherwise.
- *
Test whether the elements in two ranges are equal.
+ * Test whether the elements in two ranges are equal. * - * Compares the elements in the range [first1, last1) with those in the range beginning at
- * first2, and returns true
if all of the elements in both ranges match.
true
if all of the elements in both ranges match.
*
* @param first1 An {@link Iterator} to the initial position of the first sequence.
* @param last1 An {@link Iterator} to the final position in a sequence. The range used is
@@ -173,10 +172,10 @@ namespace std
(first1: InputIterator, last1: InputIterator, first2: IteratorTest whether the elements in two ranges are equal.
+ * Test whether the elements in two ranges are equal. * - * Compares the elements in the range [first1, last1) with those in the range beginning at
- * first2, and returns true
if all of the elements in both ranges match.
true
if all of the elements in both ranges match.
*
* @param first1 An {@link Iterator} to the initial position of the first sequence.
* @param last1 An {@link Iterator} to the final position in a sequence. The range used is
@@ -200,7 +199,7 @@ namespace std
export function equalLexicographical less-than comparison.
+ * Lexicographical less-than comparison. * - * Returns true
if the range [first1, last1) compares lexicographically less
- * than the range [first2, last2).
true
if the range [first1, last1) compares lexicographically less
+ * than the range [first2, last2).
*
- * A lexicographical comparison is the kind of comparison generally used to sort words alphabetically in + * A lexicographical comparison is the kind of comparison generally used to sort words alphabetically in * dictionaries; It involves comparing sequentially the elements that have the same position in both ranges against * each other until one element is not equivalent to the other. The result of comparing these first non-matching - * elements is the result of the lexicographical comparison.
+ * elements is the result of the lexicographical comparison. * - *If both sequences compare equal until one of them ends, the shorter sequence is lexicographically less - * than the longer one.
+ * If both sequences compare equal until one of them ends, the shorter sequence is lexicographically less + * than the longer one. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -245,18 +244,18 @@ namespace std (first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): boolean; /** - *Lexicographical comparison.
+ * Lexicographical comparison. * - * Returns true
if the range [first1, last1) compares lexicographically
- * relationship than the range [first2, last2).
true
if the range [first1, last1) compares lexicographically
+ * relationship than the range [first2, last2).
*
- * A lexicographical comparison is the kind of comparison generally used to sort words alphabetically in + * A lexicographical comparison is the kind of comparison generally used to sort words alphabetically in * dictionaries; It involves comparing sequentially the elements that have the same position in both ranges against * each other until one element is not equivalent to the other. The result of comparing these first non-matching - * elements is the result of the lexicographical comparison.
+ * elements is the result of the lexicographical comparison. * - *If both sequences compare equal until one of them ends, the shorter sequence is lexicographically - * relationship than the longer one.
+ * If both sequences compare equal until one of them ends, the shorter sequence is lexicographically + * relationship than the longer one. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -285,7 +284,7 @@ namespace std Iterator1 extends IteratorFind value in range.
+ * Find value in range. * - *Returns an iterator to the first element in the range [first, last) that compares equal to - * val. If no such element is found, the function returns last.
+ * Returns an iterator to the first element in the range [first, last) that compares equal to + * val. If no such element is found, the function returns last. * - *The function uses {@link equal_to equal_to} to compare the individual elements to val.
+ * The function uses {@link equal_to equal_to} to compare the individual elements to val. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -326,17 +325,17 @@ namespace std (first: InputIterator, last: InputIterator, val: T): InputIterator { for (let it = first; !it.equals(last); it = it.next() as InputIterator) - if (std.equal_to(it.value, val)) + if (equal_to(it.value, val)) return it; return last; } /** - *Find element in range.
+ * Find element in range. * - * Returns an iterator to the first element in the range [first, last) for which pred returns
- * true
. If no such element is found, the function returns last.
true
. If no such element is found, the function returns last.
*
* @param first An {@link Iterator} to the initial position in a sequence.
* @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last),
@@ -361,10 +360,10 @@ namespace std
}
/**
- * Find element in range.
+ * Find element in range. * - * Returns an iterator to the first element in the range [first, last) for which pred returns
- * true
. If no such element is found, the function returns last.
true
. If no such element is found, the function returns last.
*
* @param first An {@link Iterator} to the initial position in a sequence.
* @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last),
@@ -388,18 +387,18 @@ namespace std
}
/**
- * Find last subsequence in range.
+ * Find last subsequence in range. * - *Searches the range [first1, last1) for the last occurrence of the sequence defined by + * Searches the range [first1, last1) for the last occurrence of the sequence defined by * [first2, last2), and returns an {@link Iterator} to its first element, or last1,/i> if no - * occurrences are found.
+ * occurrences are found. * - * The elements in both ranges are compared sequentially using {@link equal_to}: A subsequence of
+ * The elements in both ranges are compared sequentially using {@link equal_to}: A subsequence of
* [first1, last1) is considered a match only when this is true
for all the elements of
- * [first2, last2).
This function returns the last of such occurrences. For an algorithm that returns the first instead, see - * {@link search}.
+ * This function returns the last of such occurrences. For an algorithm that returns the first instead, see + * {@link search}. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -421,18 +420,18 @@ namespace std (first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1; /** - *Find last subsequence in range.
+ * Find last subsequence in range. * - *Searches the range [first1, last1) for the last occurrence of the sequence defined by + * Searches the range [first1, last1) for the last occurrence of the sequence defined by * [first2, last2), and returns an {@link Iterator} to its first element, or last1,/i> if no - * occurrences are found.
+ * occurrences are found. * - * The elements in both ranges are compared sequentially using pred: A subsequence of
+ * The elements in both ranges are compared sequentially using pred: A subsequence of
* [first1, last1) is considered a match only when this is true
for all the elements of
- * [first2, last2).
This function returns the last of such occurrences. For an algorithm that returns the first instead, see - * {@link search}.
+ * This function returns the last of such occurrences. For an algorithm that returns the first instead, see + * {@link search}. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -460,7 +459,7 @@ namespace stdFind element from set in range.
+ * Find element from set in range. * - *Returns an iterator to the first element in the range [first1, last1) that matches any of the - * elements in [first2, last2). If no such element is found, the function returns last1.
+ * Returns an iterator to the first element in the range [first1, last1) that matches any of the + * elements in [first2, last2). If no such element is found, the function returns last1. * - *The elements in [first1, last1) are sequentially compared to each of the values in - * [first2, last2) using {@link equal_to}, until a pair matches.
+ * The elements in [first1, last1) are sequentially compared to each of the values in + * [first2, last2) using {@link equal_to}, until a pair matches. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -515,13 +514,13 @@ namespace std (first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1; /** - *Find element from set in range.
+ * Find element from set in range. * - *Returns an iterator to the first element in the range [first1, last1) that matches any of the - * elements in [first2, last2). If no such element is found, the function returns last1.
+ * Returns an iterator to the first element in the range [first1, last1) that matches any of the + * elements in [first2, last2). If no such element is found, the function returns last1. * - *The elements in [first1, last1) are sequentially compared to each of the values in - * [first2, last2) using pred, until a pair matches.
+ * The elements in [first1, last1) are sequentially compared to each of the values in + * [first2, last2) using pred, until a pair matches. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -548,7 +547,7 @@ namespace stdFind equal adjacent elements in range.
+ * Find equal adjacent elements in range. * - *Searches the range [first, last) for the first occurrence of two consecutive elements that match, - * and returns an {@link Iterator} to the first of these two elements, or last if no such pair is found.
+ * Searches the range [first, last) for the first occurrence of two consecutive elements that match, + * and returns an {@link Iterator} to the first of these two elements, or last if no such pair is found. * - *Two elements match if they compare equal using {@link equal_to}.
+ * Two elements match if they compare equal using {@link equal_to}. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -579,12 +578,12 @@ namespace std (first: InputIterator, last: InputIterator): InputIterator; /** - *Find equal adjacent elements in range.
+ * Find equal adjacent elements in range. * - *Searches the range [first, last) for the first occurrence of two consecutive elements that match, - * and returns an {@link Iterator} to the first of these two elements, or last if no such pair is found.
+ * Searches the range [first, last) for the first occurrence of two consecutive elements that match, + * and returns an {@link Iterator} to the first of these two elements, or last if no such pair is found. * - *Two elements match if they compare equal using pred.
+ * Two elements match if they compare equal using pred. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -601,7 +600,7 @@ namespace std (first: InputIterator, last: InputIterator, pred: (x: T, y: T) => boolean): InputIterator; export function adjacent_findSearch range for subsequence.
+ * Search range for subsequence. * - *Searches the range [first1, last1) for the first occurrence of the sequence defined by + * Searches the range [first1, last1) for the first occurrence of the sequence defined by * [first2, last2), and returns an iterator to its first element, or last1 if no occurrences are - * found.
+ * found. * - *The elements in both ranges are compared sequentially using {@link equal_to}: A subsequence of + * The elements in both ranges are compared sequentially using {@link equal_to}: A subsequence of * [first1, last1) is considered a match only when this is true for all the elements of - * [first2, last2).
+ * [first2, last2). * - *This function returns the first of such occurrences. For an algorithm that returns the last instead, see - * {@link find_end}.
+ * This function returns the first of such occurrences. For an algorithm that returns the last instead, see + * {@link find_end}. * * @param first1 {@link Iterator Forward iterator} to the initial position of the searched sequence. * @param last1 {@link Iterator Forward iterator} to the final position of the searched sequence. The range used is @@ -649,18 +648,18 @@ namespace std (first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2): ForwardIterator1 /** - *Search range for subsequence.
+ * Search range for subsequence. * - *Searches the range [first1, last1) for the first occurrence of the sequence defined by + * Searches the range [first1, last1) for the first occurrence of the sequence defined by * [first2, last2), and returns an iterator to its first element, or last1 if no occurrences are - * found.
+ * found. * - *The elements in both ranges are compared sequentially using pred: A subsequence of + * The elements in both ranges are compared sequentially using pred: A subsequence of * [first1, last1) is considered a match only when this is true for all the elements of - * [first2, last2).
+ * [first2, last2). * - *This function returns the first of such occurrences. For an algorithm that returns the last instead, see - * {@link find_end}.
+ * This function returns the first of such occurrences. For an algorithm that returns the last instead, see + * {@link find_end}. * * @param first1 {@link Iterator Forward iterator} to the initial position of the searched sequence. * @param last1 {@link Iterator Forward iterator} to the final position of the searched sequence. The range used is @@ -687,7 +686,7 @@ namespace std export function searchSearch range for elements.
+ * Search range for elements. * - *Searches the range [first, last) for a sequence of count elements, each comparing equal to - * val.
+ * Searches the range [first, last) for a sequence of count elements, each comparing equal to + * val. * - *The function returns an iterator to the first of such elements, or last if no such sequence is found. - *
+ * The function returns an iterator to the first of such elements, or last if no such sequence is found. * * @param first {@link Iterator Forward iterator} to the initial position of the searched sequence. * @param last {@link Iterator Forward iterator} to the final position of the searched sequence. The range used is @@ -735,13 +733,13 @@ namespace std (first: ForwardIterator, last: ForwardIterator, count: number, val: T): ForwardIterator; /** - *Search range for elements.
+ * Search range for elements. * - *Searches the range [first, last) for a sequence of count elements, each comparing equal to - * val.
+ * Searches the range [first, last) for a sequence of count elements, each comparing equal to + * val. * - *The function returns an iterator to the first of such elements, or last if no such sequence is found. - *
+ * The function returns an iterator to the first of such elements, or last if no such sequence is found. + * * * @param first {@link Iterator Forward iterator} to the initial position of the searched sequence. * @param last {@link Iterator Forward iterator} to the final position of the searched sequence. The range used is @@ -766,7 +764,7 @@ namespace std export function search_nReturn first position where two ranges differ.
+ * Return first position where two ranges differ. * - *Compares the elements in the range [first1, last1) with those in the range beginning at - * first2, and returns the first element of both sequences that does not match.
+ * Compares the elements in the range [first1, last1) with those in the range beginning at + * first2, and returns the first element of both sequences that does not match. * - *The function returns a {@link Pair} of {@link iterators Iterator} to the first element in each range that - * does not match.
+ * The function returns a {@link Pair} of {@link iterators Iterator} to the first element in each range that + * does not match. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -814,13 +812,13 @@ namespace std (first1: Iterator1, last1: Iterator1, first2: Iterator2): PairReturn first position where two ranges differ.
+ * Return first position where two ranges differ. * - *Compares the elements in the range [first1, last1) with those in the range beginning at - * first2, and returns the first element of both sequences that does not match.
+ * Compares the elements in the range [first1, last1) with those in the range beginning at + * first2, and returns the first element of both sequences that does not match. * - *The function returns a {@link Pair} of {@link iterators Iterator} to the first element in each range that - * does not match.
+ * The function returns a {@link Pair} of {@link iterators Iterator} to the first element in each range that + * does not match. * * @param first1 An {@link Iterator} to the initial position of the first sequence. * @param last1 An {@link Iterator} to the final position in a sequence. The range used is @@ -849,11 +847,11 @@ namespace stdCount appearances of value in range.
+ * Count appearances of value in range. * - *Returns the number of elements in the range [first, last) that compare equal to val.
+ * Returns the number of elements in the range [first, last) that compare equal to val. * - *The function uses {@link equal_to} to compare the individual elements to val.
+ * The function uses {@link equal_to} to compare the individual elements to val. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -885,17 +883,16 @@ namespace std let cnt: number = 0; for (let it = first; !it.equals(last); it = it.next() as InputIterator) - if (std.equal_to(it.value, val)) + if (equal_to(it.value, val)) cnt++; return cnt; } /** - *Return number of elements in range satisfying condition.
+ * Return number of elements in range satisfying condition. * - * Returns the number of elements in the range [first, last) for which pred is true
.
- *
true
.
*
* @param first An {@link Iterator} to the initial position in a sequence.
* @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last),
@@ -931,15 +928,15 @@ namespace std
FILL
--------------------------------------------------------- */
/**
- * Copy range of elements.
+ * Copy range of elements. * - *Copies the elements in the range [first, last) into the range beginning at result.
+ * Copies the elements in the range [first, last) into the range beginning at result. * - *The function returns an iterator to the end of the destination range (which points to the element following the - * last element copied).
+ * The function returns an iterator to the end of the destination range (which points to the element following the + * last element copied). * - *The ranges shall not overlap in such a way that result points to an element in the range - * [first, last). For such cases, see {@link copy_backward}.
+ * The ranges shall not overlap in such a way that result points to an element in the range + * [first, last). For such cases, see {@link copy_backward}. * * @param first {@link Iterator Input iterator} to the initial position in a sequence to be copied. * @param last {@link Iterator Input iterator} to the initial position in a sequence to be copied. The range used is @@ -963,18 +960,17 @@ namespace std } /** - *Copy elements.
+ * Copy elements. * - *Copies the first n elements from the range beginning at first into the range beginning at - * result.
+ * Copies the first n elements from the range beginning at first into the range beginning at + * result. * - *The function returns an iterator to the end of the destination range (which points to one past the last element - * copied).
+ * The function returns an iterator to the end of the destination range (which points to one past the last element + * copied). * - *If n is negative, the function does nothing.
+ * If n is negative, the function does nothing. * - *If the ranges overlap, some of the elements in the range pointed by result may have undefined but valid values. - *
+ * If the ranges overlap, some of the elements in the range pointed by result may have undefined but valid values. * * @param first {@link Iterator Input iterator} to the initial position in a sequence of at least n elements to * be copied. InputIterator shall point to a type assignable to the elements pointed by @@ -1000,10 +996,10 @@ namespace std } /** - *Copy certain elements of range.
+ * Copy certain elements of range. * - * Copies the elements in the range [first, last) for which pred returns true
to the
- * range beginning at result.
true
to the
+ * range beginning at result.
*
* @param first {@link Iterator Input iterator} to the initial position in a sequence to be copied.
* @param last {@link Iterator Input iterator} to the initial position in a sequence to be copied. The range used is
@@ -1033,21 +1029,21 @@ namespace std
}
/**
- * Copy range of elements backward.
+ * Copy range of elements backward. * - *Copies the elements in the range [first, last) starting from the end into the range terminating - * at result.
+ * Copies the elements in the range [first, last) starting from the end into the range terminating + * at result. * - *The function returns an iterator to the first element in the destination range.
+ * The function returns an iterator to the first element in the destination range. * - *The resulting range has the elements in the exact same order as [first, last). To reverse their - * order, see {@link reverse_copy}.
+ * The resulting range has the elements in the exact same order as [first, last). To reverse their + * order, see {@link reverse_copy}. * - * The function begins by copying *(last-1)
into *(result-1)
, and then follows backward
- * by the elements preceding these, until first is reached (and including it).
*(last-1)
into *(result-1)
, and then follows backward
+ * by the elements preceding these, until first is reached (and including it).
*
- * The ranges shall not overlap in such a way that result (which is the past-the-end element in the - * destination range) points to an element in the range (first,last]. For such cases, see {@link copy}.
+ * The ranges shall not overlap in such a way that result (which is the past-the-end element in the + * destination range) points to an element in the range (first,last]. For such cases, see {@link copy}. * * @param first {@link Iterator Bidirectional iterator} to the initial position in a sequence to be copied. * @param last {@link Iterator Bidirectional iterator} to the initial position in a sequence to be copied. The range @@ -1073,9 +1069,9 @@ namespace std } /** - *Fill range with value.
+ * Fill range with value. * - *Assigns val to all the elements in the range [first, last).
+ * Assigns val to all the elements in the range [first, last). * * @param first {@link Iterator Forward iterator} to the initial position in a sequence of elements that support being * assigned a value of type T. @@ -1093,9 +1089,9 @@ namespace std } /** - *Fill sequence with value.
+ * Fill sequence with value. * - *Assigns val to the first n elements of the sequence pointed by first.
+ * Assigns val to the first n elements of the sequence pointed by first. * * @param first {@link Iterator Output iterator} to the initial position in a sequence of elements that support being * assigned a value of type T. @@ -1116,10 +1112,10 @@ namespace std } /** - *Transform range.
+ * Transform range. * - *Applies op to each of the elements in the range [first, last) and stores the value returned - * by each operation in the range that begins at result.
+ * Applies op to each of the elements in the range [first, last) and stores the value returned + * by each operation in the range that begins at result. * * @param first {@link Iterator Input iterator} to the initial position in a sequence to be transformed. * @param last {@link Iterator Input iterator} to the initial position in a sequence to be transformed. The range @@ -1136,11 +1132,11 @@ namespace std (first: InputIterator, last: InputIterator, result: OutputIterator, op: (val: T) => T): OutputIterator; /** - *Transform range.
+ * Transform range. * - *Calls binary_op using each of the elements in the range [first1, last1) as first argument, + * Calls binary_op using each of the elements in the range [first1, last1) as first argument, * and the respective argument in the range that begins at first2 as second argument. The value returned by - * each call is stored in the range that begins at result.
+ * each call is stored in the range that begins at result. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sequence. The range used is @@ -1211,10 +1207,9 @@ namespace std } /** - *Generate values for range with function.
+ * Generate values for range with function. * - *Assigns the value returned by successive calls to gen to the elements in the range [first, last). - *
+ * Assigns the value returned by successive calls to gen to the elements in the range [first, last). * * @param first {@link Iterator Forward iterator} to the initial position in a sequence. * @param last {@link Iterator Forward iterator} to the final position in a sequence. The range affected is @@ -1231,10 +1226,10 @@ namespace std } /** - *Generate values for sequence with function.
+ * Generate values for sequence with function. * - *Assigns the value returned by successive calls to gen to the first n elements of the sequence - * pointed by first.
+ * Assigns the value returned by successive calls to gen to the first n elements of the sequence + * pointed by first. * * @param first {@link Iterator Output iterator} to the initial position in a sequence of at least n elements * that support being assigned a value of the type returned by gen. @@ -1259,18 +1254,18 @@ namespace std REMOVE --------------------------------------------------------- */ /** - *Remove consecutive duplicates in range.
+ * Remove consecutive duplicates in range. * - *Removes all but the first element from every consecutive group of equivalent elements in the range - * [first, last).
+ * Removes all but the first element from every consecutive group of equivalent elements in the range + * [first, last). * - *The function cannot alter the properties of the object containing the range of elements (i.e., it cannot + * The function cannot alter the properties of the object containing the range of elements (i.e., it cannot * alter the size of an array or a container): The removal is done by replacing the duplicate elements by the next * element that is not a duplicate, and signaling the new size of the shortened range by returning an iterator to - * the element that should be considered its new past-the-last element.
+ * the element that should be considered its new past-the-last element. * - *The relative order of the elements not removed is preserved, while the elements between the returned - * iterator and last are left in a valid but unspecified state.
+ * The relative order of the elements not removed is preserved, while the elements between the returned + * iterator and last are left in a valid but unspecified state. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1284,18 +1279,18 @@ namespace std (first: InputIterator, last: InputIterator): InputIterator; /** - *Remove consecutive duplicates in range.
+ * Remove consecutive duplicates in range. * - *Removes all but the first element from every consecutive group of equivalent elements in the range - * [first, last).
+ * Removes all but the first element from every consecutive group of equivalent elements in the range + * [first, last). * - *The function cannot alter the properties of the object containing the range of elements (i.e., it cannot + * The function cannot alter the properties of the object containing the range of elements (i.e., it cannot * alter the size of an array or a container): The removal is done by replacing the duplicate elements by the next * element that is not a duplicate, and signaling the new size of the shortened range by returning an iterator to - * the element that should be considered its new past-the-last element.
+ * the element that should be considered its new past-the-last element. * - *The relative order of the elements not removed is preserved, while the elements between the returned - * iterator and last are left in a valid but unspecified state.
+ * The relative order of the elements not removed is preserved, while the elements between the returned + * iterator and last are left in a valid but unspecified state. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1313,13 +1308,13 @@ namespace std (first: InputIterator, last: InputIterator, pred: (left: t, right: t) => boolean): InputIterator; export function uniqueCopy range removing duplicates.
+ * Copy range removing duplicates. * - *Copies the elements in the range [first, last) to the range beginning at result, except - * consecutive duplicates (elements that compare equal to the element preceding).
+ * Copies the elements in the range [first, last) to the range beginning at result, except + * consecutive duplicates (elements that compare equal to the element preceding). * - *Only the first element from every consecutive group of equivalent elements in the range - * [first, last) is copied.
+ * Only the first element from every consecutive group of equivalent elements in the range + * [first, last) is copied. * - *The comparison between elements is performed by applying {@lnk equal_to}.
+ * The comparison between elements is performed by applying {@lnk equal_to}. * * @param first {@link Iterator Forward iterator} to the initial position in a sequence. * @param last {@link Iterator Forward iterator} to the final position in a sequence. The range used is @@ -1355,15 +1350,15 @@ namespace std (first: InputIterator, last: InputIterator, result: OutputIterator): OutputIterator; /** - *Copy range removing duplicates.
+ * Copy range removing duplicates. * - *Copies the elements in the range [first, last) to the range beginning at result, except - * consecutive duplicates (elements that compare equal to the element preceding).
+ * Copies the elements in the range [first, last) to the range beginning at result, except + * consecutive duplicates (elements that compare equal to the element preceding). * - *Only the first element from every consecutive group of equivalent elements in the range - * [first, last) is copied.
+ * Only the first element from every consecutive group of equivalent elements in the range + * [first, last) is copied. * - *The comparison between elements is performed by applying pred.
+ * The comparison between elements is performed by applying pred. * * @param first {@link Iterator Forward iterator} to the initial position in a sequence. * @param last {@link Iterator Forward iterator} to the final position in a sequence. The range used is @@ -1388,7 +1383,7 @@ namespace std export function unique_copyRemove value from range.
+ * Remove value from range. * - *Transforms the range [first, last) into a range with all the elements that compare equal to - * val removed, and returns an iterator to the new last of that range.
+ * Transforms the range [first, last) into a range with all the elements that compare equal to + * val removed, and returns an iterator to the new last of that range. * - *The function cannot alter the properties of the object containing the range of elements (i.e., it cannot alter + * The function cannot alter the properties of the object containing the range of elements (i.e., it cannot alter * the size of an array or a container): The removal is done by replacing the elements that compare equal to * val by the next element that does not, and signaling the new size of the shortened range by returning an - * iterator to the element that should be considered its new past-the-last element.
+ * iterator to the element that should be considered its new past-the-last element. * - *The relative order of the elements not removed is preserved, while the elements between the returned iterator - * and last are left in a valid but unspecified state.
+ * The relative order of the elements not removed is preserved, while the elements between the returned iterator + * and last are left in a valid but unspecified state. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1434,7 +1429,7 @@ namespace std for (let it = first; !it.equals(last); ) { - if (std.equal_to(it.value, val) == true) + if (equal_to(it.value, val) == true) it = it.source().erase(it) as InputIterator; else { @@ -1446,18 +1441,18 @@ namespace std } /** - *Remove elements from range.
+ * Remove elements from range. * - * Transforms the range [first, last) into a range with all the elements for which pred returns
- * true
removed, and returns an iterator to the new last of that range.
true
removed, and returns an iterator to the new last of that range.
*
- * The function cannot alter the properties of the object containing the range of elements (i.e., it cannot
+ * The function cannot alter the properties of the object containing the range of elements (i.e., it cannot
* alter the size of an array or a container): The removal is done by replacing the elements for which pred returns
* true
by the next element for which it does not, and signaling the new size of the shortened range
- * by returning an iterator to the element that should be considered its new past-the-last element.
The relative order of the elements not removed is preserved, while the elements between the returned - * iterator and last are left in a valid but unspecified state.
+ * The relative order of the elements not removed is preserved, while the elements between the returned + * iterator and last are left in a valid but unspecified state. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1486,15 +1481,15 @@ namespace std } /** - *Copy range removing value.
+ * Copy range removing value. * - *Copies the elements in the range [first, last) to the range beginning at result, except - * those elements that compare equal to val.
+ * Copies the elements in the range [first, last) to the range beginning at result, except + * those elements that compare equal to val. * - *The resulting range is shorter than [first, last) by as many elements as matches in the sequence, - * which are "removed".
+ * The resulting range is shorter than [first, last) by as many elements as matches in the sequence, + * which are "removed". * - *The function uses {@link equal_to} to compare the individual elements to val.
+ * The function uses {@link equal_to} to compare the individual elements to val. * * @param first {@link Iterator InputIterator} to the initial position in a sequence. * @param last {@link Iterator InputIterator} to the final position in a sequence. The range used is @@ -1513,7 +1508,7 @@ namespace std { for (; !first.equals(last); first = first.next() as InputIterator) { - if (std.equal_to(first.value, val)) + if (equal_to(first.value, val)) continue; result.value = first.value; @@ -1524,13 +1519,13 @@ namespace std } /** - *Copy range removing values.
+ * Copy range removing values. * - * Copies the elements in the range [first, last) to the range beginning at result, except
- * those elements for which pred returns true
.
true
.
*
- * The resulting range is shorter than [first, last) by as many elements as matches, which are - * "removed".
+ * The resulting range is shorter than [first, last) by as many elements as matches, which are + * "removed". * * @param first {@link Iterator InputIterator} to the initial position in a sequence. * @param last {@link Iterator InputIterator} to the final position in a sequence. The range used is @@ -1565,12 +1560,12 @@ namespace std REPLACE & SWAP --------------------------------------------------------- */ /** - *Replace value in range.
+ * Replace value in range. * - *Assigns new_val to all the elements in the range [first, last) that compare equal to - * old_val.
+ * Assigns new_val to all the elements in the range [first, last) that compare equal to + * old_val. * - *The function uses {@link equal_to} to compare the individual elements to old_val.
+ * The function uses {@link equal_to} to compare the individual elements to old_val. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1583,15 +1578,15 @@ namespace std (first: InputIterator, last: InputIterator, old_val: T, new_val: T): void { for (let it = first; !it.equals(last); it = it.next() as InputIterator) - if (std.equal_to(it.value, old_val)) + if (equal_to(it.value, old_val)) it.value = new_val; } /** - *Replace value in range.
+ * Replace value in range. * - * Assigns new_val to all the elements in the range [first, last) for which pred returns
- * true
.
true
.
*
* @param first An {@link Iterator} to the initial position in a sequence.
* @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last),
@@ -1611,15 +1606,15 @@ namespace std
}
/**
- * Copy range replacing value.
+ * Copy range replacing value. * - *Copies the elements in the range [first, last) to the range beginning at result, replacing - * the appearances of old_value by new_value.
+ * Copies the elements in the range [first, last) to the range beginning at result, replacing + * the appearances of old_value by new_value. * - *The function uses {@link std.equal_to} to compare the individual elements to old_value.
+ * The function uses {@link equal_to} to compare the individual elements to old_value. * - *The ranges shall not overlap in such a way that result points to an element in the range - * [first, last).
+ * The ranges shall not overlap in such a way that result points to an element in the range + * [first, last). * * @param first {@link Iterator InputIterator} to the initial position in a sequence. * @param last {@link Iterator InputIterator} to the final position in a sequence. The range used is @@ -1638,7 +1633,7 @@ namespace std { for (; !first.equals(last); first = first.next() as InputIterator) { - if (std.equal_to(first.value, old_val)) + if (equal_to(first.value, old_val)) result.value = new_val; else result.value = first.value; @@ -1650,10 +1645,10 @@ namespace std } /** - *Copy range replacing value.
+ * Copy range replacing value. * - * Copies the elements in the range [first, last) to the range beginning at result, replacing
- * those for which pred returns true
by new_value.
true
by new_value.
*
* @param first {@link Iterator InputIterator} to the initial position in a sequence.
* @param last {@link Iterator InputIterator} to the final position in a sequence. The range used is
@@ -1686,11 +1681,11 @@ namespace std
}
/**
- * Exchange values of objects pointed to by two iterators.
+ * Exchange values of objects pointed to by two iterators. * - *Swaps the elements pointed to by x and y.
+ * Swaps the elements pointed to by x and y. * - *The function calls {@link Iterator.swap} to exchange the elements.
+ * The function calls {@link Iterator.swap} to exchange the elements. * * @param x {@link Iterator Forward iterator} to the objects to swap. * @param y {@link Iterator Forward iterator} to the objects to swap. @@ -1701,12 +1696,12 @@ namespace std } /** - *Exchange values of two ranges.
+ * Exchange values of two ranges. * - *Exchanges the values of each of the elements in the range [first1, last1) with those of their - * respective elements in the range beginning at first2.
+ * Exchanges the values of each of the elements in the range [first1, last1) with those of their + * respective elements in the range beginning at first2. * - *The function calls {@link Iterator.swap} to exchange the elements.
+ * The function calls {@link Iterator.swap} to exchange the elements. * * @param first1 {@link Iterator Forward iterator} to the initial position of the first sequence. * @param last1 {@link Iterator Forward iterator} to the final position of the first sequence. The range used is @@ -1732,11 +1727,11 @@ namespace std RE-ARRANGEMENT --------------------------------------------------------- */ /** - *Reverse range.
+ * Reverse range. * - *Reverses the order of the elements in the range [first, last).
+ * Reverses the order of the elements in the range [first, last). * - *The function calls {@link iter_swap} to swap the elements to their new locations.
+ * The function calls {@link iter_swap} to swap the elements to their new locations. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1755,10 +1750,10 @@ namespace std } /** - *Copy range reversed.
+ * Copy range reversed. * - *Copies the elements in the range [first, last) to the range beginning at result, but in - * reverse order.
+ * Copies the elements in the range [first, last) to the range beginning at result, but in + * reverse order. * * @param first {@link Iterator Bidirectional iterator} to the initial position in a sequence to be copied. * @param last {@link Iterator Bidirectional iterator} to the initial position in a sequence to be copied. The range @@ -1785,10 +1780,10 @@ namespace std } /** - *Rotate left the elements in range.
+ * Rotate left the elements in range. * - *Rotates the order of the elements in the range [first, last), in such a way that the element - * pointed by middle becomes the new first element.
+ * Rotates the order of the elements in the range [first, last), in such a way that the element + * pointed by middle becomes the new first element. * * @param first An {@link Iterator} to the initial position in a sequence. * @param middle An {@link Iterator} pointing to the element within the range [first, last) that is @@ -1819,11 +1814,11 @@ namespace std } /** - *Copy range rotated left.
+ * Copy range rotated left. * - *Copies the elements in the range [first, last) to the range beginning at result, but + * Copies the elements in the range [first, last) to the range beginning at result, but * rotating the order of the elements in such a way that the element pointed by middle becomes the first - * element in the resulting range.
+ * element in the resulting range. * * @param first {@link Iterator Forward iterator} to the initial position of the range to be copy-rotated. * @param middle Forward iterator pointing to the element within the range [first, last) that is copied as the first element in the resulting range. @@ -1845,15 +1840,15 @@ namespace std } /** - *Randomly rearrange elements in range.
+ * Randomly rearrange elements in range. * - *Rearranges the elements in the range [first, last) randomly.
+ * Rearranges the elements in the range [first, last) randomly. * - *The function swaps the value of each element with that of some other randomly picked element. When provided, + * The function swaps the value of each element with that of some other randomly picked element. When provided, * the function gen determines which element is picked in every case. Otherwise, the function uses some unspecified - * source of randomness.
+ * source of randomness. * - *To specify a uniform random generator, see {@link shuffle}.
+ * To specify a uniform random generator, see {@link shuffle}. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1863,22 +1858,22 @@ namespace std export function random_shuffleRandomly rearrange elements in range using generator.
+ * Randomly rearrange elements in range using generator. * - *Rearranges the elements in the range [first, last) randomly, using g as uniform random - * number generator.
+ * Rearranges the elements in the range [first, last) randomly, using g as uniform random + * number generator. * - *The function swaps the value of each element with that of some other randomly picked element. The function - * determines the element picked by calling g().
+ * The function swaps the value of each element with that of some other randomly picked element. The function + * determines the element picked by calling g(). * - *To shuffle the elements of the range without such a generator, see {@link random_shuffle} instead.
+ * To shuffle the elements of the range without such a generator, see {@link random_shuffle} instead. * *Using random generator engine is not implemented yet.
+ * Using random generator engine is not implemented yet. * * @param first An {@link Iterator} to the initial position in a sequence. * @param last An {@link Iterator} to the final position in a sequence. The range used is [first, last), @@ -1909,10 +1904,10 @@ namespace std SORT --------------------------------------------------------- */ /** - *Sort elements in range.
+ * Sort elements in range. * - *Sorts the elements in the range [first, last) into ascending order. The elements are compared - * using {@link less}.
+ * Sorts the elements in the range [first, last) into ascending order. The elements are compared + * using {@link less}. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence to be sorted. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence to be sorted. @@ -1925,10 +1920,10 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): void; /** - *Sort elements in range.
+ * Sort elements in range. * - *Sorts the elements in the range [first, last) into specific order. The elements are compared - * using compare.
+ * Sorts the elements in the range [first, last) into specific order. The elements are compared + * using compare. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence to be sorted. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence to be sorted. @@ -1946,19 +1941,19 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (left: T, right: T) => boolean): void; export function sortPartially sort elements in range.
+ * Partially sort elements in range. * - *Rearranges the elements in the range [first, last), in such a way that the elements before + * Rearranges the elements in the range [first, last), in such a way that the elements before * middle are the smallest elements in the entire range and are sorted in ascending order, while the remaining - * elements are left without any specific order.
+ * elements are left without any specific order. * - *The elements are compared using {@link less}.
+ * The elements are compared using {@link less}. * * @param last {@link IArrayIterator Random-access iterator} to the first position of the sequence to be sorted. * @param middle {@link IArrayIterator Random-access iterator} pointing to the element within the range [first, last) that is used as the upper boundary of the elements that are fully sorted. @@ -1971,13 +1966,13 @@ namespace std (first: RandomAccessIterator, middle: RandomAccessIterator, last: RandomAccessIterator): void; /** - *Partially sort elements in range.
+ * Partially sort elements in range. * - *Rearranges the elements in the range [first, last), in such a way that the elements before + * Rearranges the elements in the range [first, last), in such a way that the elements before * middle are the smallest elements in the entire range and are sorted in ascending order, while the remaining - * elements are left without any specific order.
+ * elements are left without any specific order. * - *The elements are compared using comp.
+ * The elements are compared using comp. * * @param last {@link IArrayIterator Random-access iterator} to the first position of the sequence to be sorted. * @param middle {@link IArrayIterator Random-access iterator} pointing to the element within the range [first, last) that is used as the upper boundary of the elements that are fully sorted. @@ -1999,23 +1994,23 @@ namespace std export function partial_sortCopy and partially sort range.
+ * Copy and partially sort range. * - *Copies the smallest elements in the range [first, last) to + * Copies the smallest elements in the range [first, last) to * [result_first, result_last), sorting the elements copied. The number of elements copied is the same * as the {@link distance} between result_first and result_last (unless this is more than the amount of - * elements in [first, last)).
+ * elements in [first, last)). * - *The range [first, last) is not modified.
+ * The range [first, last) is not modified. * - *The elements are compared using {@link less}.
+ * The elements are compared using {@link less}. * * @param first {@link Iterator Input iterator} to the initial position of the sequence to copy from. * @param last {@link Iterator Input iterator} to the final position of the sequence to copy from. The range used is @@ -2040,16 +2035,16 @@ namespace std ): RandomAccessIterator; /** - *Copy and partially sort range.
+ * Copy and partially sort range. * - *Copies the smallest (or largest) elements in the range [first, last) to + * Copies the smallest (or largest) elements in the range [first, last) to * [result_first, result_last), sorting the elements copied. The number of elements copied is the same * as the {@link distance} between result_first and result_last (unless this is more than the amount of - * elements in [first, last)).
+ * elements in [first, last)). * - *The range [first, last) is not modified.
+ * The range [first, last) is not modified. * - *The elements are compared using compare.
+ * The elements are compared using compare. * * @param first {@link Iterator Input iterator} to the initial position of the sequence to copy from. * @param last {@link Iterator Input iterator} to the final position of the sequence to copy from. The range used is @@ -2080,7 +2075,7 @@ namespace std ( first: InputIterator, last: InputIterator, result_first: RandomAccessIterator, result_last: RandomAccessIterator, - compare: (x: T, y: T) => boolean = std.less + compare: (x: T, y: T) => boolean = less ): RandomAccessIterator { let input_size: number = distance(first, last); @@ -2101,11 +2096,11 @@ namespace std INSPECTOR --------------------------------------------------------- */ /** - *Check whether range is sorted.
+ * Check whether range is sorted. * - * Returns true
if the range [first, last) is sorted into ascending order.
true
if the range [first, last) is sorted into ascending order.
*
- * The elements are compared using {@link less}.
+ * The elements are compared using {@link less}. * * @param first {@link Iterator Forward iterator} to the initial position of the sequence. * @param last {@link Iterator Forward iterator} to the final position of the sequence. The range checked is @@ -2120,11 +2115,11 @@ namespace std (first: ForwardIterator, last: ForwardIterator): boolean; /** - *Check whether range is sorted.
+ * Check whether range is sorted. * - * Returns true
if the range [first, last) is sorted into ascending order.
true
if the range [first, last) is sorted into ascending order.
*
- * The elements are compared using compare.
+ * The elements are compared using compare. * * @param first {@link Iterator Forward iterator} to the initial position of the sequence. * @param last {@link Iterator Forward iterator} to the final position of the sequence. The range checked is @@ -2143,14 +2138,14 @@ namespace std (first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): boolean; export function is_sortedFind first unsorted element in range.
+ * Find first unsorted element in range. * - *Returns an iterator to the first element in the range [first, last) which does not follow an - * ascending order.
+ * Returns an iterator to the first element in the range [first, last) which does not follow an + * ascending order. * - *The range between first and the iterator returned {@link is_sorted is sorted}.
+ * The range between first and the iterator returned {@link is_sorted is sorted}. * - *If the entire range is sorted, the function returns last.
+ * If the entire range is sorted, the function returns last. * - *The elements are compared using {@link equal_to}.
+ * The elements are compared using {@link equal_to}. * * @param first {@link Iterator Forward iterator} to the initial position of the sequence. * @param last {@link Iterator Forward iterator} to the final position of the sequence. The range checked is @@ -2186,16 +2181,16 @@ namespace std (first: ForwardIterator, last: ForwardIterator): ForwardIterator; /** - *Find first unsorted element in range.
+ * Find first unsorted element in range. * - *Returns an iterator to the first element in the range [first, last) which does not follow an - * ascending order.
+ * Returns an iterator to the first element in the range [first, last) which does not follow an + * ascending order. * - *The range between first and the iterator returned {@link is_sorted is sorted}.
+ * The range between first and the iterator returned {@link is_sorted is sorted}. * - *If the entire range is sorted, the function returns last.
+ * If the entire range is sorted, the function returns last. * - *The elements are compared using compare.
+ * The elements are compared using compare. * * @param first {@link Iterator Forward iterator} to the initial position of the sequence. * @param last {@link Iterator Forward iterator} to the final position of the sequence. The range checked is @@ -2213,14 +2208,14 @@ namespace std (first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; export function is_sorted_untilMake heap from range.
+ * Make heap from range. * - *Rearranges the elements in the range [first, last) in such a way that they form a heap.
+ * Rearranges the elements in the range [first, last) in such a way that they form a heap. * - *A heap is a way to organize the elements of a range that allows for fast retrieval of the element with the + * A heap is a way to organize the elements of a range that allows for fast retrieval of the element with the * highest value at any moment (with {@link pop_heap}), even repeatedly, while allowing for fast insertion of new - * elements (with {@link push_heap}).
+ * elements (with {@link push_heap}). * - *The element with the highest value is always pointed by first. The order of the other elements depends on the - * particular implementation, but it is consistent throughout all heap-related functions of this header.
+ * The element with the highest value is always pointed by first. The order of the other elements depends on the + * particular implementation, but it is consistent throughout all heap-related functions of this header. * - *The elements are compared using {@link less}: The element with the highest value is an element for which this - * would return false when compared to every other element in the range.
+ * The elements are compared using {@link less}: The element with the highest value is an element for which this + * would return false when compared to every other element in the range. * - *The standard container adaptor {@link PriorityQueue} calls {@link make_heap}, {@link push_heap} and - * {@link pop_heap} automatically to maintain heap properties for a container.
+ * The standard container adaptor {@link PriorityQueue} calls {@link make_heap}, {@link push_heap} and + * {@link pop_heap} automatically to maintain heap properties for a container. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence to be * transformed into a heap. @@ -2410,22 +2405,22 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): void; /** - *Make heap from range.
+ * Make heap from range. * - *Rearranges the elements in the range [first, last) in such a way that they form a heap.
+ * Rearranges the elements in the range [first, last) in such a way that they form a heap. * - *A heap is a way to organize the elements of a range that allows for fast retrieval of the element with the + * A heap is a way to organize the elements of a range that allows for fast retrieval of the element with the * highest value at any moment (with {@link pop_heap}), even repeatedly, while allowing for fast insertion of new - * elements (with {@link push_heap}).
+ * elements (with {@link push_heap}). * - *The element with the highest value is always pointed by first. The order of the other elements depends on the - * particular implementation, but it is consistent throughout all heap-related functions of this header.
+ * The element with the highest value is always pointed by first. The order of the other elements depends on the + * particular implementation, but it is consistent throughout all heap-related functions of this header. * - *The elements are compared using compare: The element with the highest value is an element for which this - * would return false when compared to every other element in the range.
+ * The elements are compared using compare: The element with the highest value is an element for which this + * would return false when compared to every other element in the range. * - *The standard container adaptor {@link PriorityQueue} calls {@link make_heap}, {@link push_heap} and - * {@link pop_heap} automatically to maintain heap properties for a container.
+ * The standard container adaptor {@link PriorityQueue} calls {@link make_heap}, {@link push_heap} and + * {@link pop_heap} automatically to maintain heap properties for a container. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence to be * transformed into a heap. @@ -2444,7 +2439,7 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (x: T, y: T) => boolean): void; export function make_heapPush element into heap range.
+ * Push element into heap range. * - *Given a heap in the range [first, last - 1), this function extends the range considered a heap to + * Given a heap in the range [first, last - 1), this function extends the range considered a heap to * [first, last) by placing the value in (last - 1) into its corresponding location within it. - *
+ * * - *A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are + * A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are * preserved if elements are added and removed from it using {@link push_heap} and {@link pop_heap}, respectively. - *
+ * * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the new heap range, including * the pushed element. @@ -2478,15 +2473,14 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): void; /** - *Push element into heap range.
+ * Push element into heap range. * - *Given a heap in the range [first, last - 1), this function extends the range considered a heap to + * Given a heap in the range [first, last - 1), this function extends the range considered a heap to * [first, last) by placing the value in (last - 1) into its corresponding location within it. - *
* - *A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are + * A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are * preserved if elements are added and removed from it using {@link push_heap} and {@link pop_heap}, respectively. - *
+ * * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the new heap range, including * the pushed element. @@ -2505,7 +2499,7 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (x: T, y: T) => boolean): void; export function push_heapPop element from heap range.
+ * Pop element from heap range. * - *Rearranges the elements in the heap range [first, last) in such a way that the part considered a - * heap is shortened by one: The element with the highest value is moved to (last - 1).
+ * Rearranges the elements in the heap range [first, last) in such a way that the part considered a + * heap is shortened by one: The element with the highest value is moved to (last - 1). * - *While the element with the highest value is moved from first to (last - 1) (which now is out of the + * While the element with the highest value is moved from first to (last - 1) (which now is out of the * heap), the other elements are reorganized in such a way that the range [first, last - 1) preserves - * the properties of a heap.
+ * the properties of a heap. * - *A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are + * A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are * preserved if elements are added and removed from it using {@link push_heap} and {@link pop_heap}, respectively. - *
* * @param first {@link IArrayIterator Random-access iterator} to the initial position of the heap to be shrank by one. * @param last {@link IArrayIterator Random-access iterator} to the final position of the heap to be shrank by one. @@ -2553,18 +2546,17 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): void; /** - *Pop element from heap range.
+ * Pop element from heap range. * - *Rearranges the elements in the heap range [first, last) in such a way that the part considered a - * heap is shortened by one: The element with the highest value is moved to (last - 1).
+ * Rearranges the elements in the heap range [first, last) in such a way that the part considered a + * heap is shortened by one: The element with the highest value is moved to (last - 1). * - *While the element with the highest value is moved from first to (last - 1) (which now is out of the + * While the element with the highest value is moved from first to (last - 1) (which now is out of the * heap), the other elements are reorganized in such a way that the range [first, last - 1) preserves - * the properties of a heap.
+ * the properties of a heap. * - *A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are + * A range can be organized into a heap by calling {@link make_heap}. After that, its heap properties are * preserved if elements are added and removed from it using {@link push_heap} and {@link pop_heap}, respectively. - *
* * @param first {@link IArrayIterator Random-access iterator} to the initial position of the heap to be shrank by one. * @param last {@link IArrayIterator Random-access iterator} to the final position of the heap to be shrank by one. @@ -2582,7 +2574,7 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (x: T, y: T) => boolean): void; export function pop_heapTest if range is heap.
+ * Test if range is heap. * - *Returns true if the range [first, last) forms a heap, as if constructed with {@link make_heap}. - *
+ * Returns true if the range [first, last) forms a heap, as if constructed with {@link make_heap}. * - *The elements are compared using {@link less}.
+ * The elements are compared using {@link less}. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence. The range used is @@ -2613,12 +2604,11 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): boolean; /** - *Test if range is heap.
+ * Test if range is heap. * - *Returns true if the range [first, last) forms a heap, as if constructed with {@link make_heap}. - *
+ * Returns true if the range [first, last) forms a heap, as if constructed with {@link make_heap}. * - *The elements are compared using compare.
+ * The elements are compared using compare. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence. The range used is @@ -2640,24 +2630,24 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (x: T, y: T) => boolean): boolean; export function is_heapFind first element not in heap order.
+ * Find first element not in heap order. * - *Returns an iterator to the first element in the range [first, last) which is not in a valid - * position if the range is considered a heap (as if constructed with {@link make_heap}).
+ * Returns an iterator to the first element in the range [first, last) which is not in a valid + * position if the range is considered a heap (as if constructed with {@link make_heap}). * - *The range between first and the iterator returned is a heap.
+ * The range between first and the iterator returned is a heap. * - *If the entire range is a valid heap, the function returns last.
+ * If the entire range is a valid heap, the function returns last. * - *The elements are compared using {@link less}.
+ * The elements are compared using {@link less}. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence. The range used is @@ -2670,16 +2660,16 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): RandomAccessIterator; /** - *Find first element not in heap order.
+ * Find first element not in heap order. * - *Returns an iterator to the first element in the range [first, last) which is not in a valid - * position if the range is considered a heap (as if constructed with {@link make_heap}).
+ * Returns an iterator to the first element in the range [first, last) which is not in a valid + * position if the range is considered a heap (as if constructed with {@link make_heap}). * - *The range between first and the iterator returned is a heap.
+ * The range between first and the iterator returned is a heap. * - *If the entire range is a valid heap, the function returns last.
+ * If the entire range is a valid heap, the function returns last. * - *The elements are compared using {@link less}.
+ * The elements are compared using {@link less}. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence. The range used is @@ -2697,7 +2687,7 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (x: T, y: T) => boolean): RandomAccessIterator; export function is_heap_untilSort elements of heap.
+ * Sort elements of heap. * - *Sorts the elements in the heap range [first, last) into ascending order.
+ * Sorts the elements in the heap range [first, last) into ascending order. * - *The elements are compared using {@link less}, which shall be the same as used to construct the heap.
+ * The elements are compared using {@link less}, which shall be the same as used to construct the heap. * - *The range loses its properties as a heap.
+ * The range loses its properties as a heap. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence to be sorted. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence to be sorted. @@ -2730,13 +2720,13 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator): void; /** - *Sort elements of heap.
+ * Sort elements of heap. * - *Sorts the elements in the heap range [first, last) into ascending order.
+ * Sorts the elements in the heap range [first, last) into ascending order. * - *The elements are compared using compare, which shall be the same as used to construct the heap.
+ * The elements are compared using compare, which shall be the same as used to construct the heap. * - *The range loses its properties as a heap.
+ * The range loses its properties as a heap. * * @param first {@link IArrayIterator Random-access iterator} to the initial position of the sequence to be sorted. * @param last {@link IArrayIterator Random-access iterator} to the final position of the sequence to be sorted. @@ -2754,9 +2744,9 @@ namespace std (first: RandomAccessIterator, last: RandomAccessIterator, compare: (x: T, y: T) => boolean): void; export function sort_heapReturn iterator to lower bound.
+ * Return iterator to lower bound. * - *Returns an iterator pointing to the first element in the range [first, last) which does not - * compare less than val.
+ * Returns an iterator pointing to the first element in the range [first, last) which does not + * compare less than val. * - *The elements are compared using {@link less}. The elements in the range shall already be {@link is_sorted sorted} + * The elements are compared using {@link less}. The elements in the range shall already be {@link is_sorted sorted} * according to this same criterion ({@link less}), or at least {@link is_partitioned partitioned} with respect to - * val.
+ * val. * - *The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted - * range, which is specially efficient for {@link IArrayIterator random-access iterators}.
+ * The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted + * range, which is specially efficient for {@link IArrayIterator random-access iterators}. * - *Unlike {@link upper_bound}, the value pointed by the iterator returned by this function may also be equivalent - * to val, and not only greater.
+ * Unlike {@link upper_bound}, the value pointed by the iterator returned by this function may also be equivalent + * to val, and not only greater. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -2797,20 +2787,20 @@ namespace std (first: ForwardIterator, last: ForwardIterator, val: T): ForwardIterator; /** - *Return iterator to lower bound.
+ * Return iterator to lower bound. * - *Returns an iterator pointing to the first element in the range [first, last) which does not - * compare less than val.
+ * Returns an iterator pointing to the first element in the range [first, last) which does not + * compare less than val. * - *The elements are compared using compare. The elements in the range shall already be + * The elements are compared using compare. The elements in the range shall already be * {@link is_sorted sorted} according to this same criterion (compare), or at least - * {@link is_partitioned partitioned} with respect to val.
+ * {@link is_partitioned partitioned} with respect to val. * - *The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted - * range, which is specially efficient for {@link IArrayIterator random-access iterators}.
+ * The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted + * range, which is specially efficient for {@link IArrayIterator random-access iterators}. * - *Unlike {@link upper_bound}, the value pointed by the iterator returned by this function may also be equivalent - * to val, and not only greater.
+ * Unlike {@link upper_bound}, the value pointed by the iterator returned by this function may also be equivalent + * to val, and not only greater. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -2836,7 +2826,7 @@ namespace std export function lower_boundReturn iterator to upper bound.
+ * Return iterator to upper bound. * - *Returns an iterator pointing to the first element in the range [first, last) which compares - * greater than val.
+ * Returns an iterator pointing to the first element in the range [first, last) which compares + * greater than val. * - *The elements are compared using {@link less}. The elements in the range shall already be {@link is_sorted sorted} + * The elements are compared using {@link less}. The elements in the range shall already be {@link is_sorted sorted} * according to this same criterion ({@link less}), or at least {@link is_partitioned partitioned} with respect to - * val.
+ * val. * - *The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted - * range, which is specially efficient for {@link IArrayIterator random-access iterators}.
+ * The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted + * range, which is specially efficient for {@link IArrayIterator random-access iterators}. * - *Unlike {@link lower_bound}, the value pointed by the iterator returned by this function cannot be equivalent to - * val, only greater.
+ * Unlike {@link lower_bound}, the value pointed by the iterator returned by this function cannot be equivalent to + * val, only greater. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -2889,20 +2879,20 @@ namespace std (first: ForwardIterator, last: ForwardIterator, val: T): ForwardIterator; /** - *Return iterator to upper bound.
+ * Return iterator to upper bound. * - *Returns an iterator pointing to the first element in the range [first, last) which compares - * greater than val.
+ * Returns an iterator pointing to the first element in the range [first, last) which compares + * greater than val. * - *The elements are compared using compare. The elements in the range shall already be + * The elements are compared using compare. The elements in the range shall already be * {@link is_sorted sorted} according to this same criterion (compare), or at least - * {@link is_partitioned partitioned} with respect to val.
+ * {@link is_partitioned partitioned} with respect to val. * - *The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted - * range, which is specially efficient for {@link IArrayIterator random-access iterators}.
+ * The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted + * range, which is specially efficient for {@link IArrayIterator random-access iterators}. * - *Unlike {@link lower_bound}, the value pointed by the iterator returned by this function cannot be equivalent to - * val, only greater.
+ * Unlike {@link lower_bound}, the value pointed by the iterator returned by this function cannot be equivalent to + * val, only greater. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -2928,7 +2918,7 @@ namespace std export function upper_boundGet subrange of equal elements.
+ * Get subrange of equal elements. * - *Returns the bounds of the subrange that includes all the elements of the range [first, last) with - * values equivalent to val.
+ * Returns the bounds of the subrange that includes all the elements of the range [first, last) with + * values equivalent to val. * - * The elements are compared using {@link less}. Two elements, ax/i> and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion - * ({@link less}), or at least {@link is_partitioned partitioned} with respect to val.
+ * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion + * ({@link less}), or at least {@link is_partitioned partitioned} with respect to val. * - *If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both + * If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both * iterators pointing to the nearest value greater than val, if any, or to last, if val compares - * greater than all the elements in the range.
+ * greater than all the elements in the range. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -2982,20 +2972,20 @@ namespace std (first: ForwardIterator, last: ForwardIterator, val: T): PairGet subrange of equal elements.
+ * Get subrange of equal elements. * - *Returns the bounds of the subrange that includes all the elements of the range [first, last) with - * values equivalent to val.
+ * Returns the bounds of the subrange that includes all the elements of the range [first, last) with + * values equivalent to val. * - * The elements are compared using compare. Two elements, ax/i> and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion - * (compare), or at least {@link is_partitioned partitioned} with respect to val.
+ * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion + * (compare), or at least {@link is_partitioned partitioned} with respect to val. * - *If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both + * If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both * iterators pointing to the nearest value greater than val, if any, or to last, if val compares - * greater than all the elements in the range.
+ * greater than all the elements in the range. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -3022,7 +3012,7 @@ namespace std export function equal_rangeGet subrange of equal elements.
+ * Get subrange of equal elements. * - *Returns the bounds of the subrange that includes all the elements of the range [first, last) with - * values equivalent to val.
+ * Returns the bounds of the subrange that includes all the elements of the range [first, last) with + * values equivalent to val. * - * The elements are compared using {@link less}. Two elements, x and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion - * ({@link less}), or at least {@link is_partitioned partitioned} with respect to val.
+ * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion + * ({@link less}), or at least {@link is_partitioned partitioned} with respect to val. * - *If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both + * If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both * iterators pointing to the nearest value greater than val, if any, or to last, if val compares - * greater than all the elements in the range.
+ * greater than all the elements in the range. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -3061,20 +3051,20 @@ namespace std (first: ForwardIterator, last: ForwardIterator, val: T): boolean; /** - *Get subrange of equal elements.
+ * Get subrange of equal elements. * - *Returns the bounds of the subrange that includes all the elements of the range [first, last) with - * values equivalent to val.
+ * Returns the bounds of the subrange that includes all the elements of the range [first, last) with + * values equivalent to val. * - * The elements are compared using {compare}. Two elements, x and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion - * (compare), or at least {@link is_partitioned partitioned} with respect to val.
+ * The elements in the range shall already be {@link is_sorted sorted} according to this same criterion + * (compare), or at least {@link is_partitioned partitioned} with respect to val. * - *If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both + * If val is not equivalent to any value in the range, the subrange returned has a length of zero, with both * iterators pointing to the nearest value greater than val, if any, or to last, if val compares - * greater than all the elements in the range.
+ * greater than all the elements in the range. * * @param first {@link Iterator Forward iterator} to the initial position of a {@link is_sorted sorted} (or properly * {@link is_partitioned partitioned}) sequence. @@ -3099,7 +3089,7 @@ namespace std export function binary_searchTest whether range is partitioned.
+ * Test whether range is partitioned. * - * Returns true
if all the elements in the range [first, last) for which pred
- * returns true
precede those for which it returns false
.
true
if all the elements in the range [first, last) for which pred
+ * returns true
precede those for which it returns false
.
*
- * If the range is {@link Container.empty empty}, the function returns true
.
true
.
*
* @param first {@link Iterator Input iterator} to the initial position of the sequence.
* @param last {@link Iterator Input iterator} to the final position of the sequence. The range used is
@@ -3148,14 +3138,14 @@ namespace std
}
/**
- * Partition range in two.
+ * Partition range in two. * - * Rearranges the elements from the range [first, last), in such a way that all the elements for
+ * Rearranges the elements from the range [first, last), in such a way that all the elements for
* which pred returns true
precede all those for which it returns false
. The iterator
- * returned points to the first element of the second group.
The relative ordering within each group is not necessarily the same as before the call. See - * {@link stable_partition} for a function with a similar behavior but with stable ordering within each group.
+ * The relative ordering within each group is not necessarily the same as before the call. See + * {@link stable_partition} for a function with a similar behavior but with stable ordering within each group. * * @param first {@link Iterator Forward iterator} to the initial position of the sequence to partition. * @param last {@link Iterator Forward iterator} to the final position of the sequence to partition. The range used is @@ -3196,13 +3186,13 @@ namespace std } /** - *Partition range in two - stable ordering.
+ * Partition range in two - stable ordering. * - * Rearranges the elements in the range [first, last), in such a way that all the elements for which
+ * Rearranges the elements in the range [first, last), in such a way that all the elements for which
* pred returns true
precede all those for which it returns false
, and, unlike
- * function {@link partition}, the relative order of elements within each group is preserved.
This is generally implemented using an internal temporary buffer.
+ * This is generally implemented using an internal temporary buffer. * * @param first {@link Iterator Bidirectional iterator} to the initial position of the sequence to partition. * @param last {@link Iterator Bidirectional iterator} to the final position of the sequence to partition. The range @@ -3223,11 +3213,11 @@ namespace std } /** - *Partition range into two.
+ * Partition range into two. * - * Copies the elements in the range [first, last) for which pred returns true
+ * Copies the elements in the range [first, last) for which pred returns true
* into the range pointed by result_true, and those for which it does not into the range pointed by
- * result_false.
Get partition point.
+ * Get partition point. * - * Returns an iterator to the first element in the partitioned range [first, last) for which
- * pred is not true
, indicating its partition point.
true
, indicating its partition point.
*
- * The elements in the range shall already {@link is_partitioned be partitioned}, as if {@link partition} had been - * called with the same arguments.
+ * The elements in the range shall already {@link is_partitioned be partitioned}, as if {@link partition} had been + * called with the same arguments. * - *The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted - * range, which is specially efficient for {@link Iteartor random-access iterators}.
+ * The function optimizes the number of comparisons performed by comparing non-consecutive elements of the sorted + * range, which is specially efficient for {@link Iteartor random-access iterators}. * * @param first {@link Iterator Forward iterator} to the initial position of the partitioned sequence. * @param last {@link Iterator Forward iterator} to the final position of the partitioned sequence. The range checked @@ -3327,13 +3317,13 @@ namespace std MERGE --------------------------------------------------------- */ /** - *Merge sorted ranges.
+ * Merge sorted ranges. * - *Combines the elements in the sorted ranges [first1, last1) and [first2, last2), into - * a new range beginning at result with all its elements sorted.
+ * Combines the elements in the sorted ranges [first1, last1) and [first2, last2), into + * a new range beginning at result with all its elements sorted. * - *The elements are compared using {@link less}. The elements in both ranges shall already be ordered according to - * this same criterion ({@link less}). The resulting range is also sorted according to this.
+ * The elements are compared using {@link less}. The elements in both ranges shall already be ordered according to + * this same criterion ({@link less}). The resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3356,13 +3346,13 @@ namespace std ): OutputIterator; /** - *Merge sorted ranges.
+ * Merge sorted ranges. * - *Combines the elements in the sorted ranges [first1, last1) and [first2, last2), into - * a new range beginning at result with all its elements sorted.
+ * Combines the elements in the sorted ranges [first1, last1) and [first2, last2), into + * a new range beginning at result with all its elements sorted. * - *The elements are compared using {@link less}. The elements in both ranges shall already be ordered according to - * this same criterion (compare). The resulting range is also sorted according to this.
+ * The elements are compared using {@link less}. The elements in both ranges shall already be ordered according to + * this same criterion (compare). The resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3393,7 +3383,7 @@ namespace std OutputIterator extends base.ILinearIteratorMerge consecutive sorted ranges.
+ * Merge consecutive sorted ranges. * - *Merges two consecutive sorted ranges: [first, middle) and [middle, last), putting - * the result into the combined sorted range [first, last).
+ * Merges two consecutive sorted ranges: [first, middle) and [middle, last), putting + * the result into the combined sorted range [first, last). * - *The elements are compared using {@link less}. The elements in both ranges shall already be ordered according to - * this same criterion ({@link less}). The resulting range is also sorted according to this.
+ * The elements are compared using {@link less}. The elements in both ranges shall already be ordered according to + * this same criterion ({@link less}). The resulting range is also sorted according to this. * - *The function preserves the relative order of elements with equivalent values, with the elements in the first - * range preceding those equivalent in the second.
+ * The function preserves the relative order of elements with equivalent values, with the elements in the first + * range preceding those equivalent in the second. * * @param first {@link Iterator Bidirectional iterator} to the initial position in the first sorted sequence to merge. * This is also the initial position where the resulting merged range is stored. @@ -3443,16 +3433,16 @@ namespace std (first: BidirectionalIterator, middle: BidirectionalIterator, last: BidirectionalIterator): void; /** - *Merge consecutive sorted ranges.
+ * Merge consecutive sorted ranges. * - *Merges two consecutive sorted ranges: [first, middle) and [middle, last), putting - * the result into the combined sorted range [first, last).
+ * Merges two consecutive sorted ranges: [first, middle) and [middle, last), putting + * the result into the combined sorted range [first, last). * - *The elements are compared using compare. The elements in both ranges shall already be ordered according - * to this same criterion (compare). The resulting range is also sorted according to this.
+ * The elements are compared using compare. The elements in both ranges shall already be ordered according + * to this same criterion (compare). The resulting range is also sorted according to this. * - *The function preserves the relative order of elements with equivalent values, with the elements in the first - * range preceding those equivalent in the second.
+ * The function preserves the relative order of elements with equivalent values, with the elements in the first + * range preceding those equivalent in the second. * * @param first {@link Iterator Bidirectional iterator} to the initial position in the first sorted sequence to merge. * This is also the initial position where the resulting merged range is stored. @@ -3476,7 +3466,7 @@ namespace std export function inplace_mergeTest whether sorted range includes another sorted range.
+ * Test whether sorted range includes another sorted range. * - * Returns true
if the sorted range [first1, last1) contains all the elements in the
- * sorted range [first2, last2).
true
if the sorted range [first1, last1) contains all the elements in the
+ * sorted range [first2, last2).
*
- * The elements are compared using {@link less}. Two elements, x and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the range shall already be ordered according to this same criterion ({@link less}).
+ * The elements in the range shall already be ordered according to this same criterion ({@link less}). * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence (which is tested on @@ -3516,15 +3506,15 @@ namespace std (first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2): boolean; /** - *Test whether sorted range includes another sorted range.
+ * Test whether sorted range includes another sorted range. * - * Returns true
if the sorted range [first1, last1) contains all the elements in the
- * sorted range [first2, last2).
true
if the sorted range [first1, last1) contains all the elements in the
+ * sorted range [first2, last2).
*
- * The elements are compared using compare. Two elements, x and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the range shall already be ordered according to this same criterion (compare).
+ * The elements in the range shall already be ordered according to this same criterion (compare). * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence (which is tested on @@ -3552,7 +3542,7 @@ namespace std export function includesUnion of two sorted ranges.
+ * Union of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by result with the set union of the - * two sorted ranges [first1, last1) and [first2, last2).
+ * Constructs a sorted range beginning in the location pointed by result with the set union of the + * two sorted ranges [first1, last1) and [first2, last2). * - *The union of two sets is formed by the elements that are present in either one of the sets, or in both. + * The union of two sets is formed by the elements that are present in either one of the sets, or in both. * Elements from the second range that have an equivalent element in the first range are not copied to the resulting - * range.
+ * range. * - * The elements are compared using {@link less}. Two elements, x and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3606,20 +3596,20 @@ namespace std ): OutputIterator; /** - *Union of two sorted ranges.
+ * Union of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by result with the set union of the - * two sorted ranges [first1, last1) and [first2, last2).
+ * Constructs a sorted range beginning in the location pointed by result with the set union of the + * two sorted ranges [first1, last1) and [first2, last2). * - *The union of two sets is formed by the elements that are present in either one of the sets, or in both. + * The union of two sets is formed by the elements that are present in either one of the sets, or in both. * Elements from the second range that have an equivalent element in the first range are not copied to the resulting - * range.
+ * range. * - * The elements are compared using compare. Two elements, x and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion (compare). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion (compare). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3652,7 +3642,7 @@ namespace std OutputIterator extends base.ILinearIteratorIntersection of two sorted ranges.
+ * Intersection of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by result with the set intersection of - * the two sorted ranges [first1, last1) and [first2, last2).
+ * Constructs a sorted range beginning in the location pointed by result with the set intersection of + * the two sorted ranges [first1, last1) and [first2, last2). * - *The intersection of two sets is formed only by the elements that are present in both sets. The elements - * copied by the function come always from the first range, in the same order.
+ * The intersection of two sets is formed only by the elements that are present in both sets. The elements + * copied by the function come always from the first range, in the same order. * - * The elements are compared using {@link less}. Two elements, x and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3723,19 +3713,19 @@ namespace std ): OutputIterator; /** - *Intersection of two sorted ranges.
+ * Intersection of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by result with the set intersection of - * the two sorted ranges [first1, last1) and [first2, last2).
+ * Constructs a sorted range beginning in the location pointed by result with the set intersection of + * the two sorted ranges [first1, last1) and [first2, last2). * - *The intersection of two sets is formed only by the elements that are present in both sets. The elements - * copied by the function come always from the first range, in the same order.
+ * The intersection of two sets is formed only by the elements that are present in both sets. The elements + * copied by the function come always from the first range, in the same order. * - * The elements are compared using compare. Two elements, x and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion (compare). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion (compare). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3768,7 +3758,7 @@ namespace std OutputIterator extends base.ILinearIteratorDifference of two sorted ranges.
+ * Difference of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by result with the set difference of - * the sorted range [first1, last1) with respect to the sorted range [first2, last2).
+ * Constructs a sorted range beginning in the location pointed by result with the set difference of + * the sorted range [first1, last1) with respect to the sorted range [first2, last2). * - *The difference of two sets is formed by the elements that are present in the first set, but not in the - * second one. The elements copied by the function come always from the first range, in the same order.
+ * The difference of two sets is formed by the elements that are present in the first set, but not in the + * second one. The elements copied by the function come always from the first range, in the same order. * - *For containers supporting multiple occurrences of a value, the difference includes as many occurrences of - * a given value as in the first range, minus the amount of matching elements in the second, preserving order.
+ * For containers supporting multiple occurrences of a value, the difference includes as many occurrences of + * a given value as in the first range, minus the amount of matching elements in the second, preserving order. * - *Notice that this is a directional operation - for a symmetrical equivalent, see {@link set_symmetric_difference}. - *
+ * Notice that this is a directional operation - for a symmetrical equivalent, see {@link set_symmetric_difference}. * - * The elements are compared using {@link less}. Two elements, x and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3836,25 +3825,24 @@ namespace std ): OutputIterator; /** - *Difference of two sorted ranges.
+ * Difference of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by result with the set difference of - * the sorted range [first1, last1) with respect to the sorted range [first2, last2).
+ * Constructs a sorted range beginning in the location pointed by result with the set difference of + * the sorted range [first1, last1) with respect to the sorted range [first2, last2). * - *The difference of two sets is formed by the elements that are present in the first set, but not in the - * second one. The elements copied by the function come always from the first range, in the same order.
+ * The difference of two sets is formed by the elements that are present in the first set, but not in the + * second one. The elements copied by the function come always from the first range, in the same order. * - *For containers supporting multiple occurrences of a value, the difference includes as many occurrences of - * a given value as in the first range, minus the amount of matching elements in the second, preserving order.
+ * For containers supporting multiple occurrences of a value, the difference includes as many occurrences of + * a given value as in the first range, minus the amount of matching elements in the second, preserving order. * - *Notice that this is a directional operation - for a symmetrical equivalent, see {@link set_symmetric_difference}. - *
+ * Notice that this is a directional operation - for a symmetrical equivalent, see {@link set_symmetric_difference}. * - * The elements are compared using compare. Two elements, x and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion (compare). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion (compare). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3887,18 +3875,18 @@ namespace std OutputIterator extends base.ILinearIteratorSymmetric difference of two sorted ranges.
+ * Symmetric difference of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by0 result with the set + * Constructs a sorted range beginning in the location pointed by0 result with the set * symmetric difference of the two sorted ranges [first1, last1) and [first2, last2). - *
* - *The symmetric difference of two sets is formed by the elements that are present in one of the sets, but + * The symmetric difference of two sets is formed by the elements that are present in one of the sets, but * not in the other. Among the equivalent elements in each range, those discarded are those that appear before in the - * existent order before the call. The existing order is also preserved for the copied elements.
+ * existent order before the call. The existing order is also preserved for the copied elements. * - * The elements are compared using {@link less}. Two elements, x and y are considered equivalent
- * if (!std.less(x, y) && !std.less(y, x))
.
if (!less(x, y) && !less(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion ({@link std.less}). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion ({@link less}). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3952,21 +3939,20 @@ namespace std ): OutputIterator; /** - *Symmetric difference of two sorted ranges.
+ * Symmetric difference of two sorted ranges. * - *Constructs a sorted range beginning in the location pointed by0 result with the set + * Constructs a sorted range beginning in the location pointed by0 result with the set * symmetric difference of the two sorted ranges [first1, last1) and [first2, last2). - *
* - *The symmetric difference of two sets is formed by the elements that are present in one of the sets, but + * The symmetric difference of two sets is formed by the elements that are present in one of the sets, but * not in the other. Among the equivalent elements in each range, those discarded are those that appear before in the - * existent order before the call. The existing order is also preserved for the copied elements.
+ * existent order before the call. The existing order is also preserved for the copied elements. * - * The elements are compared using compare. Two elements, x and y are considered equivalent
- * if (!compare(x, y) && !compare(y, x))
.
if (!compare(x, y) && !compare(y, x))
.
*
- * The elements in the ranges shall already be ordered according to this same criterion (compare). The - * resulting range is also sorted according to this.
+ * The elements in the ranges shall already be ordered according to this same criterion (compare). The + * resulting range is also sorted according to this. * * @param first1 {@link Iterator Input iterator} to the initial position of the first sorted sequence. * @param last1 {@link Iterator Input iterator} to the final position of the first sorted sequence. The range used is @@ -3999,7 +3985,7 @@ namespace std OutputIterator extends base.ILinearIteratorReturn the smallest.
+ * Return the smallest. * - *Returns the smallest of all the elements in the args.
+ * Returns the smallest of all the elements in the args. * * @param args Values to compare. * @@ -4055,16 +4042,16 @@ namespace std let minimum: T = args[0]; for (let i: number = 1; i < args.length; i++) - if (std.less(args[i], minimum)) + if (less(args[i], minimum)) minimum = args[i]; return minimum; } /** - *Return the largest.
+ * Return the largest. * - *Returns the largest of all the elements in the args.
+ * Returns the largest of all the elements in the args. * * @param args Values to compare. * @@ -4075,17 +4062,17 @@ namespace std let maximum: T = args[0]; for (let i: number = 1; i < args.length; i++) - if (std.greater(args[i], maximum)) + if (greater(args[i], maximum)) maximum = args[i]; return maximum; } /** - *Return smallest and largest elements.
+ * Return smallest and largest elements. * - *Returns a {@link Pair} with the smallest of all the elements in the args as first element (the first of - * them, if there are more than one), and the largest as second (the last of them, if there are more than one).
+ * Returns a {@link Pair} with the smallest of all the elements in the args as first element (the first of + * them, if there are more than one), and the largest as second (the last of them, if there are more than one). * * @param args Values to compare. * @@ -4098,9 +4085,9 @@ namespace std for (let i: number = 1; i < args.length; i++) { - if (std.less(args[i], minimum)) + if (less(args[i], minimum)) minimum = args[i]; - if (std.greater(args[i], maximum)) + if (greater(args[i], maximum)) maximum = args[i]; } @@ -4108,14 +4095,13 @@ namespace std } /** - *Return smallest element in range.
+ * Return smallest element in range. * - *Returns an iterator pointing to the element with the smallest value in the range [first, last). - *
+ * Returns an iterator pointing to the element with the smallest value in the range [first, last). * - *The comparisons are performed using either {@link less}; An element is the smallest if no other element + * The comparisons are performed using either {@link less}; An element is the smallest if no other element * compares less than it. If more than one element fulfills this condition, the iterator returned points to the first - * of such elements.
+ * of such elements. * * @param first {@link Iteartor Input iterator} to the initial final position of the sequence to compare. * @param last {@link Iteartor Input iterator} to the final final position of the sequence to compare. The range used @@ -4128,14 +4114,13 @@ namespace std (first: ForwardIterator, last: ForwardIterator): ForwardIterator; /** - *Return smallest element in range.
+ * Return smallest element in range. * - *Returns an iterator pointing to the element with the smallest value in the range [first, last). - *
+ * Returns an iterator pointing to the element with the smallest value in the range [first, last). * - *The comparisons are performed using either compare; An element is the smallest if no other element + * The comparisons are performed using either compare; An element is the smallest if no other element * compares less than it. If more than one element fulfills this condition, the iterator returned points to the first - * of such elements.
+ * of such elements. * * @param first {@link Iteartor Input iterator} to the initial final position of the sequence to compare. * @param last {@link Iteartor Input iterator} to the final final position of the sequence to compare. The range used @@ -4151,7 +4136,7 @@ namespace std (first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; export function min_elementReturn largest element in range.
+ * Return largest element in range. * - *Returns an iterator pointing to the element with the largest value in the range [first, last). - *
+ * Returns an iterator pointing to the element with the largest value in the range [first, last). * - *The comparisons are performed using either {@link greater}; An element is the largest if no other element + * The comparisons are performed using either {@link greater}; An element is the largest if no other element * compares less than it. If more than one element fulfills this condition, the iterator returned points to the first - * of such elements.
+ * of such elements. * * @param first {@link Iteartor Input iterator} to the initial final position of the sequence to compare. * @param last {@link Iteartor Input iterator} to the final final position of the sequence to compare. The range used @@ -4184,14 +4168,13 @@ namespace std (first: ForwardIterator, last: ForwardIterator): ForwardIterator; /** - *Return largest element in range.
+ * Return largest element in range. * - *Returns an iterator pointing to the element with the largest value in the range [first, last). - *
+ * Returns an iterator pointing to the element with the largest value in the range [first, last). * - *The comparisons are performed using either compare; An element is the largest if no other element + * The comparisons are performed using either compare; An element is the largest if no other element * compares less than it. If more than one element fulfills this condition, the iterator returned points to the first - * of such elements.
+ * of such elements. * * @param first {@link Iteartor Input iterator} to the initial final position of the sequence to compare. * @param last {@link Iteartor Input iterator} to the final final position of the sequence to compare. The range used @@ -4207,7 +4190,7 @@ namespace std (first: ForwardIterator, last: ForwardIterator, compare: (x: T, y: T) => boolean): ForwardIterator; export function max_elementReturn smallest and largest elements in range.
+ * Return smallest and largest elements in range. * - *Returns a {@link Pair} with an iterator pointing to the element with the smallest value in the range - * [first, last) as first element, and the largest as second.
+ * Returns a {@link Pair} with an iterator pointing to the element with the smallest value in the range + * [first, last) as first element, and the largest as second. * - *The comparisons are performed using either {@link less} and {@link greater}.
+ * The comparisons are performed using either {@link less} and {@link greater}. * - *If more than one equivalent element has the smallest value, the first iterator points to the first of such - * elements.
+ * If more than one equivalent element has the smallest value, the first iterator points to the first of such + * elements. * - *If more than one equivalent element has the largest value, the second iterator points to the last of such - * elements.
+ * If more than one equivalent element has the largest value, the second iterator points to the last of such + * elements. * * @param first {@link Iteartor Input iterator} to the initial final position of the sequence to compare. * @param last {@link Iteartor Input iterator} to the final final position of the sequence to compare. The range used @@ -4248,18 +4231,18 @@ namespace std (first: ForwardIterator, last: ForwardIterator): PairReturn smallest and largest elements in range.
+ * Return smallest and largest elements in range. * - *Returns a {@link Pair} with an iterator pointing to the element with the smallest value in the range - * [first, last) as first element, and the largest as second.
+ * Returns a {@link Pair} with an iterator pointing to the element with the smallest value in the range + * [first, last) as first element, and the largest as second. * - *The comparisons are performed using either compare.
+ * The comparisons are performed using either compare. * - *If more than one equivalent element has the smallest value, the first iterator points to the first of such - * elements.
+ * If more than one equivalent element has the smallest value, the first iterator points to the first of such + * elements. * - *If more than one equivalent element has the largest value, the second iterator points to the last of such - * elements.
+ * If more than one equivalent element has the largest value, the second iterator points to the last of such + * elements. * * @param first {@link Iteartor Input iterator} to the initial final position of the sequence to compare. * @param last {@link Iteartor Input iterator} to the final final position of the sequence to compare. The range used @@ -4279,7 +4262,7 @@ namespace std export function minmax_elementbool
. The value returned indicates
+ * whether the elements are considered to match in the context of this function.
+ *
+ * @return *lo* if *v* is less than *lo*, *hi* if *hi* is less than *v*, otherwise *v*.
+ */
+ export function clampTest whether range is permutation of another.
+ * Test whether range is permutation of another. * - * Compares the elements in the range [first1, last1) with those in the range beginning at
+ * Compares the elements in the range [first1, last1) with those in the range beginning at
* first2, and returns true
if all of the elements in both ranges match, even in a different
- * order.
Test whether range is permutation of another.
+ * Test whether range is permutation of another. * - * Compares the elements in the range [first1, last1) with those in the range beginning at
+ * Compares the elements in the range [first1, last1) with those in the range beginning at
* first2, and returns true
if all of the elements in both ranges match, even in a different
- * order.
Double ended queue.
+ * Double ended queue. * - *{@link Deque} (usually pronounced like "deck") is an irregular acronym of + * {@link Deque} (usually pronounced like "deck") is an irregular acronym of * double-ended queue. Double-ended queues are sequence containers with dynamic sizes that can be - * expanded or contracted on both ends (either its front or its back).
+ * expanded or contracted on both ends (either its front or its back). * - *Specific libraries may implement deques in different ways, generally as some form of dynamic array. But in any + * Specific libraries may implement deques in different ways, generally as some form of dynamic array. But in any * case, they allow for the individual elements to be accessed directly through random access iterators, with storage - * handled automatically by expanding and contracting the container as needed.
+ * handled automatically by expanding and contracting the container as needed. * - *Therefore, they provide a functionality similar to vectors, but with efficient insertion and deletion of + * Therefore, they provide a functionality similar to vectors, but with efficient insertion and deletion of * elements also at the beginning of the sequence, and not only at its end. But, unlike {@link Vector Vectors}, * {@link Deque Deques} are not guaranteed to store all its elements in contiguous storage locations: accessing - * elements in a deque by offsetting a pointer to another element causes undefined behavior.
+ * elements in a deque by offsetting a pointer to another element causes undefined behavior. * - *Both {@link Vector}s and {@link Deque}s provide a very similar interface and can be used for similar purposes, + * Both {@link Vector}s and {@link Deque}s provide a very similar interface and can be used for similar purposes, * but internally both work in quite different ways: While {@link Vector}s use a single array that needs to be * occasionally reallocated for growth, the elements of a {@link Deque} can be scattered in different chunks of * storage, with the container keeping the necessary information internally to provide direct access to any of its * elements in constant time and with a uniform sequential interface (through iterators). Therefore, * {@link Deque Deques} are a little more complex internally than {@link Vector}s, but this allows them to grow more * efficiently under certain circumstances, especially with very long sequences, where reallocations become more - * expensive.
+ * expensive. * - *For operations that involve frequent insertion or removals of elements at positions other than the beginning or + * For operations that involve frequent insertion or removals of elements at positions other than the beginning or * the end, {@link Deque Deques} perform worse and have less consistent iterators and references than - * {@link List Lists}.
+ * {@link List Lists}. * - * + * * - *Default Constructor.
+ * Default Constructor. * - *Constructs an empty container, with no elements.
+ * Constructs an empty container, with no elements. */ public constructor(); /** - *Initializer list Constructor.
+ * Initializer list Constructor. * - *Constructs a container with a copy of each of the elements in array, in the same order.
+ * Constructs a container with a copy of each of the elements in array, in the same order. * * @param array An array containing elements to be copied and contained. */ public constructor(items: ArrayFill Constructor.
+ * Fill Constructor. * - *Constructs a container with n elements. Each element is a copy of val (if provided).
+ * Constructs a container with n elements. Each element is a copy of val (if provided). * * @param n Initial container size (i.e., the number of elements in the container at construction). * @param val Value to fill the container with. Each of the n elements in the container is @@ -179,9 +179,9 @@ namespace std public constructor(size: number, val: T); /** - *Copy Constructor.
+ * Copy Constructor. * - *Constructs a container with a copy of each of the elements in container, in the same order.
+ * Constructs a container with a copy of each of the elements in container, in the same order. * * @param container Another container object of the same type (with the same class template * arguments T), whose contents are either copied or acquired. @@ -189,10 +189,10 @@ namespace std public constructor(container: DequeRange Constructor.
+ * Range Constructor. * - *Constructs a container with as many elements as the range (begin, end), with each - * element emplace-constructed from its corresponding element in that range, in the same order.
+ * Constructs a container with as many elements as the range (begin, end), with each + * element emplace-constructed from its corresponding element in that range, in the same order. * * @param begin Input interator of the initial position in a sequence. * @param end Input interator of the final position in a sequence. @@ -306,20 +306,20 @@ namespace std } /** - *Request a change in capacity.
+ * Request a change in capacity. * - *Requests that the {@link Deque container} {@link capacity} be at least enough to contain - * n elements.
+ * Requests that the {@link Deque container} {@link capacity} be at least enough to contain + * n elements. * - *If n is greater than the current {@link Deque container} {@link capacity}, the + * If n is greater than the current {@link Deque container} {@link capacity}, the * function causes the {@link Deque container} to reallocate its storage increasing its - * {@link capacity} to n (or greater).
+ * {@link capacity} to n (or greater). * - *In all other cases, the function call does not cause a reallocation and the - * {@link Deque container} {@link capacity} is not affected.
+ * In all other cases, the function call does not cause a reallocation and the + * {@link Deque container} {@link capacity} is not affected. * - *This function has no effect on the {@link Deque container} {@link size} and cannot alter - * its elements.
+ * This function has no effect on the {@link Deque container} {@link size} and cannot alter + * its elements. * * @param n Minimum {@link capacity} for the {@link Deque container}. * Note that the resulting {@link capacity} may be equal or greater than n. @@ -425,23 +425,23 @@ namespace std } /** - *Return size of allocated storage capacity.
+ * Return size of allocated storage capacity. * - *Returns the size of the storage space currently allocated for the {@link Deque container}, - * expressed in terms of elements.
+ * Returns the size of the storage space currently allocated for the {@link Deque container}, + * expressed in terms of elements. * - *This {@link capacity} is not necessarily equal to the {@link Deque container} {@link size}. + * This {@link capacity} is not necessarily equal to the {@link Deque container} {@link size}. * It can be equal or greater, with the extra space allowing to accommodate for growth without the - * need to reallocate on each insertion.
+ * need to reallocate on each insertion. * - *Notice that this {@link capacity} does not suppose a limit on the {@link size} of the + * Notice that this {@link capacity} does not suppose a limit on the {@link size} of the * {@link Deque container}. When this {@link capacity} is exhausted and more is needed, it is * automatically expanded by the {@link Deque container} (reallocating it storage space). * The theoretical limit on the {@link size} of a {@link Deque container} is given by member - * {@link max_size}.
+ * {@link max_size}. * - *The {@link capacity} of a {@link Deque container} can be explicitly altered by calling member - * {@link Deque.reserve}.
+ * The {@link capacity} of a {@link Deque container} can be explicitly altered by calling member + * {@link Deque.reserve}. * * @return The size of the currently allocated storage capacity in the {@link Deque container}, * measured in terms of the number elements it can hold. @@ -895,17 +895,17 @@ namespace std SWAP --------------------------------------------------------- */ /** - *Swap content.
+ * Swap content. * - *Exchanges the content of the container by the content of obj, which is another - * {@link Deque container} object with same type of elements. Sizes and container type may differ.
+ * Exchanges the content of the container by the content of obj, which is another + * {@link Deque container} object with same type of elements. Sizes and container type may differ. * - *After the call to this member function, the elements in this container are those which were in obj + * After the call to this member function, the elements in this container are those which were in obj * before the call, and the elements of obj are those which were in this. All iterators, references and - * pointers remain valid for the swapped objects.
+ * pointers remain valid for the swapped objects. * - *Notice that a non-member function exists with the same name, {@link std.swap swap}, overloading that - * algorithm with an optimization that behaves like this member function.
+ * Notice that a non-member function exists with the same name, {@link swap swap}, overloading that + * algorithm with an optimization that behaves like this member function. * * @param obj Another {@link Deque container} of the same type of elements (i.e., instantiated * with the same template parameter, T) whose content is swapped with that of this @@ -936,11 +936,10 @@ namespace std namespace std { /** - *An iterator of {@link Deque}.
+ * An iterator of {@link Deque}. * - * * * @author Jeongho NamConstruct from the source {@link Deque container}.
+ * Construct from the source {@link Deque container}. * - *Do not create the iterator directly, by yourself.
- *Use {@link Deque.begin begin()}, {@link Deque.end end()} in {@link Deque container} instead.
+ * #### Note + * Do not create the iterator directly, by yourself. + * + * Use {@link Deque.begin begin()}, {@link Deque.end end()} in {@link Deque container} instead. * * @param source The source {@link Deque container} to reference. * @param index Sequence number of the element in the source {@link Deque}. @@ -1078,11 +1078,10 @@ namespace std namespace std { /** - *A reverse-iterator of Deque.
+ * A reverse-iterator of Deque. * - * * * @paramFunction handling termination on exception
+ * Function handling termination on exception * - *Calls the current terminate handler.
+ * Calls the current terminate handler. * - *By default, the terminate handler calls abort. But this behavior can be redefined by calling - * {@link set_terminate}.
+ * By default, the terminate handler calls abort. But this behavior can be redefined by calling + * {@link set_terminate}. * - * This function is automatically called when no catch
handler can be found for a thrown exception,
- * or for some other exceptional circumstance that makes impossible to continue the exception handling process.
catch
handler can be found for a thrown exception,
+ * or for some other exceptional circumstance that makes impossible to continue the exception handling process.
*
- * This function is provided so that the terminate handler can be explicitly called by a program that needs to + * This function is provided so that the terminate handler can be explicitly called by a program that needs to * abnormally terminate, and works even if {@link set_terminate} has not been used to set a custom terminate handler - * (calling abort in this case).
+ * (calling abort in this case). */ export function terminate(): void { if (_Terminate_handler != null) _Terminate_handler(); - if (std.is_node() == true) + if (is_node() == true) process.exit(); else { @@ -40,15 +40,15 @@ namespace std } /** - *Set terminate handler function.
+ * Set terminate handler function. * - *A terminate handler function is a function automatically called when the exception handling process has + * A terminate handler function is a function automatically called when the exception handling process has * to be abandoned for some reason. This happens when no catch handler can be found for a thrown exception, or for - * some other exceptional circumstance that makes impossible to continue the exception handling process.
+ * some other exceptional circumstance that makes impossible to continue the exception handling process. * - *Before this function is called by the program for the first time, the default behavior is to call abort.
+ * Before this function is called by the program for the first time, the default behavior is to call abort. * - *A program may explicitly call the current terminate handler function by calling {@link terminate}.
+ * A program may explicitly call the current terminate handler function by calling {@link terminate}. * * @param f Function that takes no parameters and returns no value (void). */ @@ -56,7 +56,7 @@ namespace std { _Terminate_handler = f; - if (std.is_node() == true) + if (is_node() == true) process.on("uncaughtException", function (error: Error): void { @@ -72,14 +72,14 @@ namespace std } /** - *Get terminate handler function.
+ * Get terminate handler function. * - * The terminate handler function is automatically called when no catch
handler can be found
+ * The terminate handler function is automatically called when no catch
handler can be found
* for a thrown exception, or for some other exceptional circumstance that makes impossible to continue the exception
- * handling process.
If no such function has been set by a previous call to {@link set_terminate}, the function returns a - * null-pointer.
+ * If no such function has been set by a previous call to {@link set_terminate}, the function returns a + * null-pointer. * * @return If {@link set_terminate} has previously been called by the program, the function returns the current * terminate handler function. Otherwise, it returns a null-pointer. @@ -103,15 +103,15 @@ namespace std - UNDERFLOW_ERROR ========================================================= */ /** - *Standard exception class.
+ * Standard exception class. * - *Base class for standard exceptions.
+ * Base class for standard exceptions. * - *All objects thrown by components of the standard library are derived from this class. - * Therefore, all standard exceptions can be caught by catching this type by reference.
+ * All objects thrown by components of the standard library are derived from this class. + * Therefore, all standard exceptions can be caught by catching this type by reference. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -141,13 +141,13 @@ namespace std } /** - *Get string identifying exception.
+ * Get string identifying exception. * - *Returns a string that may be used to identify the exception.
+ * Returns a string that may be used to identify the exception. * - *The particular representation pointed by the returned value is implementation-defined. + * The particular representation pointed by the returned value is implementation-defined. * As a virtual function, derived classes may redefine this function so that specify value are - * returned.
+ * returned. */ public what(): string { @@ -163,17 +163,17 @@ namespace std - OUT_OF_RANGE ========================================================= */ /** - *Logic error exception.
+ * Logic error exception. * - *This class defines the type of objects thrown as exceptions to report errors in the internal - * logical of the program, such as violation of logical preconditions or class invariants.
+ * This class defines the type of objects thrown as exceptions to report errors in the internal + * logical of the program, such as violation of logical preconditions or class invariants. * - *These errors are presumably detectable before the program executes.
+ * These errors are presumably detectable before the program executes. * - *It is used as a base class for several logical error exceptions.
+ * It is used as a base class for several logical error exceptions. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -193,18 +193,18 @@ namespace std } /** - *Domain error exception.
+ * Domain error exception. * - *This class defines the type of objects thrown as exceptions to report domain errors.
+ * This class defines the type of objects thrown as exceptions to report domain errors. * - *Generally, the domain of a mathematical function is the subset of values that it is defined for. + * Generally, the domain of a mathematical function is the subset of values that it is defined for. * For example, the square root function is only defined for non-negative numbers. Thus, a negative number - * for such a function would qualify as a domain error.
+ * for such a function would qualify as a domain error. * - *No component of the standard library throws exceptions of this type. It is designed as a standard - * exception to be thrown by programs.
+ * No component of the standard library throws exceptions of this type. It is designed as a standard + * exception to be thrown by programs. * - * * * @reference http://www.cplusplus.com/reference/stdexcept/domain_error @@ -214,7 +214,7 @@ namespace std extends LogicError { /** - *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -225,15 +225,15 @@ namespace std } /** - *Invalid argument exception.
+ * Invalid argument exception. * - *This class defines the type of objects thrown as exceptions to report an invalid argument.
+ * This class defines the type of objects thrown as exceptions to report an invalid argument. * - *It is a standard exception that can be thrown by programs. Some components of the standard library - * also throw exceptions of this type to signal invalid arguments.
+ * It is a standard exception that can be thrown by programs. Some components of the standard library + * also throw exceptions of this type to signal invalid arguments. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -253,15 +253,15 @@ namespace std } /** - *Length error exception.
+ * Length error exception. * - *This class defines the type of objects thrown as exceptions to report a length error.
+ * This class defines the type of objects thrown as exceptions to report a length error. * - *It is a standard exception that can be thrown by programs. Some components of the standard library, - * such as vector and string also throw exceptions of this type to signal errors resizing.
+ * It is a standard exception that can be thrown by programs. Some components of the standard library, + * such as vector and string also throw exceptions of this type to signal errors resizing. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -281,16 +281,16 @@ namespace std } /** - *Out-of-range exception.
+ * Out-of-range exception. * - *This class defines the type of objects thrown as exceptions to report an out-of-range error.
+ * This class defines the type of objects thrown as exceptions to report an out-of-range error. * - *It is a standard exception that can be thrown by programs. Some components of the standard library, + * It is a standard exception that can be thrown by programs. Some components of the standard library, * such as vector, deque, string and bitset also throw exceptions of this type to signal arguments - * out of range.
+ * out of range. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -317,15 +317,15 @@ namespace std - UNDERFLOW_ERROR ========================================================= */ /** - *Runtime error exception.
+ * Runtime error exception. * - *This class defines the type of objects thrown as exceptions to report errors that can only be - * detected during runtime.
+ * This class defines the type of objects thrown as exceptions to report errors that can only be + * detected during runtime. * - *It is used as a base class for several runtime error exceptions.
+ * It is used as a base class for several runtime error exceptions. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -345,15 +345,15 @@ namespace std } /** - *Overflow error exception.
+ * Overflow error exception. * - *This class defines the type of objects thrown as exceptions to arithmetic overflow errors.
+ * This class defines the type of objects thrown as exceptions to arithmetic overflow errors. * - *It is a standard exception that can be thrown by programs. Some components of the standard library - * also throw exceptions of this type to signal range errors.
+ * It is a standard exception that can be thrown by programs. Some components of the standard library + * also throw exceptions of this type to signal range errors. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -373,15 +373,15 @@ namespace std } /** - *Underflow error exception.
+ * Underflow error exception. * - *This class defines the type of objects thrown as exceptions to arithmetic underflow errors.
+ * This class defines the type of objects thrown as exceptions to arithmetic underflow errors. * - *No component of the standard library throws exceptions of this type. It is designed as a standard - * exception to be thrown by programs.
+ * No component of the standard library throws exceptions of this type. It is designed as a standard + * exception to be thrown by programs. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ @@ -401,16 +401,16 @@ namespace std } /** - *Range error exception.
+ * Range error exception. * - *This class defines the type of objects thrown as exceptions to report range errors in internal - * computations.
+ * This class defines the type of objects thrown as exceptions to report range errors in internal + * computations. * - *It is a standard exception that can be thrown by programs. Some components of the standard library - * also throw exceptions of this type to signal range errors.
+ * It is a standard exception that can be thrown by programs. Some components of the standard library + * also throw exceptions of this type to signal range errors. * - * + * + *Construct from a message.
+ * Construct from a message. * * @param message A message representing specification about the Exception. */ diff --git a/ts/src/std/Functional.ts b/ts/src/std/Functional.ts index 224e8ad3..7c1f56ea 100644 --- a/ts/src/std/Functional.ts +++ b/ts/src/std/Functional.ts @@ -11,13 +11,13 @@ namespace std { /** - *Function object class for equality comparison.
+ * Function object class for equality comparison. * - *Binary function object class whose call returns whether its two arguments compare equal (as returned by - * operator ==).
+ * Binary function object class whose call returns whether its two arguments compare equal (as returned by + * operator ==). * - *Generically, function objects are instances of a class with member function {@link IComparable.equal_to equal_to} - * defined. This member function allows the object to be used with the same syntax as a function call.
+ * Generically, function objects are instances of a class with member function {@link IComparable.equal_to equal_to} + * defined. This member function allows the object to be used with the same syntax as a function call. * * @param x First element to compare. * @param y Second element to compare. @@ -38,13 +38,13 @@ namespace std } /** - *Function object class for non-equality comparison.
+ * Function object class for non-equality comparison. * - *Binary function object class whose call returns whether its two arguments compare not equal (as returned - * by operator operator!=).
+ * Binary function object class whose call returns whether its two arguments compare not equal (as returned + * by operator operator!=). * - *Generically, function objects are instances of a class with member function {@link IComparable.equal_to equal_to} - * defined. This member function allows the object to be used with the same syntax as a function call.
+ * Generically, function objects are instances of a class with member function {@link IComparable.equal_to equal_to} + * defined. This member function allows the object to be used with the same syntax as a function call. * * @param x First element to compare. * @param y Second element to compare. @@ -53,20 +53,20 @@ namespace std */ export function not_equal_toFunction for less-than inequality comparison.
+ * Function for less-than inequality comparison. * - *Binary function returns whether the its first argument compares less than the second.
+ * Binary function returns whether the its first argument compares less than the second. * - *Generically, function objects are instances of a class with member function {@link IComparable.less less} + * Generically, function objects are instances of a class with member function {@link IComparable.less less} * defined. If an object doesn't have the method, then its own uid will be used to compare insteadly. - * This member function allows the object to be used with the same syntax as a function call.
+ * This member function allows the object to be used with the same syntax as a function call. * - *Objects of this class can be used on standard algorithms such as {@link sort sort()}, - * {@link merge merge()} or {@link TreeMap.lower_bound lower_bound()}.
+ * Objects of this class can be used on standard algorithms such as {@link sort sort()}, + * {@link merge merge()} or {@link TreeMap.lower_bound lower_bound()}. * * @paramFunction object class for less-than-or-equal-to comparison.
+ * Function object class for less-than-or-equal-to comparison. * - *Binary function object class whose call returns whether the its first argument compares {@link less less than} or - * {@link equal_to equal to} the second (as returned by operator <=).
+ * Binary function object class whose call returns whether the its first argument compares {@link less less than} or + * {@link equal_to equal to} the second (as returned by operator <=). * - *Generically, function objects are instances of a class with member function {@link IComparable.less less} + * Generically, function objects are instances of a class with member function {@link IComparable.less less} * and {@link IComparable.equal_to equal_to} defined. This member function allows the object to be used with the same - * syntax as a function call.
+ * syntax as a function call. * * @param x First element, the standard of comparison. * @param y Second element compare with the first. @@ -104,21 +104,21 @@ namespace std */ export function less_equalFunction for greater-than inequality comparison.
+ * Function for greater-than inequality comparison. * - *Binary function returns whether the its first argument compares greater than the second.
+ * Binary function returns whether the its first argument compares greater than the second. * - *Generically, function objects are instances of a class with member function {@link less} and + * Generically, function objects are instances of a class with member function {@link less} and * {@link equal_to equal_to()} defined. If an object doesn't have those methods, then its own uid will be used * to compare insteadly. This member function allows the object to be used with the same syntax as a function - * call.
+ * call. * - *Objects of this class can be used on standard algorithms such as {@link sort sort()}, - * {@link merge merge()} or {@link TreeMap.lower_bound lower_bound()}.
+ * Objects of this class can be used on standard algorithms such as {@link sort sort()}, + * {@link merge merge()} or {@link TreeMap.lower_bound lower_bound()}. * * @paramFunction object class for greater-than-or-equal-to comparison.
+ * Function object class for greater-than-or-equal-to comparison. * - *Binary function object class whose call returns whether the its first argument compares - * {@link greater greater than} or {@link equal_to equal to} the second (as returned by operator >=).
+ * Binary function object class whose call returns whether the its first argument compares + * {@link greater greater than} or {@link equal_to equal to} the second (as returned by operator >=). * - *Generically, function objects are instances of a class with member function {@link IComparable.less less} + * Generically, function objects are instances of a class with member function {@link IComparable.less less} * defined. If an object doesn't have the method, then its own uid will be used to compare insteadly. - * This member function allows the object to be used with the same syntax as a function call.
+ * This member function allows the object to be used with the same syntax as a function call. * * @param x First element, the standard of comparison. * @param y Second element compare with the first. @@ -147,17 +147,17 @@ namespace std */ export function greater_equalLogical AND function object class.
+ * Logical AND function object class. * - *Binary function object class whose call returns the result of the logical "and" operation between its two - * arguments (as returned by operator &&).
+ * Binary function object class whose call returns the result of the logical "and" operation between its two + * arguments (as returned by operator &&). * - *Generically, function objects are instances of a class with member function operator() defined. This member - * function allows the object to be used with the same syntax as a function call.
+ * Generically, function objects are instances of a class with member function operator() defined. This member + * function allows the object to be used with the same syntax as a function call. * * @param x First element. * @param y Second element. @@ -170,13 +170,13 @@ namespace std } /** - *Logical OR function object class.
+ * Logical OR function object class. * - *Binary function object class whose call returns the result of the logical "or" operation between its two - * arguments (as returned by operator ||).
+ * Binary function object class whose call returns the result of the logical "or" operation between its two + * arguments (as returned by operator ||). * - *Generically, function objects are instances of a class with member function operator() defined. This member - * function allows the object to be used with the same syntax as a function call.
+ * Generically, function objects are instances of a class with member function operator() defined. This member + * function allows the object to be used with the same syntax as a function call. * * @param x First element. * @param y Second element. @@ -189,13 +189,13 @@ namespace std } /** - *Logical NOT function object class.
+ * Logical NOT function object class. * - *Unary function object class whose call returns the result of the logical "not" operation on its argument - * (as returned by operator !).
+ * Unary function object class whose call returns the result of the logical "not" operation on its argument + * (as returned by operator !). * - *Generically, function objects are instances of a class with member function operator() defined. This member - * function allows the object to be used with the same syntax as a function call.
+ * Generically, function objects are instances of a class with member function operator() defined. This member + * function allows the object to be used with the same syntax as a function call. * * @param x Target element. * @@ -207,10 +207,10 @@ namespace std } /** - *Bitwise AND function object class.
+ * Bitwise AND function object class. * - *Binary function object class whose call returns the result of applying the bitwise "and" operation between - * its two arguments (as returned by operator &).
+ * Binary function object class whose call returns the result of applying the bitwise "and" operation between + * its two arguments (as returned by operator &). * * @param x First element. * @param y Second element. @@ -223,10 +223,10 @@ namespace std } /** - *Bitwise OR function object class.
+ * Bitwise OR function object class. * - *Binary function object class whose call returns the result of applying the bitwise "and" operation between - * its two arguments (as returned by operator &).
+ * Binary function object class whose call returns the result of applying the bitwise "and" operation between + * its two arguments (as returned by operator &). * * @param x First element. * @param y Second element. @@ -239,10 +239,10 @@ namespace std } /** - *Bitwise XOR function object class.
+ * Bitwise XOR function object class. * - *Binary function object class whose call returns the result of applying the bitwise "exclusive or" - * operation between its two arguments (as returned by operator ^).
+ * Binary function object class whose call returns the result of applying the bitwise "exclusive or" + * operation between its two arguments (as returned by operator ^). * * @param x First element. * @param y Second element. @@ -255,14 +255,14 @@ namespace std } /** - *Default hash function for number.
+ * Default hash function for number. * - *Unary function that defines the default hash function used by the standard library.
+ * Unary function that defines the default hash function used by the standard library. * - *The functional call returns a hash value of its argument: A hash value is a value that depends solely on + * The functional call returns a hash value of its argument: A hash value is a value that depends solely on * its argument, returning always the same value for the same argument (for a given execution of a program). The * value returned shall have a small likelihood of being the same as the one returned for a different argument. - *
+ * * * @param val Value to be hashed. * @@ -271,14 +271,13 @@ namespace std export function hash(val: number): number; /** - *Default hash function for string.
+ * Default hash function for string. * - *Unary function that defines the default hash function used by the standard library.
+ * Unary function that defines the default hash function used by the standard library. * - *The functional call returns a hash value of its argument: A hash value is a value that depends solely on + * The functional call returns a hash value of its argument: A hash value is a value that depends solely on * its argument, returning always the same value for the same argument (for a given execution of a program). The * value returned shall have a small likelihood of being the same as the one returned for a different argument. - *
* * @param str A string to be hashed. * @@ -287,18 +286,18 @@ namespace std export function hash(str: string): number; /** - *Default hash function for Object.
+ * Default hash function for Object. * - *Unary function that defines the default hash function used by the standard library.
+ * Unary function that defines the default hash function used by the standard library. * - *The functional call returns a hash value of its argument: A hash value is a value that depends solely on + * The functional call returns a hash value of its argument: A hash value is a value that depends solely on * its argument, returning always the same value for the same argument (for a given execution of a program). The * value returned shall have a small likelihood of being the same as the one returned for a different argument. - *
+ * * - * The default {@link hash} function of Object returns a value returned from {@link hash hash(number)} with
+ * The default {@link hash} function of Object returns a value returned from {@link hash hash(number)} with
* an unique id of each Object. If you want to specify {@link hash} function of a specific class, then
- * define a member function public hashCode(): number
in the class.
public hashCode(): number
in the class.
*
* @param obj Object to be hashed.
*
@@ -311,17 +310,17 @@ namespace std
let type: string = typeof par;
if (type == "number")
- return hash_of_number(par);
+ return _Hash_number(par);
else if (type == "string")
- return hash_of_string(par);
+ return _Hash_string(par);
else
- return hash_of_object(par);
+ return _Hash_object(par);
}
/**
* @hidden
*/
- function hash_of_number(val: number): number
+ function _Hash_number(val: number): number
{
// ------------------------------------------
// IN C++
@@ -350,7 +349,7 @@ namespace std
/**
* @hidden
*/
- function hash_of_string(str: string): number
+ function _Hash_string(str: string): number
{
let code: number = 2166136261;
@@ -365,12 +364,12 @@ namespace std
/**
* @hidden
*/
- function hash_of_object(obj: Object): number
+ function _Hash_object(obj: Object): number
{
if ((