commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdigg...@apache.org
Subject cvs commit: jakarta-commons/math/src/test/org/apache/commons/math/linear RealMatrixImplTest.java
Date Sun, 23 Nov 2003 20:34:41 GMT
mdiggory    2003/11/23 12:34:41

  Modified:    math/src/test/org/apache/commons/math/linear
                        RealMatrixImplTest.java
  Log:
  Additional Matrix Multiply test
  
  Revision  Changes    Path
  1.8       +15 -2     jakarta-commons/math/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java
  
  Index: RealMatrixImplTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/math/src/test/org/apache/commons/math/linear/RealMatrixImplTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- RealMatrixImplTest.java	14 Nov 2003 22:22:19 -0000	1.7
  +++ RealMatrixImplTest.java	23 Nov 2003 20:34:41 -0000	1.8
  @@ -182,7 +182,7 @@
               ;
           }      
       }
  -    
  +   
       /** test multiply */
        public void testMultiply() {
           RealMatrixImpl m = new RealMatrixImpl(testData);
  @@ -206,6 +206,19 @@
               ;
           }      
       }   
  +    
  +    //Additional Test for RealMatrixImplTest.testMultiply
  +
  +    private double[][] d3 = new double[][] {{1,2,3,4},{5,6,7,8}};
  +    private double[][] d4 = new double[][] {{1},{2},{3},{4}};
  +    private double[][] d5 = new double[][] {{30},{70}};
  +     
  +    public void testMultiply2() { 
  +       RealMatrix m3 = new RealMatrixImpl(d3);   
  +       RealMatrix m4 = new RealMatrixImpl(d4);
  +       RealMatrix m5 = new RealMatrixImpl(d5);
  +       assertClose("m3*m4=m5", m3.multiply(m4), m5, entryTolerance);
  +   }  
           
       /** test isSingular */
       public void testIsSingular() {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message