Class FractionSet

Collection of unique fractions.

Hierarchy

Constructors

  • Parameters

    • Optional values: null | readonly Fraction[]

    Returns FractionSet

  • Parameters

    • Optional iterable: null | Iterable<Fraction>

    Returns FractionSet

Properties

[toStringTag]: string
size: number

Returns

the number of (unique) elements in Set.

[species]: SetConstructor

Methods

  • Iterates over values in the set.

    Returns IterableIterator<Fraction>

  • Returns void

  • Removes the element associated to the value.

    Parameters

    Returns boolean

    A boolean asserting whether an element was successfully removed or not. FractionSet.prototype.has(value) will return false afterwards.

  • Returns an iterable of [v,v] pairs for every value v in the set.

    Returns IterableIterator<[Fraction, Fraction]>

  • Executes a provided function once per each value in the Set object, in insertion order.

    Parameters

    • callbackfn: ((value, value2, set) => void)
    • Optional thisArg: any

    Returns void

  • Check value membership.

    Parameters

    • value: Fraction

      Value to check for membership.

    Returns boolean

    A boolean asserting whether an element is present with the given value in the FractionSet object or not.

  • Despite its name, returns an iterable of the values in the set.

    Returns IterableIterator<Fraction>

  • Returns an iterable of values in the set.

    Returns IterableIterator<Fraction>