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:
parent
2e82f1fcdc
commit
9d3b1d2f16
|
@ -147,6 +147,18 @@ public class MatrixUtils {
|
||||||
return new BigMatrixImpl(data);
|
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
|
* Creates a row {@link RealMatrix} using the data from the input
|
||||||
* array.
|
* array.
|
||||||
|
|
Loading…
Reference in New Issue