Searched refs:srcMatrix (Results 1 – 1 of 1) sorted by relevance
40 Matrix<T> random_sample(Matrix<T>& srcMatrix, long size, bool remove = false)42 Matrix<T> newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols);46 long r = rand_int((int)(srcMatrix.rows-i));48 src = srcMatrix[r];49 std::copy(src, src+srcMatrix.cols, dest);51 src = srcMatrix[srcMatrix.rows-i-1];52 dest = srcMatrix[r];53 std::copy(src, src+srcMatrix.cols, dest);57 srcMatrix.rows -= size;63 Matrix<T> random_sample(const Matrix<T>& srcMatrix, size_t size) in random_sample() argument[all …]