diff options
author | Karl Berry <karl@freefriends.org> | 2009-06-22 00:15:48 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-06-22 00:15:48 +0000 |
commit | ac6cde038884e924c511025d370671f7adf669c6 (patch) | |
tree | 1d233dcb20de06b39f78fc0e1db0c00eeb23b0a1 /Master/texmf/asymptote/math.asy | |
parent | 8542b3da905deccc50b1bd6d21c7474a29286b3f (diff) |
asymptote 1.77 install
git-svn-id: svn://tug.org/texlive/trunk@13866 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf/asymptote/math.asy')
-rw-r--r-- | Master/texmf/asymptote/math.asy | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/Master/texmf/asymptote/math.asy b/Master/texmf/asymptote/math.asy index f204f746349..85d41d86d07 100644 --- a/Master/texmf/asymptote/math.asy +++ b/Master/texmf/asymptote/math.asy @@ -148,7 +148,7 @@ real[][] zero(int n, int m) return M; } -real[][] operator + (real[][] a, real[][] b) +real[][] operator +(real[][] a, real[][] b) { int n=a.length; real[][] m=new real[n][]; @@ -157,7 +157,7 @@ real[][] operator + (real[][] a, real[][] b) return m; } -real[][] operator - (real[][] a, real[][] b) +real[][] operator -(real[][] a, real[][] b) { int n=a.length; real[][] m=new real[n][]; @@ -166,26 +166,7 @@ real[][] operator - (real[][] a, real[][] b) return m; } -private string incommensurate= - "Multiplication of incommensurate matrices is undefined"; - -real[] operator * (real[] b, real[][] a) -{ - int nb=b.length; - if(nb != a.length) - abort(incommensurate); - int na0=a[0].length; - real[] m=new real[na0]; - for(int j=0; j < na0; ++j) { - real sum; - for(int k=0; k < nb; ++k) - sum += b[k]*a[k][j]; - m[j]=sum; - } - return m; -} - -real[][] operator * (real[][] a, real b) +real[][] operator *(real[][] a, real b) { int n=a.length; real[][] m=new real[n][]; @@ -194,12 +175,12 @@ real[][] operator * (real[][] a, real b) return m; } -real[][] operator * (real b, real[][] a) +real[][] operator *(real b, real[][] a) { return a*b; } -real[][] operator / (real[][] a, real b) +real[][] operator /(real[][] a, real b) { return a*(1/b); } |