You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2009/06/28 23:48:16 UTC

svn commit: r789156 - /commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java

Author: luc
Date: Sun Jun 28 21:48:15 2009
New Revision: 789156

URL: http://svn.apache.org/viewvc?rev=789156&view=rev
Log:
be more precise on return type, we really return a Array2DRowRealMatrix,
so tell it in case some callers can use this information for optimization
(which is the case for Nordsieck transformers, they will be able to use
customized loops on matrix data for the sake of numerical accuracy)

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java?rev=789156&r1=789155&r2=789156&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java (original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/linear/MatrixUtils.java Sun Jun 28 21:48:15 2009
@@ -660,7 +660,7 @@
      * @param m matrix to convert
      * @return converted matrix
      */
-    public static RealMatrix fractionMatrixToRealMatrix(final FieldMatrix<Fraction> m) {
+    public static Array2DRowRealMatrix fractionMatrixToRealMatrix(final FieldMatrix<Fraction> m) {
         final FractionMatrixConverter converter = new FractionMatrixConverter();
         m.walkInOptimizedOrder(converter);
         return converter.getConvertedMatrix();
@@ -693,7 +693,7 @@
         /** Get the converted matrix.
          * @return converted matrix
          */
-        RealMatrix getConvertedMatrix() {
+        Array2DRowRealMatrix getConvertedMatrix() {
             return new Array2DRowRealMatrix(data, false);
         }
 
@@ -704,7 +704,7 @@
      * @param m matrix to convert
      * @return converted matrix
      */
-    public static RealMatrix bigFractionMatrixToRealMatrix(final FieldMatrix<BigFraction> m) {
+    public static Array2DRowRealMatrix bigFractionMatrixToRealMatrix(final FieldMatrix<BigFraction> m) {
         final BigFractionMatrixConverter converter = new BigFractionMatrixConverter();
         m.walkInOptimizedOrder(converter);
         return converter.getConvertedMatrix();
@@ -737,7 +737,7 @@
         /** Get the converted matrix.
          * @return converted matrix
          */
-        RealMatrix getConvertedMatrix() {
+        Array2DRowRealMatrix getConvertedMatrix() {
             return new Array2DRowRealMatrix(data, false);
         }