A bitset-like class that represents a collection of indices, typically a subset of the rows in a Spotfire.Dxp.Data.IDataColumn or similar.

2.0

Hierarchy (view full)

Implements

Methods

  • Casts this object to the specified type. Throws error on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns T1

  • Serves as the default hash function.

    Returns number

    A hash code for the current object.

  • Returns a string that represents the current object.

    Returns string

    A string that represents the current object.

  • Casts this object to the specified type. Returns null on failure.

    Type Parameters

    • T1

      The target type of the cast.

    • T2

      The type of the object to cast.

    Parameters

    Returns null | T1

  • Returns Iterator<number, any, undefined>

  • Determines whether the specified object instances are considered equal.

    Parameters

    • objA: any

      The first object to compare.

    • objB: any

      The second object to compare.

    Returns boolean

    true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

Default capability

  • Creates an empty IndexSet.

    Returns IndexSet

    2.0

  • Creates an IndexSet as a copy of another IndexSet.

    Parameters

    • that: IndexSet

      The IndexSet to be copied.

    Returns IndexSet

    2.0

  • Creates an IndexSet with the specified capacity.

    Parameters

    • capacity: number | Int32

      The maximum capacity.

    • filled: boolean | Boolean

      If true, all indices will initially be marked as present.

    Returns IndexSet

    2.0

  • Creates an IndexSet with specified capacity and initial content.

    Parameters

    Returns IndexSet

    2.0

Item: PropertyGet<number | Int32, boolean> & PropertySet<number | Int32, boolean | Boolean>

Indexer. Returns a bool indicating if the index is a member of the set.

2.0

  • get Capacity(): number
  • Controls the total number of indexes that the IndexSet can hold (numbered 0 to Capacity-1) Setting capacity will clear the IndexSet.

    Returns number

    2.0

  • set Capacity(value): void
  • Parameters

    • value: number

    Returns void

  • get Count(): number
  • Number of indexes currently in the set.

    Returns number

    2.0

  • get First(): number
  • Gets the first index in the IndexSet.

    Returns number

    2.0

  • get IsEmpty(): boolean
  • True if the set has no indexes (Count == 0).

    Returns boolean

    2.0

  • get IsFull(): boolean
  • True if the all indexes are in the set (Count == Capacity).

    Returns boolean

    2.0

  • get IsReadOnly(): boolean
  • Tells if this IndexSet is read-only.

    Returns boolean

    2.0

  • get Last(): number
  • Gets the last index in the IndexSet.

    Returns number

    2.0

  • Adds the index to the set. If the index is already in the set, nothing is changed.

    Parameters

    • index: number | Int32

      Index

    Returns void

    2.0

  • Adds the specified indexes to the set.

    Parameters

    Returns void

    2.0

  • Adds a range of indexes to the set.

    Parameters

    • startIndex: number | Int32

      First index in the range

    • count: number | Int32

      Number of indexes in the range

    Returns void

    2.0

  • Performs a logical AND between this and that IndexSet.

    Note: the method changes the internal state of this IndexSet

    Parameters

    Returns IndexSet

    This modified IndexSet

    2.0

  • Returns this if read-only, otherwise a read-only clone.

    Returns IndexSet

    2.0

  • Returns a clone if this is read-only, otherwise this.

    Returns IndexSet

    2.0

  • Copies the content of the specified IndexSet into this one.

    Parameters

    • that: IndexSet

      The IndexSet to assign from

    Returns IndexSet

    This modified IndexSet

    2.0

  • Assigns the indexes from the specified array of indexes encoded as bits. The length of the bits array must be (capacity + 31)/32. Bits outside of capacity in the last array element are ignored.

    Parameters

    Returns IndexSet

    This modified IndexSet

    2.0

  • Copies the complement of the specified IndexSet into this one. In other words, this IndexSet will contain the indexes NOT in that IndexSet.

    Parameters

    • that: IndexSet

      The IndexSet to assign from

    Returns IndexSet

    This modified IndexSet

    2.0

  • Removes all indexes from the set.

    Returns IndexSet

    This modified IndexSet

    2.0

  • Creates a writable copy of this IndexSet.

    Returns IndexSet

    2.0

  • Determines whether this IndexSet contains all indexes of that IndexSet.

    Parameters

    • that: IndexSet

      The IndexSet to test against

    Returns boolean

    true is that set is a sub set of this set; otherwise false.

    2.0

  • Copies the indexes in the set to the array starting at the offset.

    Parameters

    Returns void

    2.0

  • Deletes a range of index positions. Existing indexes from startIndex+count and above are moved down.

    Parameters

    • startIndex: number | Int32

      First index position to be deleted

    • count: number | Int32

      Number of index positions

    Returns void

    2.0

  • Determines whether the specified object is equal to the current object.

    Parameters

    • obj: any

      The object to compare with the current object.

    Returns boolean

    true if the specified object is equal to the current object; otherwise, false.

  • Tests if this IndexSet and that IndexSet have the same Capacity and contain exactly the same indexes.

    Parameters

    • that: IndexSet

      The IndexSet to compare against

    Returns boolean

    True if the sets are equal

    2.0

  • Adds all indexes (as defined by Capacity) to the set.

    Returns IndexSet

    This modified IndexSet

    2.0

  • Fills the specified array with the indexes encoded as bits. The length of the bits array must be (Capacity + 31)/32.

    Parameters

    Returns void

    2.0

  • Gets the index after the specified one.

    Parameters

    • index: number | Int32

      The index.

    Returns number

    Next index, or -1.

    2.0

  • Gets the index before the specified one.

    Parameters

    • index: number | Int32

      The index.

    Returns number

    Previous index, or -1.

    2.0

  • Gets the number of indexes in a subset defined by the startIndex and endIndex arguments.

    Parameters

    • startIndex: number | Int32

      Start index in subset.

    • endIndex: number | Int32

      End index in subset.

    Returns number

    Number of indexes in subset.

    2.0

  • Returns a bool indicating if the index is a member of the set.

    Parameters

    • index: number | Int32

      Index

    Returns boolean

    True if the index is a member of the set

    2.0

  • Makes room for more indexes. Existing indexes from startIndex and above are moved up.

    Parameters

    • startIndex: number | Int32

      First new index position

    • count: number | Int32

      Number of new index positions

    • add: boolean | Boolean

      Add the new indexes to the set

    Returns void

    2.0

  • Determines whether this and that IndexSet have any indexes in common.

    Parameters

    • that: IndexSet

      The IndexSet to test against

    Returns boolean

    true is the sets intersect; otherwise false.

    2.0

  • Inverts the set. Any index that was included in the set will be excluded and vice versa.

    Note: the method changes the internal state of this IndexSet

    Returns IndexSet

    This modified IndexSet

    2.0

  • Gets the Nth smallest index. Caution: This method is slow (linear time), so you must ensure that your algorithm (or the one using your algorithm) never calls this method many times, which could result in quadratic time.

    Parameters

    • indexOrdinalNumber: number | Int32

      Index ordinal number. The valid range is 1 to Count.

    Returns number

    The index with the specified ordinal number.

    2.0

  • Performs a logical OR between this and that IndexSet.

    Note: the method changes the internal state of this IndexSet

    Parameters

    Returns IndexSet

    This modified IndexSet

    2.0

  • Removes the index from the set. If the index is not in the set, nothing is changed.

    Parameters

    • index: number | Int32

      Index

    Returns void

    2.0

  • Removes the specified indexes from the set.

    Parameters

    Returns void

    2.0

  • Removes a range of indexes from the set.

    Parameters

    • startIndex: number | Int32

      First index in the range

    • count: number | Int32

      Number of indexes in the range

    Returns void

    2.0

  • Sets this IndexSet to read-only.

    Returns IndexSet

    2.0

  • Subtracts that IndexSet from this one. In other words, the indexes in that IndexSet are removed from this.

    Note: the method changes the internal state of this IndexSet

    Parameters

    Returns IndexSet

    This modified IndexSet

    2.0

  • Performs a logical XOR between this and that IndexSet.

    Note: the method changes the internal state of this IndexSet

    Parameters

    Returns IndexSet

    This modified IndexSet

    2.0

  • Returns a new IndexSet that is a logical AND between two IndexSet.

    Parameters

    Returns IndexSet

    A new IndexSet

    2.0

  • Returns a new IndexSet that is the complement of the specified source set. Any index that is included in the source set will be excluded and vice versa.

    Parameters

    Returns IndexSet

    A new IndexSet

    2.0

  • Returns a new IndexSet that is a logical OR between two IndexSet.

    Parameters

    Returns IndexSet

    A new IndexSet

    2.0

  • Returns a new IndexSet that is a subtraction between two IndexSet. In other words, the new IndexSet is a copy of set1 without the indexes in set2.

    Parameters

    Returns IndexSet

    A new IndexSet

    2.0

  • Returns a new IndexSet that is a logical XOR between two IndexSet.

    Parameters

    Returns IndexSet

    A new IndexSet

    2.0