added createRealVector for consistency with Matrix factory methods

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/branches/MATH_2_0@682190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2008-08-03 16:12:48 +00:00
parent 2e82f1fcdc
commit 9d3b1d2f16
1 changed files with 12 additions and 0 deletions

View File

@ -147,6 +147,18 @@ public class MatrixUtils {
return new BigMatrixImpl(data);
}
/**
* Creates a {@link RealVector} using the data from the input array.
*
* @param data the input data
* @return a data.length RealVector
* @throws IllegalArgumentException if <code>data</code> is empty
* @throws NullPointerException if <code>data</code>is null
*/
public static RealVector createRealVector(double[] data) {
return new RealVectorImpl(data, true);
}
/**
* Creates a row {@link RealMatrix} using the data from the input
* array.