Repository: systemml
Updated Branches:
  refs/heads/master ca24ec564 -> ef842da9c


[MINOR] Fix INF robustness layered graph sparsity estimator (rounding)

Project: http://git-wip-us.apache.org/repos/asf/systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/ef842da9
Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/ef842da9
Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/ef842da9

Branch: refs/heads/master
Commit: ef842da9c891851c8e0a0db3cad3bd88aacb6cd9
Parents: ca24ec5
Author: Matthias Boehm <mboe...@gmail.com>
Authored: Fri Oct 19 16:35:38 2018 +0200
Committer: Matthias Boehm <mboe...@gmail.com>
Committed: Fri Oct 19 16:35:38 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/systemml/blob/ef842da9/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java 
b/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
index 809ac8b..9fbc384 100644
--- a/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
+++ b/src/main/java/org/apache/sysml/hops/estim/EstimatorLayeredGraph.java
@@ -156,8 +156,8 @@ public class EstimatorLayeredGraph extends 
SparsityEstimator {
                        }
                        
                        //step 2: propagate vectors bottom-up and aggregate nnz
-                       return (long) Arrays.stream(_nodes.get(_nodes.size()-1))
-                               .mapToDouble(n -> 
calcNNZ(n.computeVector(_rounds), _rounds)).sum();
+                       return (long) 
Math.round(Arrays.stream(_nodes.get(_nodes.size()-1))
+                               .mapToDouble(n -> 
calcNNZ(n.computeVector(_rounds), _rounds)).sum());
                }
                
                private static double calcNNZ(double[] inpvec, int rounds) {

Reply via email to