// Path: src/treecmp/metric/NodalL2SplittedMetric.java
// public class NodalL2SplittedMetric extends BaseMetric implements Metric{
//   public double getDistance(Tree t1, Tree t2, int... indexes) {
//  
//       double dist,diff;
// 
//         IdGroup id1 = TreeUtils.getLeafIdGroup(t1);
//         int [][] nsMatrix1 = TreeCmpUtils.calcNodalSplittedMatrix(t1, null);
//         int [][] nsMatrix2 = TreeCmpUtils.calcNodalSplittedMatrix(t2, id1);
// 
//         dist = 0.0;
//         for (int i = 0; i < id1.getIdCount(); i++) {
//             for (int j = 0; j < id1.getIdCount(); j++) {
//                 diff = nsMatrix1[i][j] - nsMatrix2[i][j];
//                 dist += diff*diff;
//             }
//         }
//         return Math.sqrt(dist);
//   }
// 
// }


import treecmp.metric.NodalL2SplittedMetric;
import treecmp.metric.Metric;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package treecmp.spr;


/**
 *
 * @author Damian
 */
public class SprHeuristicNsRfcMetric extends SprHeuristicRfcBaseMetric{

 @Override
protected Metric getMetric(){
// Path: src/treecmp/metric/NodalL2SplittedMetric.java
// public class NodalL2SplittedMetric extends BaseMetric implements Metric{
//   public double getDistance(Tree t1, Tree t2, int... indexes) {
//  
//       double dist,diff;
// 
//         IdGroup id1 = TreeUtils.getLeafIdGroup(t1);
//         int [][] nsMatrix1 = TreeCmpUtils.calcNodalSplittedMatrix(t1, null);
//         int [][] nsMatrix2 = TreeCmpUtils.calcNodalSplittedMatrix(t2, id1);
// 
//         dist = 0.0;
//         for (int i = 0; i < id1.getIdCount(); i++) {
//             for (int j = 0; j < id1.getIdCount(); j++) {
//                 diff = nsMatrix1[i][j] - nsMatrix2[i][j];
//                 dist += diff*diff;
//             }
//         }
//         return Math.sqrt(dist);
//   }
// 
// }


// Path: src/treecmp/spr/SprHeuristicNsRfcMetric.java
import treecmp.metric.NodalL2SplittedMetric;
import treecmp.metric.Metric;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package treecmp.spr;


/**
 *
 * @author Damian
 */
public class SprHeuristicNsRfcMetric extends SprHeuristicRfcBaseMetric{

 @Override
protected Metric getMetric(){
    return new NodalL2SplittedMetric();