internal virtual double computeDistance(SpeakerCluster speakerCluster, SpeakerCluster speakerCluster2)
        {
            int rowDimension    = speakerCluster.getFeatureMatrix().getRowDimension() + speakerCluster2.getFeatureMatrix().getRowDimension();
            int columnDimension = speakerCluster.getFeatureMatrix().getColumnDimension();
            Array2DRowRealMatrix array2DRowRealMatrix = new Array2DRowRealMatrix(rowDimension, columnDimension);

            array2DRowRealMatrix.setSubMatrix(speakerCluster.getFeatureMatrix().getData(), 0, 0);
            array2DRowRealMatrix.setSubMatrix(speakerCluster2.getFeatureMatrix().getData(), speakerCluster.getFeatureMatrix().getRowDimension(), 0);
            double num  = SpeakerIdentification.getBICValue(array2DRowRealMatrix);
            double num2 = 13.0;
            double num3 = 0.5 * (num2 + 0.5 * num2 * (num2 + (double)1f)) * java.lang.Math.log((double)array2DRowRealMatrix.getRowDimension()) * 2.0;

            return(num - speakerCluster.getBicValue() - speakerCluster2.getBicValue() - num3);
        }
        public SpeakerCluster(SpeakerCluster c)
        {
            this.segmentSet    = new TreeSet();
            this.featureMatrix = new Array2DRowRealMatrix(c.getFeatureMatrix().getData());
            Iterator iterator = c.segmentSet.iterator();

            while (iterator.hasNext())
            {
                this.addSegment((Segment)iterator.next());
            }
        }
        public virtual void mergeWith(SpeakerCluster target)
        {
            if (target == null)
            {
                throw new NullPointerException();
            }
            Iterator iterator = target.segmentSet.iterator();

            while (iterator.hasNext())
            {
                if (!this.addSegment((Segment)iterator.next()).booleanValue())
                {
                    [email protected]("Something doesn't work in mergeWith method, Cluster class");
                }
            }
            int rowDimension    = this.featureMatrix.getRowDimension() + target.getFeatureMatrix().getRowDimension();
            int columnDimension = this.featureMatrix.getColumnDimension();
            Array2DRowRealMatrix array2DRowRealMatrix = new Array2DRowRealMatrix(rowDimension, columnDimension);

            array2DRowRealMatrix.setSubMatrix(this.featureMatrix.getData(), 0, 0);
            array2DRowRealMatrix.setSubMatrix(target.getFeatureMatrix().getData(), this.featureMatrix.getRowDimension(), 0);
            this.bicValue      = SpeakerIdentification.getBICValue(array2DRowRealMatrix);
            this.featureMatrix = new Array2DRowRealMatrix(array2DRowRealMatrix.getData());
        }