forked from natikgadzhi/XNMaths
-
Notifications
You must be signed in to change notification settings - Fork 1
/
XNLinearSpline.h
51 lines (38 loc) · 991 Bytes
/
XNLinearSpline.h
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
43
44
45
46
47
48
49
50
51
//
// XNLinearSpline.h
// XNMaths
//
// LinearSpline class interface.
// LinearSpline element structure.
//
// Created by Нат Гаджибалаев on 20.11.09.
// Copyright 2009 Нат Гаджибалаев. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@class XNLineData;
#pragma mark -
#pragma mark XNLInearSplineElement structure.
//
// Struct that incapsulates interpolation element.
//
typedef struct {
CGFloat a,b;
} XNLinearSplineElement;
//
// Creates new XNLinearInterpolationElement.
//
XNLinearSplineElement XNMakeLinearSplineElement(CGFloat a, CGFloat b);
#pragma mark -
#pragma mark XNLinearSpline interface
@interface XNLinearSpline : NSObject {
NSArray *approximationPoints;
XNLinearSplineElement *interpolationElements;
}
+ (XNLinearSpline *) splineWithPoints: (NSArray *)aPoints;
//
// Initialize with approx points
- (XNLinearSpline *) initWithPoints: (NSArray *)aPoints;
#pragma mark -
#pragma mark Data
- (XNLineData*) lineData;
@end