public double calcEucDistance (BCNode b) {
        double sumDSquared = 0.0;
        
        int n = Math.max(this.getNumAttributes(), b.getNumAttributes());
        for(int i = 0; i < n; i++) {
            Double ai = this.getAttribute(i);
            Double bi = b.getAttribute(i);
            if( ai == null || bi == null ) {
                sumDSquared += 0.0;
            } else {
                sumDSquared += (ai-bi)*(ai-bi);
            }
        }
        
        return Math.sqrt(sumDSquared);
    }