File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33use super :: convert;
44use super :: packed_array:: PackedArray ;
55use arrayvec:: ArrayVec ;
6+ use float_cmp:: approx_eq;
67use serde:: { Deserialize , Serialize } ;
78use std:: mem;
89use std:: ops:: Range ;
@@ -89,7 +90,7 @@ pub enum InterpMeth {
8990}
9091
9192/// TODO
92- #[ derive( Clone , Deserialize , PartialEq , Serialize ) ]
93+ #[ derive( Clone , Deserialize , Serialize ) ]
9394pub struct Interp {
9495 min : f64 ,
9596 max : f64 ,
@@ -100,6 +101,20 @@ pub struct Interp {
100101 interp_meth : InterpMeth ,
101102}
102103
104+ impl PartialEq for Interp {
105+ fn eq ( & self , other : & Self ) -> bool {
106+ self . nodes == other. nodes
107+ && self . order == other. order
108+ && self . reweight == other. reweight
109+ && self . map == other. map
110+ && self . interp_meth == other. interp_meth
111+ && approx_eq ! ( f64 , self . min, other. min, ulps = 1 )
112+ && approx_eq ! ( f64 , self . max, other. max, ulps = 1 )
113+ }
114+ }
115+
116+ impl Eq for Interp { }
117+
103118impl Interp {
104119 /// TODO
105120 ///
You can’t perform that action at this time.
0 commit comments