iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x
SCIIndexCalculator
@interface SCIIndexCalculator : NSObject
Helper class which helps to map 2D index to 1D array and vice versa.
-
Gets the V/Y size whis is used for mapping.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger vSize;
Swift
var vSize: Int { get }
-
Gets the U/X size whis is used for mapping.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger uSize;
Swift
var uSize: Int { get }
-
Gets the Size of the underlying array.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger size;
Swift
var size: Int { get }
-
Creates new instance of
SCIIndexCalculator
class.Declaration
Objective-C
- (nonnull instancetype)initWithUSize:(NSInteger)uSize andVSize:(NSInteger)vSize;
Swift
init(uSize: Int, andVSize vSize: Int)
Parameters
uSize
The U/X size to use for mapping.
vSize
The V/Y size to use for mapping.
-
Maps 1D index to V/Y index in 2D.
Declaration
Objective-C
- (NSInteger)getVIndex:(NSInteger)index;
Swift
func getVIndex(at index: Int) -> Int
Parameters
index
The index to map.
Return Value
The V/Y index.
-
Maps 1D index to U/X index in 2D.
Declaration
Objective-C
- (NSInteger)getUIndex:(NSInteger)index;
Swift
func getUIndex(at index: Int) -> Int
Parameters
index
The index to map.
Return Value
The U/X index.
-
Maps 2D index to 1D index.
Declaration
Objective-C
- (NSInteger)getIndexAtUIndex:(NSInteger)uIndex andVIndex:(NSInteger)vIndex;
Swift
func getIndex(atU uIndex: Int, v vIndex: Int) -> Int
Parameters
uIndex
The U/X index to map.
vIndex
The V/Y index to map.
Return Value
The mapped 1D index.