diff options
author | zsxwing <zsxwing@gmail.com> | 2014-05-26 14:34:58 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-05-26 14:34:58 -0700 |
commit | cb7fe5034826844f1b50fbe8b92646317b66f21c (patch) | |
tree | 98be1d17bf2304f1c579da1c9972b82f9a3e975b /mllib/src | |
parent | bee6c4f4a155f625495212c17b58dc76f525f312 (diff) | |
download | spark-cb7fe5034826844f1b50fbe8b92646317b66f21c.tar.gz spark-cb7fe5034826844f1b50fbe8b92646317b66f21c.tar.bz2 spark-cb7fe5034826844f1b50fbe8b92646317b66f21c.zip |
SPARK-1925: Replace '&' with '&&'
JIRA: https://issues.apache.org/jira/browse/SPARK-1925
Author: zsxwing <zsxwing@gmail.com>
Closes #879 from zsxwing/SPARK-1925 and squashes the following commits:
5cf5a6d [zsxwing] SPARK-1925: Replace '&' with '&&'
Diffstat (limited to 'mllib/src')
-rw-r--r-- | mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala b/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala index 0fe30a3e70..3b13e52a7b 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala @@ -401,7 +401,7 @@ object DecisionTree extends Serializable with Logging { */ def isSampleValid(parentFilters: List[Filter], labeledPoint: LabeledPoint): Boolean = { // leaf - if ((level > 0) & (parentFilters.length == 0)) { + if ((level > 0) && (parentFilters.length == 0)) { return false } @@ -454,7 +454,7 @@ object DecisionTree extends Serializable with Logging { val bin = binForFeatures(mid) val lowThreshold = bin.lowSplit.threshold val highThreshold = bin.highSplit.threshold - if ((lowThreshold < feature) & (highThreshold >= feature)){ + if ((lowThreshold < feature) && (highThreshold >= feature)){ return mid } else if (lowThreshold >= feature) { |