47 inline constexpr
T pow(
const T base,
const std::size_t exponent)
49 return exponent == 0 ? 1 : base *
pow(base, exponent - 1);
69 const size_t idxSize = v.size();
70 std::vector<size_t> idx(idxSize);
71 for(
size_t i=0; i < idxSize; ++i) idx[i]=i;
85 std::sort(eigenVaSort.data(), eigenVaSort.data() + eigenVaSort.size());
94 const int eigenVeDim = eigenVe.cols();
97 for (
int k = 0; k < eigenVeDim; ++k)
98 output.segment(k * eigenVeDim, eigenVeDim) = eigenVe.col(k);
107 const T volume = (4./3.)*M_PI*
std::pow(NN.colwise().norm().maxCoeff(), 3);
117 return T(NN.cols())/(volume);
124 const int nbEigenCol = eigenVe.cols();
126 T smallestValue(std::numeric_limits<T>::max());
127 for(
int j = 0; j < nbEigenCol ; ++j)
129 if (eigenVa(j) < smallestValue)
132 smallestValue = eigenVa(j);
136 return eigenVe.col(smallestId);
143 const int size(v.size());
146 for (
int i = 0; i < size; ++i)