#include "randperm.h" #include "colon.h" #include template IGL_INLINE void igl::randperm( const int n, Eigen::PlainObjectBase & I) { Eigen::VectorXi II; igl::colon(0,1,n-1,II); I = II; std::random_shuffle(I.data(),I.data()+n); } template IGL_INLINE Eigen::PlainObjectBase igl::randperm( const int n) { Eigen::PlainObjectBase I; randperm(n,I); return I; } #ifndef IGL_HEADER_ONLY // Explicit template specialization template void igl::randperm >(int, Eigen::PlainObjectBase >&); #endif