7
7
D : Data + RawDataClone + Clone ,
8
8
D :: Elem : PartialEq + Debug ,
9
9
{
10
+ fn init ( & self , _data : & InterpData1D < D > ) -> Result < ( ) , ValidateError > {
11
+ Ok ( ( ) )
12
+ }
13
+
10
14
fn interpolate (
11
15
& self ,
12
16
data : & InterpData1D < D > ,
13
17
point : & [ D :: Elem ; 1 ] ,
14
18
) -> Result < D :: Elem , InterpolateError > ;
19
+
15
20
/// Does this type's [`Strategy1D::interpolate`] provision for extrapolation?
16
21
fn allow_extrapolate ( & self ) -> bool ;
17
22
}
@@ -23,13 +28,18 @@ where
23
28
D : Data + RawDataClone + Clone ,
24
29
D :: Elem : PartialEq + Debug ,
25
30
{
31
+ fn init ( & self , data : & InterpData1D < D > ) -> Result < ( ) , ValidateError > {
32
+ ( * * self ) . init ( data)
33
+ }
34
+
26
35
fn interpolate (
27
36
& self ,
28
37
data : & InterpData1D < D > ,
29
38
point : & [ D :: Elem ; 1 ] ,
30
39
) -> Result < D :: Elem , InterpolateError > {
31
40
( * * self ) . interpolate ( data, point)
32
41
}
42
+
33
43
fn allow_extrapolate ( & self ) -> bool {
34
44
( * * self ) . allow_extrapolate ( )
35
45
}
@@ -40,11 +50,16 @@ where
40
50
D : Data + RawDataClone + Clone ,
41
51
D :: Elem : PartialEq + Debug ,
42
52
{
53
+ fn init ( & self , _data : & InterpData2D < D > ) -> Result < ( ) , ValidateError > {
54
+ Ok ( ( ) )
55
+ }
56
+
43
57
fn interpolate (
44
58
& self ,
45
59
data : & InterpData2D < D > ,
46
60
point : & [ D :: Elem ; 2 ] ,
47
61
) -> Result < D :: Elem , InterpolateError > ;
62
+
48
63
/// Does this type's [`Strategy2D::interpolate`] provision for extrapolation?
49
64
fn allow_extrapolate ( & self ) -> bool ;
50
65
}
@@ -56,13 +71,18 @@ where
56
71
D : Data + RawDataClone + Clone ,
57
72
D :: Elem : PartialEq + Debug ,
58
73
{
74
+ fn init ( & self , data : & InterpData2D < D > ) -> Result < ( ) , ValidateError > {
75
+ ( * * self ) . init ( data)
76
+ }
77
+
59
78
fn interpolate (
60
79
& self ,
61
80
data : & InterpData2D < D > ,
62
81
point : & [ D :: Elem ; 2 ] ,
63
82
) -> Result < D :: Elem , InterpolateError > {
64
83
( * * self ) . interpolate ( data, point)
65
84
}
85
+
66
86
fn allow_extrapolate ( & self ) -> bool {
67
87
( * * self ) . allow_extrapolate ( )
68
88
}
@@ -73,11 +93,16 @@ where
73
93
D : Data + RawDataClone + Clone ,
74
94
D :: Elem : PartialEq + Debug ,
75
95
{
96
+ fn init ( & self , _data : & InterpData3D < D > ) -> Result < ( ) , ValidateError > {
97
+ Ok ( ( ) )
98
+ }
99
+
76
100
fn interpolate (
77
101
& self ,
78
102
data : & InterpData3D < D > ,
79
103
point : & [ D :: Elem ; 3 ] ,
80
104
) -> Result < D :: Elem , InterpolateError > ;
105
+
81
106
/// Does this type's [`Strategy3D::interpolate`] provision for extrapolation?
82
107
fn allow_extrapolate ( & self ) -> bool ;
83
108
}
@@ -89,13 +114,18 @@ where
89
114
D : Data + RawDataClone + Clone ,
90
115
D :: Elem : PartialEq + Debug ,
91
116
{
117
+ fn init ( & self , data : & InterpData3D < D > ) -> Result < ( ) , ValidateError > {
118
+ ( * * self ) . init ( data)
119
+ }
120
+
92
121
fn interpolate (
93
122
& self ,
94
123
data : & InterpData3D < D > ,
95
124
point : & [ D :: Elem ; 3 ] ,
96
125
) -> Result < D :: Elem , InterpolateError > {
97
126
( * * self ) . interpolate ( data, point)
98
127
}
128
+
99
129
fn allow_extrapolate ( & self ) -> bool {
100
130
( * * self ) . allow_extrapolate ( )
101
131
}
@@ -106,11 +136,16 @@ where
106
136
D : Data + RawDataClone + Clone ,
107
137
D :: Elem : PartialEq + Debug ,
108
138
{
139
+ fn init ( & self , _data : & InterpDataND < D > ) -> Result < ( ) , ValidateError > {
140
+ Ok ( ( ) )
141
+ }
142
+
109
143
fn interpolate (
110
144
& self ,
111
145
data : & InterpDataND < D > ,
112
146
point : & [ D :: Elem ] ,
113
147
) -> Result < D :: Elem , InterpolateError > ;
148
+
114
149
/// Does this type's [`StrategyND::interpolate`] provision for extrapolation?
115
150
fn allow_extrapolate ( & self ) -> bool ;
116
151
}
@@ -122,13 +157,18 @@ where
122
157
D : Data + RawDataClone + Clone ,
123
158
D :: Elem : PartialEq + Debug ,
124
159
{
160
+ fn init ( & self , data : & InterpDataND < D > ) -> Result < ( ) , ValidateError > {
161
+ ( * * self ) . init ( data)
162
+ }
163
+
125
164
fn interpolate (
126
165
& self ,
127
166
data : & InterpDataND < D > ,
128
167
point : & [ D :: Elem ] ,
129
168
) -> Result < D :: Elem , InterpolateError > {
130
169
( * * self ) . interpolate ( data, point)
131
170
}
171
+
132
172
fn allow_extrapolate ( & self ) -> bool {
133
173
( * * self ) . allow_extrapolate ( )
134
174
}
0 commit comments