iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

ISCIList

@protocol ISCIList <ISCIDoubleValuesProvider>

Defines the protocol for a high-performance array-backed list type.

  • Gets the start index in internal items array.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSInteger startIndex;

    Swift

    var startIndex: Int { get }
  • Defines the number of elements in this list.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger count;

    Swift

    var count: Int { get set }
  • Appends the specified element to the end of this list.

    Declaration

    Objective-C

    - (void)add:(id<ISCIComparable>)number;

    Swift

    func add(_ number: ISCIComparable!)

    Parameters

    number

    The element to be added.

  • Inserts the specified element at the specified position in this list.

    Declaration

    Objective-C

    - (void)insert:(id<ISCIComparable>)number at:(NSInteger)index;

    Swift

    func insert(_ number: ISCIComparable!, at index: Int)

    Parameters

    number

    The element to be inserted.

    index

    The index at which the specified element will be inserted.

  • Returns the element at the specified position in this list.

    Declaration

    Objective-C

    - (id<ISCIComparable>)valueAt:(NSInteger)index;

    Swift

    func value(at index: Int) -> ISCIComparable!

    Parameters

    index

    The index of the element to return.

    Return Value

    The element at the specified position in this list.

  • Replaces the element at the specified position in this list with the specified element.

    Declaration

    Objective-C

    - (void)setValue:(id<ISCIComparable>)value at:(NSInteger)index;

    Swift

    func setValue(_ value: ISCIComparable!, at index: Int)

    Parameters

    value

    The element to be stored at the specified position.

    index

    The index of the element to replace.

  • Returns the index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

    Declaration

    Objective-C

    - (NSInteger)indexOf:(id<ISCIComparable>)value;

    Swift

    func index(of value: ISCIComparable!) -> Int

    Parameters

    value

    The element to search for.

    Return Value

    The index of the first occurrence of the specified element in this list, or -1 if this list does not contain the element.

  • Removes the first occurrence of the specified element from this list, if it is present. If this list does not contain the element, it is unchanged.

    Declaration

    Objective-C

    - (void)remove:(id<ISCIComparable>)number;

    Swift

    func remove(_ number: ISCIComparable!)

    Parameters

    number

    The element to be removed from this list, if present.

  • Removes the element at the specified position in this list.

    Declaration

    Objective-C

    - (void)removeAt:(NSInteger)index;

    Swift

    func remove(at index: Int)

    Parameters

    index

    The index of the element to be removed.

  • Removes a range of items from list.

    Declaration

    Objective-C

    - (void)removeRangeAt:(NSInteger)index count:(NSInteger)count;

    Swift

    func removeRange(at index: Int, count: Int)

    Parameters

    index

    The start location to remove items at.

    count

    The amount of items to remove.

  • Removes all of the elements from this list. The list will be empty after this call returns.

    Declaration

    Objective-C

    - (void)clear;

    Swift

    func clear()
  • Returns YES if, and only if, the count is 0.

    Declaration

    Objective-C

    - (BOOL)isEmpty;

    Swift

    func isEmpty() -> Bool

    Return Value

    YES if count is 0, otherwise - NO.

  • Gets the minimum and maximum items of this list.

    Declaration

    Objective-C

    - (void)getMinMax:(id<ISCIRange>)range;

    Swift

    func getMinMax(_ range: ISCIRange!)

    Parameters

    range

    Range to hold minimum and maximum items.

  • Gets the minimum and maximum items in specified range of this list.

    Declaration

    Objective-C

    - (void)getMinMax:(NSInteger)startIndex
             endIndex:(NSInteger)endIndex
                range:(id<ISCIRange>)range;

    Swift

    func getMinMax(_ startIndex: Int, end endIndex: Int, range: ISCIRange!)

    Parameters

    startIndex

    Start index in this list to search min/max.

    endIndex

    End index in this list to search min/max.

    range

    Range to hold minimum and maximum items.

  • Gets the positive minimum and positive maximum items in specified range of this list.

    Declaration

    Objective-C

    - (void)getMinMaxPositive:(NSInteger)startIndex
                     endIndex:(NSInteger)endIndex
                        range:(id<ISCIRange>)range;

    Swift

    func getMinMaxPositive(_ startIndex: Int, end endIndex: Int, range: ISCIRange!)

    Parameters

    startIndex

    Start index in this list to search min/max.

    endIndex

    End index in this list to search min/max.

    range

    Range to hold minimum and maximum items.

  • Adds a range of items to the list.

    Declaration

    Objective-C

    - (void)addValues:(id<ISCIValues>)values;

    Swift

    func add(_ values: ISCIValues!)

    Parameters

    values

    The items to add.

  • Insert a range of items to the list at specified location.

    Declaration

    Objective-C

    - (void)insertValues:(id<ISCIValues>)values at:(NSInteger)index;

    Swift

    func insert(_ values: ISCIValues!, at index: Int)

    Parameters

    values

    The items to insert.

    index

    The location to insert items at.

  • Adds a range of items to the list.

    Declaration

    Objective-C

    - (void)addArray:(NSArray<id<ISCIComparable>> *)array;

    Swift

    func add(_ array: [ISCIComparable]!)

    Parameters

    array

    The items to add.

  • Insert a range of items to the list at specified location.

    Declaration

    Objective-C

    - (void)insertArray:(NSArray<id<ISCIComparable>> *)array at:(NSInteger)index;

    Swift

    func insert(_ array: [ISCIComparable]!, at index: Int)

    Parameters

    array

    The items to insert.

    index

    The location to insert items at.

  • Replaces items at specified location on provided items.

    Declaration

    Objective-C

    - (void)setArray:(NSArray<id<ISCIComparable>> *)array at:(NSInteger)index;

    Swift

    func setArray(_ array: [ISCIComparable]!, at index: Int)

    Parameters

    array

    The items to set.

    index

    The location to set items at.

  • Replaces items at specified location on provided items.

    Declaration

    Objective-C

    - (void)setValues:(id<ISCIValues>)values at:(NSInteger)index;

    Swift

    func setValues(_ values: ISCIValues!, at index: Int)

    Parameters

    values

    The items to set.

    index

    The location to set items at.

  • Returns an NSArray containing all of the elements in this list in propersequence.

    Declaration

    Objective-C

    - (NSArray<id<ISCIComparable>> *)toArray;

    Swift

    func toArray() -> [ISCIComparable]!
  • Checks if specified list contains NaN in specified range

    Declaration

    Objective-C

    - (BOOL)containsNaNFrom:(NSInteger)startIndex count:(NSInteger)count;

    Swift

    func containsNaN(from startIndex: Int, count: Int) -> Bool

    Parameters

    startIndex

    The start index of range to check

    count

    The amount of values to check in range

    Return Value

    True if contains NaN, otherwise false

  • Checks if specified list is sorted in ascending order in specified range

    Declaration

    Objective-C

    - (BOOL)isSortedAscendingFrom:(NSInteger)startIndex count:(NSInteger)count;

    Swift

    func isSortedAscending(from startIndex: Int, count: Int) -> Bool

    Parameters

    startIndex

    The start index of range to check

    count

    The amount of values to check in range

    Return Value

    True if sorted ascending, otherwise false

  • Calculates spacing for specified list in specified range

    Declaration

    Objective-C

    - (double)isEvenlySpacedFrom:(NSInteger)startIndex
                           count:(NSInteger)count
                         epsilon:(double)epsilon;

    Swift

    func isEvenlySpaced(from startIndex: Int, count: Int, epsilon: Double) -> Double

    Parameters

    startIndex

    The start index of range to check

    count

    The amount of values to check in range

    epsilon

    The presion during calculation

    Return Value

    If value is greater than 0 data then returned value is calculated spacing, otherwise data isn’t evenly spaced

  • Finds value with specified search mode in this list.

    Declaration

    Objective-C

    - (NSInteger)findIndexOf:(id<ISCIComparable>)value
                  searchMode:(SCISearchMode)searchMode
                    isSorted:(BOOL)isSorted;

    Swift

    func findIndex(of value: ISCIComparable!, searchMode: SCISearchMode, isSorted: Bool) -> Int

    Parameters

    value

    The value to find.

    searchMode

    The search mode.

    isSorted

    The flag which specified whether of not list is sorted in ascending order

    Return Value

    The index of item in list.