From 98902f7fd28b53c34e71aad2a60c153c68b4d4b7 Mon Sep 17 00:00:00 2001 From: cloudygoose Date: Wed, 3 Jun 2015 18:39:16 +0800 Subject: doc change for matrix --- doc/nerv_matrix.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'doc/nerv_matrix.md') diff --git a/doc/nerv_matrix.md b/doc/nerv_matrix.md index 2edf691..2cef099 100644 --- a/doc/nerv_matrix.md +++ b/doc/nerv_matrix.md @@ -88,4 +88,14 @@ Treating each row of `a` as speech feature, and do a feature expansion. The `sel * __void Matrix.rearrange_frm(Matrix self, Matrix a, int step)__ Rearrange `a` according to its feature dimension. The `step` is the length of context. So, `self[i][j]` will be assigned `a[i][j / step + (j % step) * (a.ncol / step)]`. `a` and `self` should be of the same size and `step` should be divisible by `a.ncol`. * __void Matrix.scale_row(Matrix self, Matrix scale)__ -Scale each column of `self` according to a vector `scale`. `scale` should be of size `1 * self.ncol`. \ No newline at end of file +Scale each column of `self` according to a vector `scale`. `scale` should be of size `1 * self.ncol`. +* __Matrix Matrix.\_\_add\_\_(Matrix ma, Matrix mb)__ +Returns a new __Matrix__ which stores the result of `ma+mb`. +* __Matrix Matrix.\_\_sub\_\_(Matrix ma, Matrix mb)__ +Returns a new __Matrix__ which stores the result of `ma-mb`. +* __Matrix Matrix.\_\_mul\_\_(Matrix ma, Matrix mb)__ +Returns a new __Matrix__ which stores the result of `ma*mb`. +* __CuMatrix CuMatrix.new_from_host(MMatrix m)__ +Return a new __CuMatrix__ which is a copy of `m`. +* __MMatrix CuMatrix.new_to_host(CuMatrix self)__ +Return a new __MMatrix__ which is a copy of `self`. \ No newline at end of file -- cgit v1.2.3