diff --git a/Code/Learning/otbDecisionTree.txx b/Code/Learning/otbDecisionTree.txx index b4ead23a5ae5b6f37f58204f2ee4716f7ffb73df..5f3f1d984409b8a5199fd31cfa2288d7a8ae3374 100644 --- a/Code/Learning/otbDecisionTree.txx +++ b/Code/Learning/otbDecisionTree.txx @@ -108,28 +108,28 @@ DecisionTree<AttributeValueType, LabelType> DecisionTreeTestType theTest = theKey.second; AttributeValueType theValue = theKey.first; switch( theTest ) - { - case LT: - if( attrValue < theValue ) - return lmIt->second; - break; - case LE: - if( attrValue <= theValue ) - return lmIt->second; - break; - case EQ: - if( attrValue == theValue ) - return lmIt->second; - break; - case GE: - if( attrValue >= theValue ) - return lmIt->second; - break; - case GT: - if( attrValue > theValue ) - return lmIt->second; - break; - } + { + case LT: + if( attrValue < theValue ) + return lmIt->second; + break; + case LE: + if( attrValue <= theValue ) + return lmIt->second; + break; + case EQ: + if( attrValue == theValue ) + return lmIt->second; + break; + case GE: + if( attrValue >= theValue ) + return lmIt->second; + break; + case GT: + if( attrValue > theValue ) + return lmIt->second; + break; + } ++lmIt; } @@ -150,43 +150,43 @@ DecisionTree<AttributeValueType, LabelType> DecisionTreeTestType theTest = theKey.second; AttributeValueType theValue = theKey.first; switch( theTest ) - { - case LT: - if( attrValue < theValue ) - { - candidateKeys.push_back( theKey ); - found = true; - } - break; - case LE: - if( attrValue <= theValue ) - { - candidateKeys.push_back( theKey ); - found = true; - } - break; - case EQ: - if( attrValue == theValue ) - { - candidateKeys.push_back( theKey ); - found = true; - } - break; - case GE: - if( attrValue >= theValue ) - { - candidateKeys.push_back( theKey ); - found = true; - } - break; - case GT: - if( attrValue > theValue ) - { - candidateKeys.push_back( theKey ); - found = true; - } - break; - } + { + case LT: + if( attrValue < theValue ) + { + candidateKeys.push_back( theKey ); + found = true; + } + break; + case LE: + if( attrValue <= theValue ) + { + candidateKeys.push_back( theKey ); + found = true; + } + break; + case EQ: + if( attrValue == theValue ) + { + candidateKeys.push_back( theKey ); + found = true; + } + break; + case GE: + if( attrValue >= theValue ) + { + candidateKeys.push_back( theKey ); + found = true; + } + break; + case GT: + if( attrValue > theValue ) + { + candidateKeys.push_back( theKey ); + found = true; + } + break; + } ++tmIt; } @@ -201,11 +201,11 @@ DecisionTree<AttributeValueType, LabelType> // If we found one or several matching tests typename std::vector< KeyType >::const_iterator ckIt = candidateKeys.begin(); while ( ckIt != candidateKeys.end() ) - { - std::cout << (*ckIt).first << " " << (*ckIt).second << std::endl; - Pointer child = (*m_TreeMap)[(*ckIt)]; - return child->Decide(example); - } + { + std::cout << (*ckIt).first << " " << (*ckIt).second << std::endl; + Pointer child = (*m_TreeMap)[(*ckIt)]; + return child->Decide(example); + } } }