Use `DMatrix<double>` instead of `DMatrix<int>` for subdomains description in areal sampling
AlePalu opened this issue · 1 comments
The usage of DMatrix<int>
for the description of the subdomains (provided that a better and more space efficient choice would be DMatrix<bool>
, indeed the usage of int
is as bas as double
) under an areal setting is quite annoying, since forces the model concept to expose a different interface depending on the type of sampling. This causes a lot of duplicated code once we type erase the model concept, as we need to define (at least) two almost equal interfaces, which would differ only for the set_spatial_locations()
method.
DMatrix<double>
should be the standardized choice for any spatial sampling design. Therefore, just a single type erased wrapper is enought to define any spatial model concept.
Wrappers (or some preprocessing stage over the models layer) are responsable to check for the correctness of the provided data.