Author: luc
Date: Sun Aug 3 09:12:48 2008
New Revision: 682190
URL: http://svn.apache.org/viewvc?rev=682190&view=rev
Log:
added createRealVector for consistency with Matrix factory methods
Modified:
commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java
Modified:
commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java?rev=682190&r1=682189&r2=682190&view=diff
==============================================================================
---
commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java
(original)
+++
commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java
Sun Aug 3 09:12:48 2008
@@ -148,6 +148,18 @@
}
/**
+ * Creates a [EMAIL PROTECTED] 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 [EMAIL PROTECTED] RealMatrix} using the data from the
input
* array.
*