/** * @packageDocumentation * @module std */ import { IForwardIterator } from "../iterator/IForwardIterator"; import { IBidirectionalIterator } from "../iterator/IBidirectionalIterator"; import { IRandomAccessIterator } from "../iterator/IRandomAccessIterator"; import { IPointer } from "../functional/IPointer"; import { UnaryPredicator } from "../internal/functional/UnaryPredicator"; import { BinaryPredicator } from "../internal/functional/BinaryPredicator"; import { General } from "../internal/functional/General"; import { Writeonly } from "../internal/functional/Writeonly"; declare type UnaryOperatorInferrer, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>> = (val: IPointer.ValueType) => IPointer.ValueType; declare type BinaryOperatorInferrer, InputIterator1>>, InputIterator2 extends Readonly, InputIterator2>>, OutputIterator extends Writeonly, OutputIterator>>> = (x: IPointer.ValueType, y: IPointer.ValueType) => IPointer.ValueType; /** * Copy elements in range. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the first position. * * @return Output Iterator of the last position by advancing. */ export declare function copy, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator): OutputIterator; /** * Copy *n* elements. * * @param first Input iteartor of the first position. * @param n Number of elements to copy. * @param output Output iterator of the first position. * * @return Output Iterator of the last position by advancing. */ export declare function copy_n, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, n: number, output: OutputIterator): OutputIterator; /** * Copy specific elements by a condition. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the first position. * @param pred A function predicates the specific condition. * * @return Output Iterator of the last position by advancing. */ export declare function copy_if, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator, pred: UnaryPredicator>): OutputIterator; /** * Copy elements reversely. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the first position. * * @return Output Iterator of the last position by advancing. */ export declare function copy_backward, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator): OutputIterator; /** * Fill range elements * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param val The value to fill. * * @return Output Iterator of the last position by advancing. */ export declare function fill, ForwardIterator>>>(first: ForwardIterator, last: ForwardIterator, val: IPointer.ValueType): void; /** * Fill *n* elements. * * @param first Input iteartor of the first position. * @param n Number of elements to fill. * @param val The value to fill. * * @return Output Iterator of the last position by advancing. */ export declare function fill_n, OutputIterator>>>(first: OutputIterator, n: number, val: IPointer.ValueType): OutputIterator; /** * Transform elements. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the first position. * @param op Unary function determines the transform. * * @return Output Iterator of the last position by advancing. */ export declare function transform, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, result: OutputIterator, op: UnaryOperatorInferrer): OutputIterator; /** * Transform elements. * * @param first1 Input iteartor of the first position of the 1st range. * @param last1 Input iterator of the last position of the 1st range. * @param first2 Input iterator of the first position of the 2nd range. * @param output Output iterator of the first position. * @param op Binary function determines the transform. * * @return Output Iterator of the last position by advancing. */ export declare function transform, InputIterator1>>, InputIterator2 extends Readonly, InputIterator2>>, OutputIterator extends Writeonly, OutputIterator>>>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, result: OutputIterator, op: BinaryOperatorInferrer): OutputIterator; /** * Generate range elements. * * @param first Forward iteartor of the first position. * @param last Forward iterator of the last position. * @param gen The generator function. */ export declare function generate, ForwardIterator>>>(first: ForwardIterator, last: ForwardIterator, gen: () => IPointer.ValueType): void; /** * Generate *n* elements. * * @param first Forward iteartor of the first position. * @param n Number of elements to generate. * @param gen The generator function. * * @return Forward Iterator to the last position by advancing. */ export declare function generate_n, ForwardIterator>>>(first: ForwardIterator, n: number, gen: () => IPointer.ValueType): ForwardIterator; /** * Remove duplicated elements in sorted range. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param pred A binary function predicates two arguments are equal. Default is {@link equal_to}. * * @return Input iterator to the last element not removed. */ export declare function unique, InputIterator>>>(first: InputIterator, last: InputIterator, pred?: BinaryPredicator>): InputIterator; /** * Copy elements in range without duplicates. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the last position. * @param pred A binary function predicates two arguments are equal. Default is {@link equal_to}. * * @return Output Iterator of the last position by advancing. */ export declare function unique_copy, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator, pred?: BinaryPredicator>): OutputIterator; /** * Remove specific value in range. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param val The specific value to remove. * * @return Iterator tho the last element not removed. */ export declare function remove, InputIterator>>>(first: InputIterator, last: InputIterator, val: IPointer.ValueType): InputIterator; /** * Remove elements in range by a condition. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param pred An unary function predicates remove. * * @return Iterator tho the last element not removed. */ export declare function remove_if, InputIterator>>>(first: InputIterator, last: InputIterator, pred: UnaryPredicator>): InputIterator; /** * Copy range removing specific value. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the last position. * @param val The condition predicates remove. * * @return Output Iterator of the last position by advancing. */ export declare function remove_copy, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator, val: IPointer.ValueType): OutputIterator; /** * Copy range removing elements by a condition. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the last position. * @param pred An unary function predicates remove. * * @return Output Iterator of the last position by advancing. */ export declare function remove_copy_if, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator, pred: UnaryPredicator>): OutputIterator; /** * Replace specific value in range. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param old_val Specific value to change * @param new_val Specific value to be changed. */ export declare function replace, InputIterator>>>(first: InputIterator, last: InputIterator, old_val: IPointer.ValueType, new_val: IPointer.ValueType): void; /** * Replace specific condition in range. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param pred An unary function predicates the change. * @param new_val Specific value to be changed. */ export declare function replace_if, InputIterator>>>(first: InputIterator, last: InputIterator, pred: UnaryPredicator>, new_val: IPointer.ValueType): void; /** * Copy range replacing specific value. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the first position. * @param old_val Specific value to change * @param new_val Specific value to be changed. * * @return Output Iterator of the last position by advancing. */ export declare function replace_copy, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, output: OutputIterator, old_val: IPointer.ValueType, new_val: IPointer.ValueType): OutputIterator; /** * Copy range replacing specfic condition. * * @param first Input iteartor of the first position. * @param last Input iterator of the last position. * @param output Output iterator of the first position. * @param pred An unary function predicates the change. * @param new_val Specific value to be changed. * * @return Output Iterator of the last position by advancing. */ export declare function replace_copy_if, InputIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: UnaryPredicator>, new_val: IPointer.ValueType): OutputIterator; /** * Swap values of two iterators. * * @param x Forward iterator to swap its value. * @param y Forward iterator to swap its value. */ export declare function iter_swap, ForwardIterator1>>, ForwardIterator2 extends General, ForwardIterator2>>>(x: ForwardIterator1, y: ForwardIterator2): void; /** * Swap values of two ranges. * * @param first1 Forward iteartor of the first position of the 1st range. * @param last1 Forward iterator of the last position of the 1st range. * @param first2 Forward iterator of the first position of the 2nd range. * * @return Forward Iterator of the last position of the 2nd range by advancing. */ export declare function swap_ranges, ForwardIterator1>>, ForwardIterator2 extends General, ForwardIterator2>>>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2): ForwardIterator2; /** * Reverse elements in range. * * @param first Bidirectional iterator of the first position. * @param last Bidirectional iterator of the last position. */ export declare function reverse, BidirectionalIterator>>>(first: BidirectionalIterator, last: BidirectionalIterator): void; /** * Copy reversed elements in range. * * @param first Bidirectional iterator of the first position. * @param last Bidirectional iterator of the last position. * @param output Output iterator of the first position. * * @return Output Iterator of the last position by advancing. */ export declare function reverse_copy, BidirectionalIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: BidirectionalIterator, last: BidirectionalIterator, output: OutputIterator): OutputIterator; export declare function shift_left, ForwardIterator>>>(first: ForwardIterator, last: ForwardIterator, n: number): ForwardIterator; export declare function shift_right, ForwardIterator>>>(first: ForwardIterator, last: ForwardIterator, n: number): ForwardIterator; /** * Rotate elements in range. * * @param first Input iteartor of the first position. * @param middle Input iteartor of the initial position of the right side. * @param last Input iteartor of the last position. * * @return Input iterator of the final position in the left side; *middle*. */ export declare function rotate, InputIterator>>>(first: InputIterator, middle: InputIterator, last: InputIterator): InputIterator; /** * Copy rotated elements in range. * * @param first Input iteartor of the first position. * @param middle Input iteartor of the initial position of the right side. * @param last Input iteartor of the last position. * @param output Output iterator of the last position. * * @return Output Iterator of the last position by advancing. */ export declare function rotate_copy, ForwardIterator>>, OutputIterator extends Writeonly, OutputIterator>>>(first: ForwardIterator, middle: ForwardIterator, last: ForwardIterator, output: OutputIterator): OutputIterator; /** * Shuffle elements in range. * * @param first Random access iteartor of the first position. * @param last Random access iteartor of the last position. */ export declare function shuffle, RandomAccessIterator>>>(first: RandomAccessIterator, last: RandomAccessIterator): void; export {}; //# sourceMappingURL=modifiers.d.ts.map