
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;
-
Gets the U/X size whis is used for mapping.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger uSize;
-
Gets the Size of the underlying array.
Declaration
Objective-C
@property (nonatomic, readonly) NSInteger size;
-
Creates new instance of
SCIIndexCalculator
class.Declaration
Objective-C
- (nonnull instancetype)initWithUSize:(NSInteger)uSize andVSize:(NSInteger)vSize;
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;
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;
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;
Parameters
uIndex
The U/X index to map.
vIndex
The V/Y index to map.
Return Value
The mapped 1D index.