public void computeG( final double[] pt, final DenseMatrix64F mtx, final double w ) { computeG( pt, mtx ); CommonOps.scale( w, mtx ); }
/** * Builds the K matrix from landmark points and G matrix. * @param kMatrix the k matrix */ protected void computeK(DenseMatrix64F kMatrix) { final double[] res = new double[ ndims ]; int i = 0; final DenseMatrix64F Gbase = computeReflexiveG(); final DenseMatrix64F G = Gbase.copy(); while ( i < nLandmarks ) { CommonOps.insert( Gbase, kMatrix, i * ndims, i * ndims ); int j = i + 1; while ( j < nLandmarks ) { srcPtDisplacement( i, j, res ); computeG( res, G ); CommonOps.insert( G, kMatrix, i * ndims, j * ndims ); CommonOps.insert( G, kMatrix, j * ndims, i * ndims ); j++; } i++; } }