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: (any ISCIComparable)!)Parameters
numberThe 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: (any ISCIComparable)!, at index: Int)Parameters
numberThe element to be inserted.
indexThe 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) -> (any ISCIComparable)!Parameters
indexThe 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: (any ISCIComparable)!, at index: Int)Parameters
valueThe element to be stored at the specified position.
indexThe 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: (any ISCIComparable)!) -> IntParameters
valueThe 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: (any ISCIComparable)!)Parameters
numberThe 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
indexThe 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
indexThe start location to remove items at.
countThe 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() -> BoolReturn Value
YES if count is 0, otherwise - NO.
-
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: (any ISCIRange)!)Parameters
startIndexStart index in this list to search min/max.
endIndexEnd index in this list to search min/max.
rangeRange 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: (any ISCIRange)!)Parameters
startIndexStart index in this list to search min/max.
endIndexEnd index in this list to search min/max.
rangeRange 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: (any ISCIValues)!)Parameters
valuesThe 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: (any ISCIValues)!, at index: Int)Parameters
valuesThe items to insert.
indexThe 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: [any ISCIComparable]!)Parameters
arrayThe 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: [any ISCIComparable]!, at index: Int)Parameters
arrayThe items to insert.
indexThe 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: [any ISCIComparable]!, at index: Int)Parameters
arrayThe items to set.
indexThe 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: (any ISCIValues)!, at index: Int)Parameters
valuesThe items to set.
indexThe location to set items at.
-
Returns an
NSArraycontaining all of the elements in this list in propersequence.Declaration
Objective-C
- (NSArray<id<ISCIComparable>> *)toArray;Swift
func toArray() -> [any 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) -> BoolParameters
startIndexThe start index of range to check
countThe 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) -> BoolParameters
startIndexThe start index of range to check
countThe 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) -> DoubleParameters
startIndexThe start index of range to check
countThe amount of values to check in range
epsilonThe 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: (any ISCIComparable)!, searchMode: SCISearchMode, isSorted: Bool) -> IntParameters
valueThe value to find.
searchModeThe search mode.
isSortedThe flag which specified whether of not list is sorted in ascending order
Return Value
The index of item in list.
View on GitHub