include/benchmark/all_libraries/nanoflann_test.hh
KDTreeVectorOfVectorsAdaptor(const size_t /* dimensionality */, const VectorOfVectorsType &mat, const int leaf_max_size = 10) : m_data(mat)
    {
        assert(mat.size() != 0 && mat[0].size() != 0);
        const size_t dims = mat[0].size();
        if (DIM>0 && static_cast<int>(dims) != DIM)
            throw std::runtime_error("Data set dimensionality does not match the 'DIM' template argument");
        index = new index_t( static_cast<int>(dims), *this /* adaptor */, nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size ) );
        index->buildIndex();
    }
/// Constructor: takes a const ref to the vector of vectors object with the data points
takes a const ref to the vector of vectors object with the data points
takes a const ref to the vector of vectors object with the data points
KDTreeVectorOfVectorsAdaptor(const size_t , const VectorOfVectorsType &mat, const int leaf_max_size = 10) : m_data(mat)
    {
        assert(mat.size() != 0 && mat[0].size() != 0);
        const size_t dims = mat[0].size();
        if (DIM>0 && static_cast<int>(dims) != DIM)
            throw std::runtime_error("Data set dimensionality does not match the 'DIM' template argument");
        index = new index_t( static_cast<int>(dims), *this , nanoflann::KDTreeSingleIndexAdaptorParams(leaf_max_size ) );
        index->buildIndex();
    }
KDTreeVectorOfVectorsAdaptor ( const size_t , const VectorOfVectorsType & mat , const int leaf_max_size = 10 ) : m_data ( mat ) { assert ( mat . size ( ) != 0 && mat [ 0 ] . size ( ) != 0 ) ; const size_t dims = mat [ 0 ] . size ( ) ; if ( DIM > 0 && static_cast < int > ( dims ) != DIM ) throw std :: runtime_error ( " " ) ; index = new index_t ( static_cast < int > ( dims ) , * this , nanoflann :: KDTreeSingleIndexAdaptorParams ( leaf_max_size ) ) ; index -> buildIndex ( ) ; }
Constructor: takes a const ref to the vector of vectors object with the data points
Constructor : takes a const ref to the vector of vectors object with the data points
/* dimensionality */ /* adaptor */