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 2013/03/09 15:39:41 UTC

svn commit: r1454721 - in /commons/proper/math/trunk/src/test: java/org/apache/commons/math3/linear/SingularValueDecompositionTest.java resources/org/apache/commons/math3/linear/matrix1.csv resources/org/apache/commons/math3/linear/matrix2.csv

Author: luc
Date: Sat Mar  9 14:39:41 2013
New Revision: 1454721

URL: http://svn.apache.org/r1454721
Log:
Added Apache license headers.

The header has been added to data files, and the corresponding test has
been updated to ignore the header lines.

Modified:
    commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/SingularValueDecompositionTest.java
    commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix1.csv
    commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix2.csv

Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/SingularValueDecompositionTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/SingularValueDecompositionTest.java?rev=1454721&r1=1454720&r2=1454721&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/SingularValueDecompositionTest.java (original)
+++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/linear/SingularValueDecompositionTest.java Sat Mar  9 14:39:41 2013
@@ -279,11 +279,13 @@ public class SingularValueDecompositionT
             String strLine;
             int row = 0;
             while ((strLine = br.readLine()) != null) {
-                int col = 0;
-                for (String entry : strLine.split(",")) {
-                    m.setEntry(row, col++, Double.parseDouble(entry));
+                if (!strLine.startsWith("#")) {
+                    int col = 0;
+                    for (String entry : strLine.split(",")) {
+                        m.setEntry(row, col++, Double.parseDouble(entry));
+                    }
+                    row++;
                 }
-                row++;
             }
             in.close();
         } catch (IOException e) {}

Modified: commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix1.csv
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix1.csv?rev=1454721&r1=1454720&r2=1454721&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix1.csv (original)
+++ commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix1.csv Sat Mar  9 14:39:41 2013
@@ -1,3 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.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.0,0.0
 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0

Modified: commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix2.csv
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix2.csv?rev=1454721&r1=1454720&r2=1454721&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix2.csv (original)
+++ commons/proper/math/trunk/src/test/resources/org/apache/commons/math3/linear/matrix2.csv Sat Mar  9 14:39:41 2013
@@ -1,3 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
 0.003000302,-0.005529946,0.01538155,-0.001403205,-0.018213096,0.000076204,-0.000023713,0.000093626,0.000143789,-0.000092728,-0.00009325,-0.000471574,0.000256266,-0.000235424,-0.000559821,-0.000181869,0.000070384,0.000005498,0.000383238,0.000187495,0.000744314,-0.000299571,0.000655884,-0.000367504,-0.000296129,0.001865159,0.002139813,0.001156764,-0.000274115,0.00194246,-0.001067201,-0.000965123,-0.000838439,-0.000233388,-0.000400203,0.000097493,0.000236697,-0.000612503,0.000248345,0.000058795,0.000121681,0.000441167,0.000328212,0.000333702,0.000739353,0.000205686,0.00011173,0.001217128,0.000488424,0.000382149,0.000308471,-0.000490277,0.000345624,-0.000834169,0.000216899,0.000433887,-0.000369019,0.000646984,-0.000300974,0.000373483,0.000647662,-0.000253848,0.000223624,0.000634534,0.000747524,-0.000077809,-0.000353221,0.000240388,0.000414233,0.000207479,0.000041459,-0.000305439,-0.000105042,0.00019835,0.000413267,0.000026096,-0.00046518,-0.000128547,-0.000043406,0.00005626,0.00
 000624,-0.000126197,-0.000020413,-0.000151383,-0.000024204,-0.000030944,0.000022925,-0.000064255,0.000240003,0.000262614,0.000044858,-0.000320061,-0.000030874,0.000131975,0.000079968,-0.000113183,0.000073552,-0.000008934,0.00004173,0.000052111,-0.000061729,0.000044233,0.00031579,0.000136546,0.000069494,0.000086781,-0.000040722,0.000040594,0.000105801,0.000037761,0.000010309,-0.000152556,0.000021932,0.000034306,0.000012486,-0.000005934,-0.000046878,0.000023209,0.000008168,0.000008117,-0.000016579,-0.00000505,0.000004528,-0.00000555,-0.000000095,-0.00000136,-0.000005205,-0.000002595,0.000000285,-0.000001563,-0.000000953,-0.000000364,-0.000001132,-0.000000645,-0.000000775,-0.000000144,-0.000000641,-0.00000031,-0.000000023,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 0.002969656,-0.005304577,0.015172372,-0.001362703,-0.01832869,0.000054703,-0.000122829,-0.00003114,0.000041451,0.000025999,-0.000135931,-0.000186937,0.000239001,-0.000051824,-0.000383595,-0.00012191,-0.000021933,-0.000024977,0.000385048,0.000119015,0.000599602,-0.000358632,0.000726135,-0.000131523,-0.000116199,0.001494981,0.001850129,0.000724508,-0.000261562,0.001491656,-0.000748772,-0.000627043,-0.000597073,0.000000987,-0.000220861,-0.000078266,0.000303396,-0.000299759,0.000036112,0.000047285,0.000101568,0.000350496,0.000181929,0.000083279,0.00025771,0.000026141,-0.000010124,0.000382831,0.000080824,0.000021461,0.000143501,-0.000042618,0.000111455,-0.000339422,-0.000006761,0.000101824,-0.000082054,-0.000060832,-0.000124609,0.000138409,0.000029263,-0.000077077,0.000092533,-0.000011487,0.000023891,-0.000064685,0.000033676,0.000077876,0.000019453,0.000176876,-0.000211758,0.000035019,0.000043861,-0.000043324,0.000183336,-0.000029838,-0.000109527,0.000065992,-0.000221244,-0.00001
 4366,-0.000032553,-0.000062429,0.00004144,0.000035076,0.000062257,0.000033082,0.000005334,0.000073079,-0.000159208,-0.000239372,-0.000056981,0.000281376,-0.000009754,-0.000031414,-0.000108677,0.000193121,-0.000082145,0.000036054,-0.000074536,-0.000005391,0.000091036,-0.00005061,-0.000360727,-0.000218139,-0.000109819,-0.000100537,0.000092986,-0.00010101,-0.000154437,-0.000115903,-0.000022312,0.000308967,-0.000020773,-0.000103365,-0.000013504,0.000011012,0.000171955,-0.000173067,-0.000026495,-0.000048153,0.000161432,0.000028197,-0.000036547,0.000067851,0.000013284,0.000040178,-0.000008893,0.000015076,-0.000015242,0.000013819,0.000003256,0.000000331,0.000014678,0.00000763,0.000002552,0.000004191,0.000004197,0.000000411,-0.000000075,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 0.002887098,-0.005162996,0.014815235,-0.001285135,-0.017864999,0.00000749,-0.000086847,-0.000083018,0.000105148,0.000081389,-0.000091836,-0.000139615,0.000144603,0.000009173,-0.000390802,-0.000178339,-0.000026705,0.000019374,0.000339385,0.000106817,0.000534724,-0.000295593,0.000630123,-0.00006547,-0.000158208,0.001252922,0.001515506,0.000467301,-0.000238628,0.001181597,-0.000586928,-0.000454072,-0.000436001,0.00011785,-0.000120203,-0.000050288,0.000131089,-0.00013403,-0.000094773,0.000109751,0.000052716,0.000224419,0.000031617,-0.000005773,0.000039057,-0.000067576,-0.000073733,-0.000022599,-0.00008645,-0.000176968,-0.000001081,0.000065436,-0.000057159,0.000019626,-0.000076696,-0.000085582,0.000027081,-0.000237917,0.000027559,-0.000027321,-0.000138684,-0.000010139,0.000026879,-0.000280673,-0.000163613,-0.00006582,0.00008998,-0.000072257,-0.000129705,0.000144026,-0.000195254,0.000131956,0.000008668,-0.00004325,-0.000036238,-0.000014767,0.000003249,0.000103041,-0.000106909,-0.0
 00013922,-0.000025123,0.000014109,0.000077397,0.000074812,0.000097137,0.000008743,-0.000015867,0.000078784,-0.000160333,-0.000220779,-0.000096102,0.000276578,0.000044677,-0.000166,-0.000113381,0.000126259,-0.000094119,0.000046776,0.000006033,-0.000019026,0.000047752,-0.000077061,-0.000245975,-0.000149312,-0.000033577,-0.000036015,0.000006292,-0.000016404,-0.000042226,0.000005486,-0.000030862,-0.000047629,-0.000008657,0.000011517,-0.00001011,-0.000010266,0.000024103,0.000041587,-0.000072901,0.00008128,-0.000182947,-0.000016937,0.000031871,-0.000074912,0.000004791,-0.000132392,0.00002209,-0.000042783,0.000027412,-0.000036629,-0.000013631,0.000006481,-0.000035375,-0.00002774,-0.000009908,-0.000015946,-0.000012614,-0.000001499,0.000000198,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0