Options
All
  • Public
  • Public/Protected
  • All
Menu

Module std

TSTL - TypeScript Standard Template Library

Index

References

Modules

Classes

Interfaces

Variables

Functions

References

base

Re-exports base

experimental

Re-exports experimental

ranges

Re-exports ranges

Variables

Const B

B: number = Math.sqrt((2*(1-G)) / (G*(2-G)))

Const EULER

EULER: 0.5772156649015329 = 0.5772156649015329

Const G

G: number = 7

Const G

G: number = Math.pow(Math.E, -EULER)

Const H_INF

H_INF: number = (1-G)* (G*G - 6*G + 12)/ (3*G * Math.pow(2-G, 2) * B)

Const INFINITY

INFINITY: 100 = 100

Const INFINITY

INFINITY: number = 100 * 1000

Const INIT_VALUE

INIT_VALUE: number = 2166136261

Const MAX_K

MAX_K: 150 = 150

Const MULTIPLIER

MULTIPLIER: number = 16777619

Const P

P: number[] = [0.99999999999980993, 676.5203681218851, -1259.1392167224028,771.32342877765313, -176.61502916214059, 12.507343278686905,-0.13857109526572012, 9.9843695780195716e-6, 1.5056327351493116e-7]

is_node_

is_node_: boolean | null = null

Functions

adjacent_find

  • adjacent_find<InputIterator>(first: InputIterator, last: InputIterator, pred?: BinaryPredicator<IPointer.ValueType<InputIterator>>): InputIterator
  • Find the first adjacent element.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • Default value pred: BinaryPredicator<IPointer.ValueType<InputIterator>> = equal_to

      A binary function predicates two arguments are equal. Default is equal_to.

    Returns InputIterator

    Iterator to the first element of adjacent find.

advance

  • advance<InputIterator>(it: InputIterator, n: number): InputIterator
  • Advance iterator.

    Type parameters

    • InputIterator: IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>

    Parameters

    • it: InputIterator

      Target iterator to advance.

    • n: number

      Step to advance.

    Returns InputIterator

    The advanced iterator.

all_of

  • all_of<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): boolean
  • Test whether all elements meet a specific condition.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns boolean

    Whether the pred returns always true for all elements.

any_of

  • any_of<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): boolean
  • Test whether any element meets a specific condition.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns boolean

    Whether the pred returns at least a true for all elements.

assoc_laguerre

  • assoc_laguerre(n: number, m: number, x: number): number

assoc_legendre

  • assoc_legendre(n: number, m: number, x: number): number

back_inserter

begin

  • begin<Container>(container: Container): IForwardContainer.IteratorType<Container>
  • Iterator to the first element.

    Type parameters

    Parameters

    • container: Container

      Target container.

    Returns IForwardContainer.IteratorType<Container>

    Iterator to the first element.

beta

  • beta(x: number, y: number): number

binary_search

  • binary_search<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, val: IPointer.ValueType<ForwardIterator>, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): boolean
  • Test whether a value exists in sorted range.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Input iterator of the first position.

    • last: ForwardIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<ForwardIterator>

      Value to search for.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether the value exists or not.

clamp

  • clamp<T>(v: T, lo: T, hi: T, comp?: Comparator<T>): T
  • Get the clamp value.

    Type parameters

    • T

    Parameters

    • v: T

      The value to clamp.

    • lo: T

      Lower value than hi.

    • hi: T

      Higher value than lo.

    • Default value comp: Comparator<T> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns T

    The clamp value.

comp_ellint_1

  • comp_ellint_1(k: number): number

comp_ellint_2

  • comp_ellint_2(k: number): number

comp_ellint_3

  • comp_ellint_3(k: number, n: number): number

copy

  • copy<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator): OutputIterator
  • Copy elements in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the first position.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

copy_backward

  • copy_backward<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator): OutputIterator
  • Copy elements reversely.

    Type parameters

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the first position.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

copy_if

  • copy_if<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): OutputIterator
  • Copy specific elements by a condition.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the first position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

copy_n

  • copy_n<InputIterator, OutputIterator>(first: InputIterator, n: number, output: OutputIterator): OutputIterator
  • Copy n elements.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • n: number

      Number of elements to copy.

    • output: OutputIterator

      Output iterator of the first position.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

count

  • count<InputIterator>(first: InputIterator, last: InputIterator, val: IPointer.ValueType<InputIterator>): number
  • Count matched value in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<InputIterator>

      The value to count.

    Returns number

    The matched count.

count_if

  • count_if<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): number
  • Count matched condition in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns number

    The matched count.

cyl_bessel_i

  • cyl_bessel_i(n: number, x: number): number

cyl_bessel_j

  • cyl_bessel_j(n: number, x: number): number

cyl_bessel_k

  • cyl_bessel_k(n: number, x: number): number

cyl_neumann

  • cyl_neumann(v: number, x: number): number

distance

  • distance<InputIterator>(first: InputIterator, last: InputIterator): number
  • Get distance between two iterators.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    Returns number

    The distance.

ellint_1

  • ellint_1(k: number, phi: number): number

ellint_2

  • ellint_2(k: number, phi: number): number

ellint_3

  • ellint_3(k: number, v: number, phi: number): number

empty

  • empty(source: Array<any> | IEmpty): boolean
  • Test whether a container is empty.

    Parameters

    • source: Array<any> | IEmpty

      Target container.

    Returns boolean

    Whether empty or not.

end

  • end<Container>(container: Container): IForwardContainer.IteratorType<Container>
  • Iterator to the end.

    Type parameters

    Parameters

    • container: Container

      Target container.

    Returns IForwardContainer.IteratorType<Container>

    Iterator to the end.

equal

  • equal<InputIterator1, InputIterator2>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2): boolean
  • equal<InputIterator1, InputIterator2>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, pred: BinaryPredicator<IPointer.ValueType<InputIterator1>, IPointer.ValueType<InputIterator2>>): boolean
  • Test whether two ranges are equal.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    Returns boolean

    Whether two ranges are equal.

  • Test whether two ranges are equal.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator2>, InputIterator2>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • pred: BinaryPredicator<IPointer.ValueType<InputIterator1>, IPointer.ValueType<InputIterator2>>

      A binary function predicates two arguments are equal.

    Returns boolean

    Whether two ranges are equal.

equal_range

  • equal_range<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, val: IPointer.ValueType<ForwardIterator>, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): Pair<ForwardIterator, ForwardIterator>
  • Get range of equal elements.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Input iterator of the first position.

    • last: ForwardIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<ForwardIterator>

      Value to search for.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns Pair<ForwardIterator, ForwardIterator>

    Pair of lower_bound and upper_bound.

equal_to

  • equal_to<T>(x: T, y: T): boolean
  • Test whether two arguments are equal.

    Type parameters

    • T

    Parameters

    • x: T

      The first argument to compare.

    • y: T

      The second argument to compare.

    Returns boolean

    Whether two arguments are equal or not.

expint

  • expint(x: number): number

fill

  • fill<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, val: IPointer.ValueType<ForwardIterator>): void
  • Fill range elements

    Type parameters

    • ForwardIterator: Writeonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Input iteartor of the first position.

    • last: ForwardIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<ForwardIterator>

      The value to fill.

    Returns void

    Output Iterator of the last position by advancing.

fill_n

  • fill_n<OutputIterator>(first: OutputIterator, n: number, val: IPointer.ValueType<OutputIterator>): OutputIterator
  • Fill n elements.

    Type parameters

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<OutputIterator>, OutputIterator>>

    Parameters

    • first: OutputIterator

      Input iteartor of the first position.

    • n: number

      Number of elements to fill.

    • val: IPointer.ValueType<OutputIterator>

      The value to fill.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

find

  • find<InputIterator>(first: InputIterator, last: InputIterator, val: IPointer.ValueType<InputIterator>): InputIterator
  • Find a value in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<InputIterator>

      The value to find.

    Returns InputIterator

    Iterator to the first element to equal_to the value.

find_end

  • find_end<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1
  • find_end<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, pred: BinaryPredicator<IPointer.ValueType<Iterator1>, IPointer.ValueType<Iterator2>>): Iterator1
  • Find the last sub range.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    • last2: Iterator2

      Input iterator of the last position of the 2nd range.

    Returns Iterator1

    Iterator to the first element of the last sub range.

  • Find the last sub range.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator2>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    • last2: Iterator2

      Input iterator of the last position of the 2nd range.

    • pred: BinaryPredicator<IPointer.ValueType<Iterator1>, IPointer.ValueType<Iterator2>>

      A binary function predicates two arguments are equal.

    Returns Iterator1

    Iterator to the first element of the last sub range.

find_first_of

  • find_first_of<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2): Iterator1
  • find_first_of<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, pred: BinaryPredicator<IPointer.ValueType<Iterator1>, IPointer.ValueType<Iterator2>>): Iterator1
  • Find the first sub range.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    • last2: Iterator2

      Input iterator of the last position of the 2nd range.

    Returns Iterator1

    Iterator to the first element of the first sub range.

  • Find the first sub range.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator2>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    • last2: Iterator2

      Input iterator of the last position of the 2nd range.

    • pred: BinaryPredicator<IPointer.ValueType<Iterator1>, IPointer.ValueType<Iterator2>>

      A binary function predicates two arguments are equal.

    Returns Iterator1

    Iterator to the first element of the first sub range.

find_if

  • find_if<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): InputIterator
  • Find a matched condition in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns InputIterator

    Iterator to the first element pred returns true.

find_if_not

  • find_if_not<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): InputIterator
  • Find a mismatched condition in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns InputIterator

    Iterator to the first element pred returns false.

for_each

  • for_each<InputIterator, Func>(first: InputIterator, last: InputIterator, fn: Func): Func
  • Apply a function to elements in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • Func: (val: IPointer.ValueType<InputIterator>) => any

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • fn: Func

      The function to apply.

    Returns Func

    The function fn itself.

for_each_n

  • for_each_n<InputIterator, Func>(first: InputIterator, n: number, fn: Func): InputIterator
  • Apply a function to elements in steps.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • Func: (val: IPointer.ValueType<InputIterator>) => any

    Parameters

    • first: InputIterator

      Input iteartor of the starting position.

    • n: number

      Steps to maximum advance.

    • fn: Func

      The function to apply.

    Returns InputIterator

    Iterator advanced from first for n steps.

front_inserter

gcd

  • gcd(x: number, y: number): number

generate

  • generate<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, gen: () => IPointer.ValueType<ForwardIterator>): void
  • Generate range elements.

    Type parameters

    • ForwardIterator: Writeonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iteartor of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • gen: () => IPointer.ValueType<ForwardIterator>

      The generator function.

        • (): IPointer.ValueType<ForwardIterator>
        • Returns IPointer.ValueType<ForwardIterator>

    Returns void

generate_n

  • generate_n<ForwardIterator>(first: ForwardIterator, n: number, gen: () => IPointer.ValueType<ForwardIterator>): ForwardIterator
  • Generate n elements.

    Type parameters

    • ForwardIterator: Writeonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iteartor of the first position.

    • n: number

      Number of elements to generate.

    • gen: () => IPointer.ValueType<ForwardIterator>

      The generator function.

        • (): IPointer.ValueType<ForwardIterator>
        • Returns IPointer.ValueType<ForwardIterator>

    Returns ForwardIterator

    Forward Iterator to the last position by advancing.

get_terminate

  • get_terminate(): (() => void) | undefined
  • Get terminate handler.

    Returns (() => void) | undefined

    The terminate handler.

get_uid

  • get_uid(obj: object | null | undefined): number
  • Get unique identifier.

    Parameters

    • obj: object | null | undefined

      Target object.

    Returns number

    The identifier number.

greater

  • greater<T>(x: T, y: T): boolean
  • Test whether x is greater than y.

    Type parameters

    • T

    Parameters

    • x: T

      The first argument to compare.

    • y: T

      The second argument to compare.

    Returns boolean

    Whether x is greater than y.

greater_equal

  • greater_equal<T>(x: T, y: T): boolean
  • Test whether x is greater than or equal to y.

    Type parameters

    • T

    Parameters

    • x: T

      The first argument to compare.

    • y: T

      The second argument to compare.

    Returns boolean

    Whether x is greater than or equal to y.

hash

  • hash(...itemList: any[]): number
  • Hash function.

    Parameters

    • Rest ...itemList: any[]

      The items to be hashed.

    Returns number

    The hash code.

hermite

  • hermite(n: number, x: number): number

includes

  • includes<InputIterator1, InputIterator2>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, comp?: Comparator<IPointer.ValueType<InputIterator1>>): boolean
  • Test whether two sorted ranges are in inclusion relationship.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • last2: InputIterator2

      Input iterator of the last position of the 2nd range.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether [first, last1) includes [first2, last2).

inplace_merge

  • inplace_merge<BidirectionalIterator>(first: BidirectionalIterator, middle: BidirectionalIterator, last: BidirectionalIterator, comp?: Comparator<IPointer.ValueType<BidirectionalIterator>>): void
  • Merge two sorted & consecutive ranges.

    Type parameters

    • BidirectionalIterator: General<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • middle: BidirectionalIterator

      Bidirectional iterator of the initial position of the 2nd range.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<BidirectionalIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

inserter

  • inserter<Container, Iterator>(container: Container, it: Iterator): InsertIterator<Container, Iterator>
  • Construct insert iterator.

    Type parameters

    • Container: IInsert<Iterator>

    • Iterator: IForwardIterator<IPointer.ValueType<Iterator>, Iterator>

    Parameters

    • container: Container

      Target container.

    • it: Iterator

      Iterator to the first insertion position.

    Returns InsertIterator<Container, Iterator>

    The insert iterator object.

is_heap

  • is_heap<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): boolean
  • Test whether a range is heap.

    Type parameters

    • RandomAccessIterator: Readonly<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Bi-directional iteartor of the first position.

    • last: RandomAccessIterator

      Bi-directional iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether the range is heap.

is_heap_until

  • is_heap_until<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): RandomAccessIterator
  • Find the first element not in heap order.

    Type parameters

    • RandomAccessIterator: Readonly<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Bi-directional iteartor of the first position.

    • last: RandomAccessIterator

      Bi-directional iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns RandomAccessIterator

    Iterator to the first element not in heap order.

is_node

  • is_node(): boolean
  • Test whether the code is running on NodeJS.

    Returns boolean

    Whether NodeJS or not.

is_partitioned

  • is_partitioned<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, pred: UnaryPredicator<IPointer.ValueType<ForwardIterator>>): boolean
  • Test whether a range is partitioned.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iterator of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<ForwardIterator>>

      An unary function predicates partition. Returns true, if an element belongs to the first section, otherwise false which means the element belongs to the second section.

    Returns boolean

    Whether the range is partition or not.

is_permutation

  • is_permutation<ForwardIterator1, ForwardIterator2>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, pred?: Comparator<IPointer.ValueType<ForwardIterator1>>): boolean
  • Test whether two ranges are in permutation relationship.

    Type parameters

    • ForwardIterator1: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator1>>

    • ForwardIterator2: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator2>>

    Parameters

    • first1: ForwardIterator1

      Forward iteartor of the first position of the 1st range.

    • last1: ForwardIterator1

      Forward iterator of the last position of the 1st range.

    • first2: ForwardIterator2

      Forward iterator of the first position of the 2nd range.

    • Default value pred: Comparator<IPointer.ValueType<ForwardIterator1>> = equal_to

      A binary function predicates two arguments are equal. Default is equal_to.

    Returns boolean

    Whether permutation or not.

is_sorted

  • is_sorted<InputIterator>(first: InputIterator, last: InputIterator, comp?: Comparator<IPointer.ValueType<InputIterator>>): boolean
  • Test whether a range is sorted.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether sorted or not.

is_sorted_until

  • is_sorted_until<InputIterator>(first: InputIterator, last: InputIterator, comp?: Comparator<IPointer.ValueType<InputIterator>>): InputIterator
  • Find the first unsorted element in range.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iterator of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns InputIterator

    Iterator to the first element who violates the order.

iter_swap

  • iter_swap<ForwardIterator1, ForwardIterator2>(x: ForwardIterator1, y: ForwardIterator2): void
  • Swap values of two iterators.

    Type parameters

    • ForwardIterator1: General<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator1>>

    • ForwardIterator2: General<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator2>>

    Parameters

    • x: ForwardIterator1

      Forward iterator to swap its value.

    • y: ForwardIterator2

      Forward iterator to swap its value.

    Returns void

laguerre

  • laguerre(n: number, x: number): number

lcm

  • lcm(x: number, y: number): number

legendre

  • legendre(n: number, x: number): number

less

  • less<T>(x: T, y: T): boolean
  • Test whether x is less than y.

    Type parameters

    • T

    Parameters

    • x: T

      The first argument to compare.

    • y: T

      The second argument to compare.

    Returns boolean

    Whether x is less than y.

less_equal

  • less_equal<T>(x: T, y: T): boolean
  • Test whether x is less than or equal to y.

    Type parameters

    • T

    Parameters

    • x: T

      The first argument to compare.

    • y: T

      The second argument to compare.

    Returns boolean

    Whether x is less than or equal to y.

lexicographical_compare

  • lexicographical_compare<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2, last2: Iterator2, comp?: BinaryPredicator<IPointer.ValueType<Iterator1>>): boolean
  • Compare lexicographically.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    • last2: Iterator2

      Input iterator of the last position of the 2nd range.

    • Default value comp: BinaryPredicator<IPointer.ValueType<Iterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether the 1st range precedes the 2nd.

lgamma

  • lgamma(x: number): number

lock

  • lock(...items: Pick<ILockable, "lock">[]): Promise<void>
  • Lock multiple mutexes.

    Parameters

    • Rest ...items: Pick<ILockable, "lock">[]

      Items to lock.

    Returns Promise<void>

lower_bound

  • lower_bound<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, val: IPointer.ValueType<ForwardIterator>, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): ForwardIterator
  • Get iterator to lower bound.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Input iterator of the first position.

    • last: ForwardIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<ForwardIterator>

      Value to search for.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns ForwardIterator

    Iterator to the first element equal or after the val.

make_heap

  • make_heap<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Make a heap.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iteartor of the first position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

make_pair

  • make_pair<First, Second>(first: First, second: Second): Pair<First, Second>
  • Create a Pair.

    Type parameters

    • First

    • Second

    Parameters

    • first: First

      The 1st element.

    • second: Second

      The 2nd element.

    Returns Pair<First, Second>

    A Pair object.

make_reverse_iterator

  • make_reverse_iterator<IteratorT, ReverseT>(it: IteratorT): ReverseT
  • Construct reverse iterator.

    Type parameters

    Parameters

    • it: IteratorT

      Target iterator that reversable.

    Returns ReverseT

    The reverse iterator object.

max

  • max<T>(items: T[], comp?: Comparator<T>): T
  • Get the maximum value.

    Type parameters

    • T

    Parameters

    • items: T[]

      Items to search through.

    • Default value comp: Comparator<T> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns T

    The maximum value.

max_element

  • max_element<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): ForwardIterator
  • Get the maximum element in range.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iterator of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns ForwardIterator

    Iterator to the maximum element.

merge

  • merge<InputIterator1, InputIterator2, OutputIterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, output: OutputIterator, comp?: Comparator<IPointer.ValueType<InputIterator1>>): OutputIterator
  • Merge two sorted ranges.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator1>, OutputIterator>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • last2: InputIterator2

      Input iterator of the last position of the 2nd range.

    • output: OutputIterator

      Output iterator of the first position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

min

  • min<T>(items: T[], comp?: Comparator<T>): T
  • Get the minium value.

    Type parameters

    • T

    Parameters

    • items: T[]

      Items to search through.

    • Default value comp: Comparator<T> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns T

    The minimum value.

min_element

  • min_element<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): ForwardIterator
  • Get the minimum element in range.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iterator of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns ForwardIterator

    Iterator to the minimum element.

minmax

  • minmax<T>(items: T[], comp: Comparator<T>): Pair<T, T>
  • Get the minimum & maximum values.

    Type parameters

    • T

    Parameters

    • items: T[]

      Items to search through.

    • comp: Comparator<T>

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns Pair<T, T>

    A Pair of minimum & maximum values.

minmax_element

  • minmax_element<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): Pair<ForwardIterator, ForwardIterator>
  • Get the minimum & maximum elements in range.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iterator of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns Pair<ForwardIterator, ForwardIterator>

    A Pair of iterators to the minimum & maximum elements.

mismatch

  • mismatch<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2): Pair<Iterator1, Iterator2>
  • mismatch<Iterator1, Iterator2>(first1: Iterator1, last1: Iterator1, first2: Iterator2, pred: BinaryPredicator<IPointer.ValueType<Iterator1>, IPointer.ValueType<Iterator2>>): Pair<Iterator1, Iterator2>
  • Find the first mistmached position between two ranges.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    Returns Pair<Iterator1, Iterator2>

    A Pair of mismatched positions.

  • Find the first mistmached position between two ranges.

    Type parameters

    • Iterator1: Readonly<IForwardIterator<IPointer.ValueType<Iterator1>, Iterator1>>

    • Iterator2: Readonly<IForwardIterator<IPointer.ValueType<Iterator2>, Iterator2>>

    Parameters

    • first1: Iterator1

      Input iteartor of the first position of the 1st range.

    • last1: Iterator1

      Input iterator of the last position of the 1st range.

    • first2: Iterator2

      Input iterator of the first position of the 2nd range.

    • pred: BinaryPredicator<IPointer.ValueType<Iterator1>, IPointer.ValueType<Iterator2>>

      A binary function predicates two arguments are equal.

    Returns Pair<Iterator1, Iterator2>

    A Pair of mismatched positions.

next

  • next<ForwardIterator>(it: ForwardIterator, n?: number): ForwardIterator
  • Get next iterator.

    Type parameters

    • ForwardIterator: IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>

    Parameters

    • it: ForwardIterator

      Iterator to move.

    • Default value n: number = 1

      Step to move next.

    Returns ForwardIterator

    Iterator moved to next n steps.

next_permutation

  • next_permutation<BidirectionalIterator>(first: BidirectionalIterator, last: BidirectionalIterator, comp?: Comparator<IPointer.ValueType<BidirectionalIterator>>): boolean
  • Transform to the next permutation.

    Type parameters

    • BidirectionalIterator: General<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<BidirectionalIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether the transformation was meaningful.

none_of

  • none_of<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): boolean
  • Test whether any element doesn't meet a specific condition.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      A function predicates the specific condition.

    Returns boolean

    Whether the pred doesn't return true for all elements.

not_equal_to

  • not_equal_to<T>(x: T, y: T): boolean
  • Test whether two arguments are not equal.

    Type parameters

    • T

    Parameters

    • x: T

      The first argument to compare.

    • y: T

      The second argument to compare.

    Returns boolean

    Returns true, if two arguments are not equal, otherwise false.

nth_element

  • nth_element<RandomAccessIterator>(first: RandomAccessIterator, nth: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Rearrange for the n'th element.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iterator of the first position.

    • nth: RandomAccessIterator

      Random access iterator the n'th position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

partial_sort

  • partial_sort<RandomAccessIterator>(first: RandomAccessIterator, middle: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Sort elements in range partially.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iterator of the first position.

    • middle: RandomAccessIterator

      Random access iterator of the middle position between [first, last). Elements only in [first, middle) are fully sorted.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

partial_sort_copy

  • partial_sort_copy<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output_first: OutputIterator, output_last: OutputIterator, comp?: Comparator<IPointer.ValueType<InputIterator>>): OutputIterator
  • Copy elements in range with partial sort.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output_first: OutputIterator

      Output iterator of the first position.

    • output_last: OutputIterator

      Output iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

partition

  • partition<BidirectionalIterator>(first: BidirectionalIterator, last: BidirectionalIterator, pred: UnaryPredicator<IPointer.ValueType<BidirectionalIterator>>): BidirectionalIterator
  • Partition a range into two sections.

    Type parameters

    • BidirectionalIterator: General<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<BidirectionalIterator>>

      An unary function predicates partition. Returns true, if an element belongs to the first section, otherwise false which means the element belongs to the second section.

    Returns BidirectionalIterator

    Iterator to the first element of the second section.

partition_copy

  • partition_copy<InputIterator, OutputIterator1, OutputIterator2>(first: InputIterator, last: InputIterator, output_true: OutputIterator1, output_false: OutputIterator2, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): Pair<OutputIterator1, OutputIterator2>
  • Partition a range into two outputs.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator1: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator1>>

    • OutputIterator2: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator2>>

    Parameters

    • first: InputIterator

      Bidirectional iterator of the first position.

    • last: InputIterator

      Bidirectional iterator of the last position.

    • output_true: OutputIterator1

      Output iterator to the first position for the first section.

    • output_false: OutputIterator2

      Output iterator to the first position for the second section.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      An unary function predicates partition. Returns true, if an element belongs to the first section, otherwise false which means the element belongs to the second section.

    Returns Pair<OutputIterator1, OutputIterator2>

    Iterator to the first element of the second section.

partition_point

  • partition_point<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, pred: UnaryPredicator<IPointer.ValueType<ForwardIterator>>): ForwardIterator
  • Get partition point.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iterator of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<ForwardIterator>>

      An unary function predicates partition. Returns true, if an element belongs to the first section, otherwise false which means the element belongs to the second section.

    Returns ForwardIterator

    Iterator to the first element of the second section.

pop_heap

  • pop_heap<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Pop an element from heap.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iteartor of the first position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

prev

  • prev<BidirectionalIterator>(it: BidirectionalIterator, n?: number): BidirectionalIterator
  • Get previous iterator.

    Type parameters

    • BidirectionalIterator: IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>

    Parameters

    • it: BidirectionalIterator

      Iterator to move.

    • Default value n: number = 1

      Step to move prev.

    Returns BidirectionalIterator

    An iterator moved to prev n steps.

prev_permutation

  • prev_permutation<BidirectionalIterator>(first: BidirectionalIterator, last: BidirectionalIterator, comp?: Comparator<IPointer.ValueType<BidirectionalIterator>>): boolean
  • Transform to the previous permutation.

    Type parameters

    • BidirectionalIterator: General<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<BidirectionalIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns boolean

    Whether the transformation was meaningful.

push_heap

  • push_heap<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Push an element into heap.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iteartor of the first position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

randint

  • randint(x: number, y: number): number
  • Generate random integer.

    Parameters

    • x: number

      Minimum value.

    • y: number

      Maximum value.

    Returns number

    A random integer between [x, y].

rbegin

  • rbegin<Container>(container: Container): IBidirectionalContainer.ReverseIteratorType<Container>
  • Get reverse iterator to the first element in reverse.

    Type parameters

    Parameters

    • container: Container

      Target container.

    Returns IBidirectionalContainer.ReverseIteratorType<Container>

    The reverse iterator to the first.

remove

  • remove<InputIterator>(first: InputIterator, last: InputIterator, val: IPointer.ValueType<InputIterator>): InputIterator
  • Remove specific value in range.

    Type parameters

    • InputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<InputIterator>

      The specific value to remove.

    Returns InputIterator

    Iterator tho the last element not removed.

remove_copy

  • remove_copy<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator, val: IPointer.ValueType<InputIterator>): OutputIterator
  • Copy range removing specific value.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the last position.

    • val: IPointer.ValueType<InputIterator>

      The condition predicates remove.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

remove_copy_if

  • remove_copy_if<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): OutputIterator
  • Copy range removing elements by a condition.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      An unary function predicates remove.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

remove_if

  • remove_if<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>): InputIterator
  • Remove elements in range by a condition.

    Type parameters

    • InputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      An unary function predicates remove.

    Returns InputIterator

    Iterator tho the last element not removed.

rend

  • rend<Container>(container: Container): IBidirectionalContainer.ReverseIteratorType<Container>
  • Get reverse iterator to the reverse end.

    Type parameters

    Parameters

    • container: Container

      Target container.

    Returns IBidirectionalContainer.ReverseIteratorType<Container>

    The reverse iterator to the end.

replace

  • replace<InputIterator>(first: InputIterator, last: InputIterator, old_val: IPointer.ValueType<InputIterator>, new_val: IPointer.ValueType<InputIterator>): void
  • Replace specific value in range.

    Type parameters

    • InputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • old_val: IPointer.ValueType<InputIterator>

      Specific value to change

    • new_val: IPointer.ValueType<InputIterator>

      Specific value to be changed.

    Returns void

replace_copy

  • replace_copy<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator, old_val: IPointer.ValueType<InputIterator>, new_val: IPointer.ValueType<InputIterator>): OutputIterator
  • Copy range replacing specific value.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the first position.

    • old_val: IPointer.ValueType<InputIterator>

      Specific value to change

    • new_val: IPointer.ValueType<InputIterator>

      Specific value to be changed.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

replace_copy_if

  • replace_copy_if<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, result: OutputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>, new_val: IPointer.ValueType<InputIterator>): OutputIterator
  • Copy range replacing specfic condition.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • result: OutputIterator
    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      An unary function predicates the change.

    • new_val: IPointer.ValueType<InputIterator>

      Specific value to be changed.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

replace_if

  • replace_if<InputIterator>(first: InputIterator, last: InputIterator, pred: UnaryPredicator<IPointer.ValueType<InputIterator>>, new_val: IPointer.ValueType<InputIterator>): void
  • Replace specific condition in range.

    Type parameters

    • InputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<InputIterator>>

      An unary function predicates the change.

    • new_val: IPointer.ValueType<InputIterator>

      Specific value to be changed.

    Returns void

reverse

  • reverse<BidirectionalIterator>(first: BidirectionalIterator, last: BidirectionalIterator): void
  • Reverse elements in range.

    Type parameters

    • BidirectionalIterator: General<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    Returns void

reverse_copy

  • reverse_copy<BidirectionalIterator, OutputIterator>(first: BidirectionalIterator, last: BidirectionalIterator, output: OutputIterator): OutputIterator
  • Copy reversed elements in range.

    Type parameters

    • BidirectionalIterator: Readonly<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<BidirectionalIterator>, OutputIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    • output: OutputIterator

      Output iterator of the first position.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

riemann_zeta

  • riemann_zeta(arg: number): number

rotate

  • rotate<InputIterator>(first: InputIterator, middle: InputIterator, last: InputIterator): InputIterator
  • Rotate elements in range.

    Type parameters

    • InputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • middle: InputIterator

      Input iteartor of the initial position of the right side.

    • last: InputIterator

      Input iteartor of the last position.

    Returns InputIterator

    Input iterator of the final position in the left side; middle.

rotate_copy

  • rotate_copy<ForwardIterator, OutputIterator>(first: ForwardIterator, middle: ForwardIterator, last: ForwardIterator, output: OutputIterator): OutputIterator
  • Copy rotated elements in range.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, OutputIterator>>

    Parameters

    • first: ForwardIterator

      Input iteartor of the first position.

    • middle: ForwardIterator

      Input iteartor of the initial position of the right side.

    • last: ForwardIterator

      Input iteartor of the last position.

    • output: OutputIterator

      Output iterator of the last position.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

sample

  • sample<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator, n: number): OutputIterator
  • Pick sample elements up.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the first position.

    • n: number

      Number of elements to pick up.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

search

  • search<ForwardIterator1, ForwardIterator2>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2): ForwardIterator1
  • search<ForwardIterator1, ForwardIterator2>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2, last2: ForwardIterator2, pred: BinaryPredicator<IPointer.ValueType<ForwardIterator1>, IPointer.ValueType<ForwardIterator2>>): ForwardIterator1
  • Search sub range.

    Type parameters

    • ForwardIterator1: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator1>>

    • ForwardIterator2: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator2>>

    Parameters

    • first1: ForwardIterator1

      Forward iteartor of the first position of the 1st range.

    • last1: ForwardIterator1

      Forward iterator of the last position of the 1st range.

    • first2: ForwardIterator2

      Forward iterator of the first position of the 2nd range.

    • last2: ForwardIterator2

      Forward iterator of the last position of the 2nd range.

    Returns ForwardIterator1

    Iterator to the first element of the sub range.

  • Search sub range.

    Type parameters

    • ForwardIterator1: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator1>>

    • ForwardIterator2: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator2>, ForwardIterator2>>

    Parameters

    • first1: ForwardIterator1

      Forward iteartor of the first position of the 1st range.

    • last1: ForwardIterator1

      Forward iterator of the last position of the 1st range.

    • first2: ForwardIterator2

      Forward iterator of the first position of the 2nd range.

    • last2: ForwardIterator2

      Forward iterator of the last position of the 2nd range.

    • pred: BinaryPredicator<IPointer.ValueType<ForwardIterator1>, IPointer.ValueType<ForwardIterator2>>

      A binary function predicates two arguments are equal.

    Returns ForwardIterator1

    Iterator to the first element of the sub range.

search_n

  • search_n<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, count: number, val: IPointer.ValueType<ForwardIterator>, pred?: BinaryPredicator<IPointer.ValueType<ForwardIterator>>): ForwardIterator
  • Search specific and repeated elements.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Forward iteartor of the first position.

    • last: ForwardIterator

      Forward iterator of the last position.

    • count: number

      Count to be repeated.

    • val: IPointer.ValueType<ForwardIterator>

      Value to search.

    • Default value pred: BinaryPredicator<IPointer.ValueType<ForwardIterator>> = equal_to

      A binary function predicates two arguments are equal. Default is equal_to.

    Returns ForwardIterator

    Iterator to the first element of the repetition.

set_difference

  • set_difference<InputIterator1, InputIterator2, OutputIterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, output: OutputIterator, comp?: Comparator<IPointer.ValueType<InputIterator1>>): OutputIterator
  • Combine two sorted ranges to difference relationship.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator1>, OutputIterator>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • last2: InputIterator2

      Input iterator of the last position of the 2nd range.

    • output: OutputIterator

      Output iterator of the first position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

set_intersection

  • set_intersection<InputIterator1, InputIterator2, OutputIterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, output: OutputIterator, comp?: Comparator<IPointer.ValueType<InputIterator1>>): OutputIterator
  • Combine two sorted ranges to intersection relationship.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator1>, OutputIterator>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • last2: InputIterator2

      Input iterator of the last position of the 2nd range.

    • output: OutputIterator

      Output iterator of the first position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

set_symmetric_difference

  • set_symmetric_difference<InputIterator1, InputIterator2, OutputIterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, output: OutputIterator, comp?: Comparator<IPointer.ValueType<InputIterator1>>): OutputIterator
  • Combine two sorted ranges to symmetric difference relationship.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator1>, OutputIterator>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • last2: InputIterator2

      Input iterator of the last position of the 2nd range.

    • output: OutputIterator

      Output iterator of the first position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

set_terminate

  • set_terminate(func: () => void): void
  • Set terminate handler.

    Parameters

    • func: () => void

      The terminate handler.

        • (): void
        • Returns void

    Returns void

set_union

  • set_union<InputIterator1, InputIterator2, OutputIterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, last2: InputIterator2, output: OutputIterator, comp?: Comparator<IPointer.ValueType<InputIterator1>>): OutputIterator
  • Combine two sorted ranges to union relationship.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator2>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator1>, OutputIterator>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • last2: InputIterator2

      Input iterator of the last position of the 2nd range.

    • output: OutputIterator

      Output iterator of the first position.

    • Default value comp: Comparator<IPointer.ValueType<InputIterator1>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

shuffle

  • shuffle<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator): void
  • Shuffle elements in range.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iteartor of the first position.

    • last: RandomAccessIterator

      Random access iteartor of the last position.

    Returns void

size

  • size(source: Array<any> | ISize): number
  • Get number of elements of a container.

    Parameters

    • source: Array<any> | ISize

      Target container.

    Returns number

    The number of elements in the container.

sleep_for

  • sleep_for(ms: number): Promise<void>
  • Sleep for time span.

    Parameters

    • ms: number

      The milliseconds to sleep.

    Returns Promise<void>

sleep_until

  • sleep_until(at: Date): Promise<void>
  • Sleep until time expiration.

    Parameters

    • at: Date

      The time point to wake up.

    Returns Promise<void>

sort

  • sort<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Sort elements in range.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iterator of the first position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

sort_heap

  • sort_heap<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Sort elements of a heap.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iteartor of the first position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

sph_bessel

  • sph_bessel(n: number, x: number): number

sph_neumann

  • sph_neumann(n: number, x: number): number

stable_partition

  • stable_partition<BidirectionalIterator>(first: BidirectionalIterator, last: BidirectionalIterator, pred: UnaryPredicator<IPointer.ValueType<BidirectionalIterator>>): BidirectionalIterator
  • Partition a range into two sections with stable ordering.

    Type parameters

    • BidirectionalIterator: General<IBidirectionalIterator<IPointer.ValueType<BidirectionalIterator>, BidirectionalIterator>>

    Parameters

    • first: BidirectionalIterator

      Bidirectional iterator of the first position.

    • last: BidirectionalIterator

      Bidirectional iterator of the last position.

    • pred: UnaryPredicator<IPointer.ValueType<BidirectionalIterator>>

      An unary function predicates partition. Returns true, if an element belongs to the first section, otherwise false which means the element belongs to the second section.

    Returns BidirectionalIterator

    Iterator to the first element of the second section.

stable_sort

  • stable_sort<RandomAccessIterator>(first: RandomAccessIterator, last: RandomAccessIterator, comp?: Comparator<IPointer.ValueType<RandomAccessIterator>>): void
  • Sort elements in range stably.

    Type parameters

    • RandomAccessIterator: General<IRandomAccessIterator<IPointer.ValueType<RandomAccessIterator>, RandomAccessIterator>>

    Parameters

    • first: RandomAccessIterator

      Random access iterator of the first position.

    • last: RandomAccessIterator

      Random access iterator of the last position.

    • Default value comp: Comparator<IPointer.ValueType<RandomAccessIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns void

swap_ranges

  • swap_ranges<ForwardIterator1, ForwardIterator2>(first1: ForwardIterator1, last1: ForwardIterator1, first2: ForwardIterator2): ForwardIterator2
  • Swap values of two ranges.

    Type parameters

    • ForwardIterator1: General<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator1>>

    • ForwardIterator2: General<IForwardIterator<IPointer.ValueType<ForwardIterator1>, ForwardIterator2>>

    Parameters

    • first1: ForwardIterator1

      Forward iteartor of the first position of the 1st range.

    • last1: ForwardIterator1

      Forward iterator of the last position of the 1st range.

    • first2: ForwardIterator2

      Forward iterator of the first position of the 2nd range.

    Returns ForwardIterator2

    Forward Iterator of the last position of the 2nd range by advancing.

terminate

  • terminate(): void

tgamma

  • tgamma(x: number): number

transform

  • transform<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, result: OutputIterator, op: UnaryOperatorInferrer<InputIterator, OutputIterator>): OutputIterator
  • transform<InputIterator1, InputIterator2, OutputIterator>(first1: InputIterator1, last1: InputIterator1, first2: InputIterator2, result: OutputIterator, op: BinaryOperatorInferrer<InputIterator1, InputIterator2, OutputIterator>): OutputIterator
  • Transform elements.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<OutputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • result: OutputIterator
    • op: UnaryOperatorInferrer<InputIterator, OutputIterator>

      Unary function determines the transform.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

  • Transform elements.

    Type parameters

    • InputIterator1: Readonly<IForwardIterator<IPointer.ValueType<InputIterator1>, InputIterator1>>

    • InputIterator2: Readonly<IForwardIterator<IPointer.ValueType<InputIterator2>, InputIterator2>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<OutputIterator>, OutputIterator>>

    Parameters

    • first1: InputIterator1

      Input iteartor of the first position of the 1st range.

    • last1: InputIterator1

      Input iterator of the last position of the 1st range.

    • first2: InputIterator2

      Input iterator of the first position of the 2nd range.

    • result: OutputIterator
    • op: BinaryOperatorInferrer<InputIterator1, InputIterator2, OutputIterator>

      Binary function determines the transform.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

try_lock

  • try_lock(...items: Pick<ILockable, "try_lock">[]): Promise<number>
  • Try lock mutexes.

    Parameters

    • Rest ...items: Pick<ILockable, "try_lock">[]

      Items to try lock.

    Returns Promise<number>

    Index of mutex who failed to lock. None of them're failed, then returns -1.

unique

  • unique<InputIterator>(first: InputIterator, last: InputIterator, pred?: BinaryPredicator<IPointer.ValueType<InputIterator>>): InputIterator
  • Remove duplicated elements in sorted range.

    Type parameters

    • InputIterator: General<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • Default value pred: BinaryPredicator<IPointer.ValueType<InputIterator>> = equal_to

      A binary function predicates two arguments are equal. Default is equal_to.

    Returns InputIterator

    Input iterator to the last element not removed.

unique_copy

  • unique_copy<InputIterator, OutputIterator>(first: InputIterator, last: InputIterator, output: OutputIterator, pred?: BinaryPredicator<IPointer.ValueType<InputIterator>>): OutputIterator
  • Copy elements in range without duplicates.

    Type parameters

    • InputIterator: Readonly<IForwardIterator<IPointer.ValueType<InputIterator>, InputIterator>>

    • OutputIterator: Writeonly<IForwardIterator<IPointer.ValueType<InputIterator>, OutputIterator>>

    Parameters

    • first: InputIterator

      Input iteartor of the first position.

    • last: InputIterator

      Input iterator of the last position.

    • output: OutputIterator

      Output iterator of the last position.

    • Default value pred: BinaryPredicator<IPointer.ValueType<InputIterator>> = equal_to

      A binary function predicates two arguments are equal. Default is equal_to.

    Returns OutputIterator

    Output Iterator of the last position by advancing.

upper_bound

  • upper_bound<ForwardIterator>(first: ForwardIterator, last: ForwardIterator, val: IPointer.ValueType<ForwardIterator>, comp?: Comparator<IPointer.ValueType<ForwardIterator>>): ForwardIterator
  • Get iterator to upper bound.

    Type parameters

    • ForwardIterator: Readonly<IForwardIterator<IPointer.ValueType<ForwardIterator>, ForwardIterator>>

    Parameters

    • first: ForwardIterator

      Input iterator of the first position.

    • last: ForwardIterator

      Input iterator of the last position.

    • val: IPointer.ValueType<ForwardIterator>

      Value to search for.

    • Default value comp: Comparator<IPointer.ValueType<ForwardIterator>> = less

      A binary function predicates x element would be placed before y. When returns true, then x precedes y. Default is less.

    Returns ForwardIterator

    Iterator to the first element after the key.

Generated using TypeDoc