protected void prune(LinkedList<Integer> basisSet){
  double[][] PHI_t_Array=new double[basisSet.size()][];
  for (int j=0; j < basisSet.size(); j++) {
    PHI_t_Array[j]=phi[basisSet.get(j)];
  }
  PHI_t=new Matrix(PHI_t_Array);
  A=new Matrix(basisSet.size(),basisSet.size());
  for (int j=0; j < basisSet.size(); j++) {
    A.set(j,j,alpha[basisSet.get(j)]);
  }
}

protected void prune ( LinkedList < Integer > basisSet ) { double [ ] [ ] PHI_t_Array = new double [ basisSet . size ( ) ] [ ] ; for ( int j = 0 ; j < basisSet . size ( ) ; j ++ ) { PHI_t_Array [ j ] = phi [ basisSet . get ( j ) ] ; } PHI_t = new Matrix ( PHI_t_Array ) ; A = new Matrix ( basisSet . size ( ) , basisSet . size ( ) ) ; for ( int j = 0 ; j < basisSet . size ( ) ; j ++ ) { A . set ( j , j , alpha [ basisSet . get ( j ) ] ) ; } }
create pruned versions of all important matrices / vectors so that only rows / columns matching the indices in basisset are kept .
