Basis parameters and equality
Closed this issue · 0 comments
rafaelrojasmiliani commented
In order to implement basis a singletons (#40) we should be ale to compare basis with a set of parameters that that identify each basis uniquely. This would allow to compare basis as.
class Basis {
protected:
Eigen::VectorXd parameters_;
Eigen::VectorXi parameters_int_;
...
public:
bool operator=(const Basis& _that){
return get_name() == _that.get_name() and
gsplines::tools::approximate_equal(paramters_, _that.parameters, 1.0e-4) and
(parameters_int_.array() == paramters_int.array()).all();
}
This will require to force the user to provide the basis parameters at the constructor.