While you're using a template argument for the vector format, you have quite concrete requirements on the vector (i.e. it needs to implement dot and cross product), without having an example implementation in the repository.
This makes it hard to actually use it in such a generic way (you would for example expect to be able to use std::vector, std::valarray, double[3] for a real generic structure).
But your expected structure works quite fine with libeigen Eigen::Vector3f, if you change a few things:
- change
squared_norm to squaredNorm
- change
Vec3fType(inf) to Vec3fType(inf, inf, inf) everywhere.
Another thing is, that you might consider to make float a template, so data structures using doubles can be used as well (i.e. Eigen::Vector3d).
While you're using a template argument for the vector format, you have quite concrete requirements on the vector (i.e. it needs to implement dot and cross product), without having an example implementation in the repository.
This makes it hard to actually use it in such a generic way (you would for example expect to be able to use std::vector, std::valarray, double[3] for a real generic structure).
But your expected structure works quite fine with libeigen Eigen::Vector3f, if you change a few things:
squared_normtosquaredNormVec3fType(inf)toVec3fType(inf, inf, inf)everywhere.Another thing is, that you might consider to make
floata template, so data structures using doubles can be used as well (i.e.Eigen::Vector3d).