Skip to content

Commit b3a54d3

Browse files
committed
Remove Tinfour unused dependency
1 parent 58623e1 commit b3a54d3

File tree

4 files changed

+0
-103
lines changed

4 files changed

+0
-103
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ dependencies {
117117
implementation group: "org.apache.commons", name: "commons-math3", version: "3.6.1"
118118

119119
implementation group: "com.google.inject", name: "guice", version: guiceVersion
120-
implementation group: "org.tinfour", name: "TinfourCore", version: "2.1.8"
121120
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion"
122121
implementation "org.apache.commons:commons-collections4:4.4"
123122

src/main/java/ru/nucodelabs/geo/ves/calc/interpolation/TinSpatialInterpolator.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/test/java/ru/nucodelabs/algorithms/RBFTest.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package ru.nucodelabs.algorithms;
22

33
import org.junit.jupiter.api.Test;
4-
import org.tinfour.common.Vertex;
5-
import org.tinfour.interpolation.TriangularFacetInterpolator;
6-
import org.tinfour.standard.IncrementalTin;
74
import smile.interpolation.RBFInterpolation2D;
85
import smile.math.rbf.GaussianRadialBasis;
96
import smile.math.rbf.MultiquadricRadialBasis;
@@ -61,49 +58,4 @@ public void test2() {
6158
double value = interpolation2D.interpolate(25.0, 500.0);
6259
System.out.println(value);
6360
}
64-
65-
@Test
66-
public void test3() {
67-
double[] x1 = {1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 12.0, 15.0, 15.0, 20.0, 20.0, 32.0, 40.0, 50.0, 65.0, 65.0, 80.0, 80.0, 100.0, 123.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 12.0, 15.0, 15.0, 20.0, 20.0, 25.0, 32.0, 40.0, 50.0, 65.0, 65.0, 80.0, 80.0, 100.0, 123.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 9.0, 12.0, 15.0, 15.0, 20.0, 20.0, 25.0, 32.0, 40.0, 50.0, 65.0, 65.0, 80.0, 80.0, 100.0, 123.0};
68-
double[] x2 = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 200.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0, 300.0};
69-
double[] y = {135.01, 130.3, 151.19, 158.34, 169.54, 159.71, 142.06, 142.71, 124.9, 125.4, 142.92, 128.77, 116.4, 106.52, 103.02, 103.23, 96.156, 107.29, 100.73, 113.53, 125.54, 221.09, 163.79, 166.89, 170.74, 179.45, 176.85, 167.28, 143.03, 130.18, 130.5, 123.0, 122.67, 110.11, 105.11, 95.513, 95.813, 95.723, 95.723, 97.983, 100.57, 114.42, 131.75, 138.98, 137.74, 162.18, 173.18, 179.36, 169.39, 159.82, 139.85, 120.48, 117.94, 109.26, 98.269, 94.793, 92.366, 92.135, 96.517, 99.337, 99.337, 123.81, 127.55, 139.81, 161.68};
70-
71-
List<Double> listX1 = new ArrayList<>();
72-
for (var d:x1) {
73-
listX1.add(d);
74-
}
75-
List<Double> listX2 = new ArrayList<>();
76-
for (var d:x2) {
77-
listX2.add(d);
78-
}
79-
List<Double> listY = new ArrayList<>();
80-
for (var d:y) {
81-
listY.add(d);
82-
}
83-
84-
for (int i = 0; i < listX1.size() - 1; i++) {
85-
if (Objects.equals(listX1.get(i), listX1.get(i + 1))) {
86-
listX1.remove(i);
87-
listX2.remove(i);
88-
listY.remove(i);
89-
}
90-
}
91-
92-
//25, 0, 116.78
93-
94-
double[] nx1 = listX1.stream().mapToDouble(Double::doubleValue).toArray();
95-
double[] nx2 = listX2.stream().mapToDouble(Double::doubleValue).toArray();
96-
double[] ny = listY.stream().mapToDouble(Double::doubleValue).toArray();
97-
98-
IncrementalTin tin = new IncrementalTin(1.0);
99-
100-
for (int i = 0; i < listX1.size(); i++) {
101-
Vertex vertex = new Vertex(listX1.get(i), listX2.get(i), listY.get(i));
102-
tin.add(vertex);
103-
}
104-
105-
TriangularFacetInterpolator inTri = new TriangularFacetInterpolator(tin);
106-
double value = inTri.interpolate(25, 0.0, null);
107-
System.out.println(value);
108-
}
10961
}

src/test/java/ru/nucodelabs/algorithms/TinTest.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)