code: public static final DoubleMatrix2D fillSubdiagonalSymmetricMatrix(DoubleMatrix2D S){
  
  		if(S.rows() != S.columns()){
  			throw new IllegalArgumentException("Not square matrix");
  		}
  
  		boolean isSparse = S instanceof SparseDoubleMatrix2D;
  		DoubleFactory2D F2D = (isSparse)? DoubleFactory2D.sparse: DoubleFactory2D.dense;
  		final DoubleMatrix2D SFull = F2D.make(S.rows(), S.rows());
  
  		if (isSparse) {
  			S.forEachNonZero(new IntIntDoubleFunction() {
  				@Override
  				public double apply(int i, int j, double hij) {
  					SFull.setQuick(i, j, hij);
  					SFull.setQuick(j, i, hij);
  					return hij;
  				}
  			});
  		} else {
  			for (int i = 0; i < S.rows(); i++) {
  				for (int j = 0; j < i + 1; j++) {
  					double sij = S.getQuick(i, j);
  					SFull.setQuick(i, j, sij);
  					SFull.setQuick(j, i, sij);
  				}
  			}
  		}
  
  		return SFull;
  	}
docs: Given a symm matrix S that stores just its subdiagonal elements,
  reconstructs the full symmetric matrix.
  @FIXME: evitare il doppio setQuick