commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject [math] Replace removed methods by toArray().
Date Mon, 23 Feb 2015 22:58:54 GMT
Repository: commons-math
Updated Branches:
  refs/heads/master 6ac547ddc -> 03e65c98d


Replace removed methods by toArray().


Project: http://git-wip-us.apache.org/repos/asf/commons-math/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-math/commit/03e65c98
Tree: http://git-wip-us.apache.org/repos/asf/commons-math/tree/03e65c98
Diff: http://git-wip-us.apache.org/repos/asf/commons-math/diff/03e65c98

Branch: refs/heads/master
Commit: 03e65c98da2a0b2e27b14713543c2a61d56b1237
Parents: 6ac547d
Author: Thomas Neidhart <thomas.neidhart@gmail.com>
Authored: Mon Feb 23 23:58:44 2015 +0100
Committer: Thomas Neidhart <thomas.neidhart@gmail.com>
Committed: Mon Feb 23 23:58:44 2015 +0100

----------------------------------------------------------------------
 .../apache/commons/math4/linear/ArrayFieldVectorTest.java | 10 +++++-----
 .../apache/commons/math4/linear/BlockFieldMatrixTest.java |  2 +-
 .../apache/commons/math4/linear/FieldMatrixImplTest.java  |  2 +-
 .../commons/math4/linear/SparseFieldMatrixTest.java       |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-math/blob/03e65c98/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
index bc4211b..a9f7ac7 100644
--- a/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/ArrayFieldVectorTest.java
@@ -500,7 +500,7 @@ public class ArrayFieldVectorTest {
         //octave =  v1 + v2
         ArrayFieldVector<Fraction> v_add = v1.add(v2);
         Fraction[] result_add = {new Fraction(5), new Fraction(7), new Fraction(9)};
-        checkArray("compare vect" ,v_add.getData(),result_add);
+        checkArray("compare vect" ,v_add.toArray(),result_add);
 
         FieldVectorTestImpl<Fraction> vt2 = new FieldVectorTestImpl<Fraction>(vec2);
         FieldVector<Fraction> v_add_i = v1.add(vt2);
@@ -510,7 +510,7 @@ public class ArrayFieldVectorTest {
         //octave =  v1 - v2
         ArrayFieldVector<Fraction> v_subtract = v1.subtract(v2);
         Fraction[] result_subtract = {new Fraction(-3), new Fraction(-3), new Fraction(-3)};
-        checkArray("compare vect" ,v_subtract.getData(),result_subtract);
+        checkArray("compare vect" ,v_subtract.toArray(),result_subtract);
 
         FieldVector<Fraction> v_subtract_i = v1.subtract(vt2);
         Fraction[] result_subtract_i = {new Fraction(-3), new Fraction(-3), new Fraction(-3)};
@@ -519,7 +519,7 @@ public class ArrayFieldVectorTest {
         // octave v1 .* v2
         ArrayFieldVector<Fraction>  v_ebeMultiply = v1.ebeMultiply(v2);
         Fraction[] result_ebeMultiply = {new Fraction(4), new Fraction(10), new Fraction(18)};
-        checkArray("compare vect" ,v_ebeMultiply.getData(),result_ebeMultiply);
+        checkArray("compare vect" ,v_ebeMultiply.toArray(),result_ebeMultiply);
 
         FieldVector<Fraction>  v_ebeMultiply_2 = v1.ebeMultiply(v2_t);
         Fraction[] result_ebeMultiply_2 = {new Fraction(4), new Fraction(10), new Fraction(18)};
@@ -528,7 +528,7 @@ public class ArrayFieldVectorTest {
         // octave v1 ./ v2
         ArrayFieldVector<Fraction>  v_ebeDivide = v1.ebeDivide(v2);
         Fraction[] result_ebeDivide = {new Fraction(1, 4), new Fraction(2, 5), new Fraction(1,
2)};
-        checkArray("compare vect" ,v_ebeDivide.getData(),result_ebeDivide);
+        checkArray("compare vect" ,v_ebeDivide.toArray(),result_ebeDivide);
 
         FieldVector<Fraction>  v_ebeDivide_2 = v1.ebeDivide(v2_t);
         Fraction[] result_ebeDivide_2 = {new Fraction(1, 4), new Fraction(2, 5), new Fraction(1,
2)};
@@ -550,7 +550,7 @@ public class ArrayFieldVectorTest {
 
         ArrayFieldVector<Fraction> v_projection = v1.projection(v2);
         Fraction[] result_projection = {new Fraction(128, 77), new Fraction(160, 77), new
Fraction(192, 77)};
-        checkArray("compare vect", v_projection.getData(), result_projection);
+        checkArray("compare vect", v_projection.toArray(), result_projection);
 
         FieldVector<Fraction> v_projection_2 = v1.projection(v2_t);
         Fraction[] result_projection_2 = {new Fraction(128, 77), new Fraction(160, 77), new
Fraction(192, 77)};

http://git-wip-us.apache.org/repos/asf/commons-math/blob/03e65c98/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
index 48061d4..00dde9d 100644
--- a/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/BlockFieldMatrixTest.java
@@ -454,7 +454,7 @@ public final class BlockFieldMatrixTest {
     public void testPremultiplyVector() {
         FieldMatrix<Fraction> m = new BlockFieldMatrix<Fraction>(testData);
         TestUtils.assertEquals(m.preMultiply(testVector), preMultTest);
-        TestUtils.assertEquals(m.preMultiply(new ArrayFieldVector<Fraction>(testVector).getData()),
+        TestUtils.assertEquals(m.preMultiply(new ArrayFieldVector<Fraction>(testVector).toArray()),
                                preMultTest);
         m = new BlockFieldMatrix<Fraction>(bigSingular);
         try {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/03e65c98/src/test/java/org/apache/commons/math4/linear/FieldMatrixImplTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/linear/FieldMatrixImplTest.java b/src/test/java/org/apache/commons/math4/linear/FieldMatrixImplTest.java
index 72c35b7..76f79f8 100644
--- a/src/test/java/org/apache/commons/math4/linear/FieldMatrixImplTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/FieldMatrixImplTest.java
@@ -317,7 +317,7 @@ public final class FieldMatrixImplTest {
     public void testPremultiplyVector() {
         FieldMatrix<Fraction> m = new Array2DRowFieldMatrix<Fraction>(testData);
         TestUtils.assertEquals(m.preMultiply(testVector), preMultTest);
-        TestUtils.assertEquals(m.preMultiply(new ArrayFieldVector<Fraction>(testVector).getData()),
+        TestUtils.assertEquals(m.preMultiply(new ArrayFieldVector<Fraction>(testVector).toArray()),
                                preMultTest);
         m = new Array2DRowFieldMatrix<Fraction>(bigSingular);
         try {

http://git-wip-us.apache.org/repos/asf/commons-math/blob/03e65c98/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
index caab6a6..176b227 100644
--- a/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
+++ b/src/test/java/org/apache/commons/math4/linear/SparseFieldMatrixTest.java
@@ -311,7 +311,7 @@ public class SparseFieldMatrixTest {
         assertClose("premultiply", m.preMultiply(testVector), preMultTest,
             normTolerance);
         assertClose("premultiply", m.preMultiply(
-            new ArrayFieldVector<Fraction>(testVector).getData()), preMultTest, normTolerance);
+            new ArrayFieldVector<Fraction>(testVector).toArray()), preMultTest, normTolerance);
         m = createSparseMatrix(bigSingular);
         try {
             m.preMultiply(testVector);


Mime
View raw message