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
This commit is contained in:
Luc Maisonobe 2009-06-28 21:48:15 +00:00
parent e1f4ed50ad
commit b5395fd802
1 changed files with 4 additions and 4 deletions

View File

@ -660,7 +660,7 @@ public class MatrixUtils {
* @param m matrix to convert * @param m matrix to convert
* @return converted matrix * @return converted matrix
*/ */
public static RealMatrix fractionMatrixToRealMatrix(final FieldMatrix<Fraction> m) { public static Array2DRowRealMatrix fractionMatrixToRealMatrix(final FieldMatrix<Fraction> m) {
final FractionMatrixConverter converter = new FractionMatrixConverter(); final FractionMatrixConverter converter = new FractionMatrixConverter();
m.walkInOptimizedOrder(converter); m.walkInOptimizedOrder(converter);
return converter.getConvertedMatrix(); return converter.getConvertedMatrix();
@ -693,7 +693,7 @@ public class MatrixUtils {
/** Get the converted matrix. /** Get the converted matrix.
* @return converted matrix * @return converted matrix
*/ */
RealMatrix getConvertedMatrix() { Array2DRowRealMatrix getConvertedMatrix() {
return new Array2DRowRealMatrix(data, false); return new Array2DRowRealMatrix(data, false);
} }
@ -704,7 +704,7 @@ public class MatrixUtils {
* @param m matrix to convert * @param m matrix to convert
* @return converted matrix * @return converted matrix
*/ */
public static RealMatrix bigFractionMatrixToRealMatrix(final FieldMatrix<BigFraction> m) { public static Array2DRowRealMatrix bigFractionMatrixToRealMatrix(final FieldMatrix<BigFraction> m) {
final BigFractionMatrixConverter converter = new BigFractionMatrixConverter(); final BigFractionMatrixConverter converter = new BigFractionMatrixConverter();
m.walkInOptimizedOrder(converter); m.walkInOptimizedOrder(converter);
return converter.getConvertedMatrix(); return converter.getConvertedMatrix();
@ -737,7 +737,7 @@ public class MatrixUtils {
/** Get the converted matrix. /** Get the converted matrix.
* @return converted matrix * @return converted matrix
*/ */
RealMatrix getConvertedMatrix() { Array2DRowRealMatrix getConvertedMatrix() {
return new Array2DRowRealMatrix(data, false); return new Array2DRowRealMatrix(data, false);
} }