From b5395fd8029116244913cda6158efc6af517458f Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Sun, 28 Jun 2009 21:48:15 +0000 Subject: [PATCH] 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) git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@789156 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/commons/math/linear/MatrixUtils.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/commons/math/linear/MatrixUtils.java b/src/java/org/apache/commons/math/linear/MatrixUtils.java index 942badc2f..efc99b74a 100644 --- a/src/java/org/apache/commons/math/linear/MatrixUtils.java +++ b/src/java/org/apache/commons/math/linear/MatrixUtils.java @@ -660,7 +660,7 @@ public class MatrixUtils { * @param m matrix to convert * @return converted matrix */ - public static RealMatrix fractionMatrixToRealMatrix(final FieldMatrix m) { + public static Array2DRowRealMatrix fractionMatrixToRealMatrix(final FieldMatrix m) { final FractionMatrixConverter converter = new FractionMatrixConverter(); m.walkInOptimizedOrder(converter); return converter.getConvertedMatrix(); @@ -693,7 +693,7 @@ public class MatrixUtils { /** Get the converted matrix. * @return converted matrix */ - RealMatrix getConvertedMatrix() { + Array2DRowRealMatrix getConvertedMatrix() { return new Array2DRowRealMatrix(data, false); } @@ -704,7 +704,7 @@ public class MatrixUtils { * @param m matrix to convert * @return converted matrix */ - public static RealMatrix bigFractionMatrixToRealMatrix(final FieldMatrix m) { + public static Array2DRowRealMatrix bigFractionMatrixToRealMatrix(final FieldMatrix m) { final BigFractionMatrixConverter converter = new BigFractionMatrixConverter(); m.walkInOptimizedOrder(converter); return converter.getConvertedMatrix(); @@ -737,7 +737,7 @@ public class MatrixUtils { /** Get the converted matrix. * @return converted matrix */ - RealMatrix getConvertedMatrix() { + Array2DRowRealMatrix getConvertedMatrix() { return new Array2DRowRealMatrix(data, false); }