forked from core-plot/core-plot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCPTMutableNumericData.m
More file actions
42 lines (34 loc) · 1.21 KB
/
CPTMutableNumericData.m
File metadata and controls
42 lines (34 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#import "CPTMutableNumericData.h"
/** @brief An annotated NSMutableData type.
*
* CPTNumericData combines a mutable data buffer with information
* about the data (shape, data type, size, etc.).
* The data is assumed to be an array of one or more dimensions
* of a single type of numeric data. Each numeric value in the array,
* which can be more than one byte in size, is referred to as a @quote{sample}.
* The structure of this object is similar to the NumPy <code>ndarray</code>
* object.
**/
@implementation CPTMutableNumericData
/** @property void *mutableBytes
* @brief Returns a pointer to the data buffer’s contents.
**/
@dynamic mutableBytes;
/** @property NSArray *shape
* @brief The shape of the data buffer array. Set a new shape to change the size of the data buffer.
*
* The shape describes the dimensions of the sample array stored in
* the data buffer. Each entry in the shape array represents the
* size of the corresponding array dimension and should be an unsigned
* integer encoded in an instance of NSNumber.
**/
@dynamic shape;
#pragma mark -
#pragma mark Accessors
/// @cond
-(void *)mutableBytes
{
return [(NSMutableData *)self.data mutableBytes];
}
/// @endcond
@end