commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r682190 - /commons/proper/math/branches/MATH_2_0/src/java/org/apache/commons/math/linear/MatrixUtils.java
Date Sun, 03 Aug 2008 16:12:48 GMT
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. 
      * 



Mime
View raw message