You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by lu...@apache.org on 2008/08/03 18:12:48 UTC

svn commit: r682190 - /commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java

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 {@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. 
      *