private void computeSubClusterSplit ( final int [ ] [ ] subDesignation , int originalCluster , List < DataPoint > listOfDataPointsInCluster , DataSet fullDataSet , int [ ] fullDesignations , final int [ ] [ ] originalPositions , final double [ ] splitEvaluation , PriorityQueue < Integer > clusterToSplit , boolean parallel ) { subDesignation [ originalCluster ] = new int [ listOfDataPointsInCluster . size ( ) ] ; int pos = 0 ; for ( int i = 0 ; i < fullDataSet . size ( ) ; i ++ ) { if ( fullDesignations [ i ] != originalCluster ) continue ; originalPositions [ originalCluster ] [ pos ++ ] = i ; } //Cluster the sub cluster SimpleDataSet dpSubC1DataSet = new SimpleDataSet ( listOfDataPointsInCluster ) ; try { baseClusterer . cluster ( dpSubC1DataSet , 2 , parallel , subDesignation [ originalCluster ] ) ; splitEvaluation [ originalCluster ] = clusterEvaluation . evaluate ( subDesignation [ originalCluster ] , dpSubC1DataSet ) ; clusterToSplit . add ( originalCluster ) ; } catch ( ClusterFailureException ex ) { splitEvaluation [ originalCluster ] = Double . POSITIVE_INFINITY ; } }
Takes the data set and computes the clustering of a sub cluster and stores its information and places the result in the queue