summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-12-05 09:16:33 -0800
committerJon Bratseth <bratseth@yahoo-inc.com>2016-12-05 09:16:33 -0800
commit8fc656b3491b084fe6459ab3a2decb91715511e6 (patch)
tree859a5ea7e5bd7272e604b7b8bf5b55152bdd29b7 /vespajlib/src/test/java/com/yahoo
parent5b454c9ce2674a5e8e39c98b57de446961a924df (diff)
Move Builder below MapTensor
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo')
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/MapTensorBuilderTestCase.java6
-rw-r--r--vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/MapTensorBuilderTestCase.java b/vespajlib/src/test/java/com/yahoo/tensor/MapTensorBuilderTestCase.java
index ee1cf7cc144..3704f54acec 100644
--- a/vespajlib/src/test/java/com/yahoo/tensor/MapTensorBuilderTestCase.java
+++ b/vespajlib/src/test/java/com/yahoo/tensor/MapTensorBuilderTestCase.java
@@ -14,7 +14,7 @@ public class MapTensorBuilderTestCase {
@Test
public void requireThatEmptyTensorCanBeBuilt() {
- Tensor tensor = new MapTensorBuilder(TensorType.empty).build();
+ Tensor tensor = new MapTensor.Builder(TensorType.empty).build();
assertEquals(0, tensor.type().dimensions().size());
assertEquals("{}", tensor.toString());
}
@@ -22,7 +22,7 @@ public class MapTensorBuilderTestCase {
@Test
public void requireThatOneDimensionalTensorCanBeBuilt() {
TensorType type = new TensorType.Builder().mapped("x").build();
- Tensor tensor = new MapTensorBuilder(type).
+ Tensor tensor = new MapTensor.Builder(type).
cell().label("x", "0").value(1).
cell().label("x", "1").value(2).build();
assertEquals(Sets.newHashSet("x"), tensor.type().dimensionNames());
@@ -32,7 +32,7 @@ public class MapTensorBuilderTestCase {
@Test
public void requireThatTwoDimensionalTensorCanBeBuilt() {
TensorType type = new TensorType.Builder().mapped("x").mapped("y").build();
- Tensor tensor = new MapTensorBuilder(type).
+ Tensor tensor = new MapTensor.Builder(type).
cell().label("x", "0").label("y", "0").value(1).
cell().label("x", "1").label("y", "0").value(2).build();
assertEquals(Sets.newHashSet("x", "y"), tensor.type().dimensionNames());
diff --git a/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java b/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java
index 33ad01b49c5..7b1c07562c6 100644
--- a/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java
+++ b/vespajlib/src/test/java/com/yahoo/tensor/TensorFunctionBenchmark.java
@@ -46,7 +46,7 @@ public class TensorFunctionBenchmark {
List<Tensor> tensors = new ArrayList<>();
TensorType type = new TensorType.Builder().mapped("x").build();
for (int i = 0; i < vectorCount; i++) {
- MapTensorBuilder builder = new MapTensorBuilder(type);
+ MapTensor.Builder builder = new MapTensor.Builder(type);
for (int j = 0; j < vectorSize; j++) {
builder.cell().label("x", String.valueOf(j)).value(random.nextDouble());
}
@@ -58,7 +58,7 @@ public class TensorFunctionBenchmark {
private static List<Tensor> generateVectorsInOneTensor(int vectorCount, int vectorSize) {
List<Tensor> tensors = new ArrayList<>();
TensorType type = new TensorType.Builder().mapped("i").mapped("x").build();
- MapTensorBuilder builder = new MapTensorBuilder(type);
+ MapTensor.Builder builder = new MapTensor.Builder(type);
for (int i = 0; i < vectorCount; i++) {
for (int j = 0; j < vectorSize; j++) {
builder.cell()