diff options
author | Jon Bratseth <jonbratseth@yahoo.com> | 2017-01-10 16:31:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 16:31:16 +0100 |
commit | f1dff9bd9ff1d959ba1957e7fb25f716b1dee2f3 (patch) | |
tree | 55ecf46bcd749131039de80382ea54d93747216f /searchlib | |
parent | 9414001aa13c68cd9100ab606b20000494a91560 (diff) | |
parent | 9574c0894ddbf88ad3ff311688e597a939df1a41 (diff) |
Merge pull request #1462 from yahoo/bratseth/tensor-dense-binary-format
Add (disabled) dense tensor binary format
Diffstat (limited to 'searchlib')
-rw-r--r-- | searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java index b0e30cf2043..d0a188c0760 100644 --- a/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java +++ b/searchlib/src/test/java/com/yahoo/searchlib/rankingexpression/evaluation/EvaluationTestCase.java @@ -177,7 +177,7 @@ public class EvaluationTestCase { tester.assertEvaluates("{ {x:0,y:0}:15, {x:1,y:0}:35 }", "join(tensor0, tensor1, f(x,y) (x*y))", "{ {x:0}:3, {x:1}:7 }", "{ {y:0}:5 }"); // -- join composites tester.assertEvaluates("{ }", "tensor0 * tensor0", "{}"); - tester.assertEvaluates("tensor(x{},y{},z{}):{}", "( tensor0 * tensor1 ) * ( tensor2 * tensor1 )", + tester.assertEvaluates("{{x:0,y:0,z:0}:0.0}", "( tensor0 * tensor1 ) * ( tensor2 * tensor1 )", "{{x:0}:1}", "{}", "{{y:0,z:0}:1}"); tester.assertEvaluates("tensor(x{}):{}", "tensor0 * tensor1", "{ {x:0}:3 }", "tensor(x{}):{ {x:1}:5 }"); @@ -262,7 +262,8 @@ public class EvaluationTestCase { "{ {x:0}:1, {x:1}:2 }", "{ {y:0}:3, {y:1}:4 }", "{ {z:0}:5 }", "{ {x:0,y:0,z:0}:0.5, {x:1,y:0,z:0}:1.5, {x:0,y:0,z:1}:4.5, {x:0,y:1,z:0}:0, {x:1,y:0,z:1}:0, {x:0,y:1,z:1}:0, {x:1,y:1,z:0}:0, {x:1,y:1,z:1}:0 }"); tester.assertEvaluates("1.0", "sum(tensor0 * tensor1 + 0.5)", "{ {x:0}:0, {x:1}:0 }", "{ {x:0}:1, {x:1}:1 }"); - tester.assertEvaluates("0.0", "sum(tensor0 * tensor1 + 0.5)", "{}", "{ {x:0}:1, {x:1}:1 }"); + tester.assertEvaluates("1.0", "sum(tensor0 * tensor1 + 0.5)", "{}", "{ {x:0}:1, {x:1}:1 }"); + tester.assertEvaluates("0.0", "sum(tensor0 * tensor1 + 0.5)", "tensor(x{}):{}", "{ {x:0}:1, {x:1}:1 }"); // tensor result dimensions are given from argument dimensions, not the resulting values tester.assertEvaluates("tensor(x{}):{}", "tensor0 * tensor1", "{ {x:0}:1 }", "tensor(x{}):{ {x:1}:1 }"); |