From e0fa1a48cb9f91bfcfc60b732b6f137a7a2071ba Mon Sep 17 00:00:00 2001 From: txh18 Date: Wed, 28 Oct 2015 16:29:29 +0800 Subject: changed copy_rows_fromd_by_idx a bit to make it clearer --- nerv/doc/nerv_matrix.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nerv/doc/nerv_matrix.md') diff --git a/nerv/doc/nerv_matrix.md b/nerv/doc/nerv_matrix.md index b915dee..dfd843d 100644 --- a/nerv/doc/nerv_matrix.md +++ b/nerv/doc/nerv_matrix.md @@ -63,10 +63,10 @@ Copy the content of a __CuMatrix__ `a` to __Matrix__ `self`, they should be of t Copy the content of the __Matrix__ `self` to a __MMatrix__ `a`. * __void Matrix.copy_tod(Matrix self, CuMatrix a)__ Copy the content of the __Matrix__ `self` to a __CuMatrix__ `a`. -* __void Matrix.copy_rows_fromh_by_idx(Matrix self, MMatrix ma, MMatrixInt idx)__ -`idx` should be a row vector. This function copy the rows of `ma` to `self` according to `idx`, in other words, it assigns `ma[idx[i]]` to `self[i]`. -* __void Matrix.copy_rows_fromd_by_idx(Matrix self, CuMatrix b, CuMatrix idx)__ -`idx` needs to a row vector matrix, it stacks the rows of index `idx` of the __CuMatrix__ `b` and copies to `self`. +* __void Matrix.copy_rows_fromh_by_idx(Matrix self, MMatrix ma, MMatrixInt idx, int idx_begin)__ +`idx` should be a row vector. This function copy the rows of `ma` to `self` according to `idx`, in other words, it assigns `ma[idx[i+idx_begin]]` to `self[i]`. +* __void Matrix.copy_rows_fromd_by_idx(Matrix self, Matrix b, Matrix idx, int idx_begin)__ +`idx` needs to a row vector matrix, it stacks the rows of index `idx` of the __CuMatrix__ `b` and copies to `self`. `idx_begin` is used as an offset in the `idx` index array. * __void Matrix.update_select_rows(Matrix self, Matrix err, Matrix idx, double alpha, double beta)__ Update selected rows of `self`, i.e. `self[idx[i]] = self[idx[i]] * (1 - beta * alpha) + alpha * err[i]`. * __void Matrix.add(Matrix self, Matrix ma, Matrix mb, Element_type alpha, Element_type beta)__ -- cgit v1.2.3