src/machinelearning/DecisionTree.java
public Boolean classify(ArrayList<Boolean> sample) {
		assert(sample.size() == attNames.size());
		
		Node current = root;
		while (!current.isLeaf()) {
			boolean satisfied = false;
			for (Pair<Boolean,Integer> atom : current.predicate)
				if (atom.first() == sample.get(atom.second())) {
					satisfied = true;
					break;
				}
			
			if (satisfied)
				current = current.children.get(1);
			else
				current = current.children.get(0);
		}
		
		return current.classification;
	}
/**
	 * Classifies a given sample using this tree
	 * @param sample 	The sample to be classified
	 * @return			TRUE - yes, FALSE - no
	 */
Classifies a given sample using this tree
@param sample        The sample to be classified
@return                      TRUE - yes, FALSE - no
Classifies a given sample using this tree @param sample The sample to be classified @return TRUE - yes FALSE - no
public Boolean classify(ArrayList<Boolean> sample) {
		assert(sample.size() == attNames.size());
		Node current = root;
		while (!current.isLeaf()) {
			boolean satisfied = false;
			for (Pair<Boolean,Integer> atom : current.predicate)
				if (atom.first() == sample.get(atom.second())) {
					satisfied = true;
					break;
				}
			if (satisfied)
				current = current.children.get(1);
			else
				current = current.children.get(0);
		}
		return current.classification;
	}
public Boolean classify ( ArrayList < Boolean > sample ) { assert ( sample . size ( ) == attNames . size ( ) ) ; Node current = root ; while ( ! current . isLeaf ( ) ) { boolean satisfied = false ; for ( Pair < Boolean , Integer > atom : current . predicate ) if ( atom . first ( ) == sample . get ( atom . second ( ) ) ) { satisfied = true ; break ; } if ( satisfied ) current = current . children . get ( 1 ) ; else current = current . children . get ( 0 ) ; } return current . classification ; }
Classifies a given sample using this tree
 @param sample        The sample to be classified
 @return                      TRUE - yes, FALSE - no
Classifies a given sample using this tree @param sample The sample to be classified @return TRUE - yes FALSE - no