Temporaneo per i test, ritorna i dati sotto forma di matrice.

@return
323475
public double[][] getResults() {
        double[][] results = new double[networkPipes.length][28];
        double[] one = new double[networkPipes.length];
        double[] two = new double[networkPipes.length];
        for( int i = 0; i < networkPipes.length; i++ ) {
            one[i] = i;
            two[i] = networkPipes[i].getId();

        }
        QuickSortAlgorithm t = new QuickSortAlgorithm(pm);
        t.sort(two, one);

        for( int i = 0; i < networkPipes.length; i++ ) {
            int index = (int) one[i];
            results[i][0] = networkPipes[index].getId();
            results[i][1] = networkPipes[index].getIdPipeWhereDrain();
            results[i][2] = networkPipes[index].getDrainArea();
            results[i][3] = networkPipes[index].getLenght();
            results[i][4] = networkPipes[index].getInitialElevation();
            results[i][5] = networkPipes[index].getFinalElevation();
            results[i][6] = networkPipes[index].getRunoffCoefficient();
            results[i][7] = networkPipes[index].getAverageResidenceTime();
            results[i][8] = networkPipes[index].getKs();
            results[i][9] = networkPipes[index].getMinimumPipeSlope();
            results[i][10] = networkPipes[index].getPipeSectionType();
            results[i][11] = networkPipes[index].getAverageSlope();
            results[i][12] = networkPipes[index].discharge;
            results[i][13] = networkPipes[index].coeffUdometrico;
            results[i][14] = networkPipes[index].residenceTime;
            results[i][15] = networkPipes[index].tP;
            results[i][16] = networkPipes[index].tQmax;
            results[i][17] = networkPipes[index].meanSpeed;
            results[i][18] = networkPipes[index].pipeSlope;
            results[i][19] = networkPipes[index].diameter;
            results[i][20] = networkPipes[index].emptyDegree;
            results[i][21] = networkPipes[index].depthInitialPipe;
            results[i][22] = networkPipes[index].depthFinalPipe;
            results[i][23] = networkPipes[index].initialFreesurface;
            results[i][24] = networkPipes[index].finalFreesurface;
            results[i][25] = networkPipes[index].totalSubNetArea;
            results[i][26] = networkPipes[index].meanLengthSubNet;
            results[i][27] = networkPipes[index].varianceLengthSubNet;

        }

        return results;
    }
1067062
public Matrix times(Matrix B) {
        Matrix A = this;
        if (A.N != B.M) {
            throw new RuntimeException("Illegal matrix dimensions.");
        }
        Matrix C = new Matrix(A.M, B.N);
        for (int i = 0; i < C.M; i++) {
            for (int j = 0; j < C.N; j++) {
                for (int k = 0; k < A.N; k++) {
                    C.data[i][j] += A.data[i][k] * B.data[k][j];
                }
            }
        }
        return C;
    }
836687
public T copy() {
        T ret = createLike();
        ret.getMatrix().set(this.getMatrix());
        return ret;
    }
49084
public DenseMatrix getS() {
        DenseMatrix S = Matrix.zeros(U.nrows(), V.nrows());

        for (int i = 0; i < s.length; i++) {
            S.set(i, i, s[i]);
        }

        return S;
    }
754383
public Vec[] getColumnMeanVariance()
    {
        final int d = getNumNumericalVars();
        Vec[] vecs = new Vec[] 
        {
            new DenseVector(d),
            new DenseVector(d)
        };
        
        Vec means = vecs[0];
        Vec stdDevs = vecs[1];
        
        MatrixStatistics.meanVector(means, this);
        MatrixStatistics.covarianceDiag(means, stdDevs, this);
        
        return vecs;
    }
128713
public Matrix4f getMatrix() {
        if (updateMatrix) {
            final Matrix4f matrix = Matrix4f.createScaling(scale.toVector4(1)).rotate(rotation).translate(position);
            if (parent == null) {
                this.matrix = matrix;
            } else {
                childMatrix = matrix;
            }
            updateMatrix = false;
        }
        if (parent != null) {
            final Matrix4f parentMatrix = parent.getMatrix();
            if (parentMatrix != lastParentMatrix) {
                matrix = parentMatrix.mul(childMatrix);
                lastParentMatrix = parentMatrix;
            }
        }
        return matrix;
    }
335811
public List<T> values() {
        List<T> result = new ArrayList<T>();
        for (Iterator<T> itr = iterator(); itr.hasNext(); ) {
            result.add(itr.next());
        }
        return result;
    }
411255
public Matrix getD()
    {
        Matrix X = new DenseMatrix(n, n);
        for (int i = 0; i < n; i++)
        {
            X.set(i, i, d[i]);
            
            if (e[i] > 0)
                X.set(i, i+1, e[i]);
            else if (e[i] < 0)
                X.set(i, i-1, e[i]);
        }
        return X;
    }
42936
public INDArray[] asArray() {
        val val = map.values();
        val res = new INDArray[val.size()];
        int cnt = 0;
        for (val v: val)
            res[cnt++] = v;

        return res;
    }
924434
@Nonnull
  @ReturnsMutableCopy
  public Matrix getH ()
  {
    final Matrix aNewMatrix = new Matrix (m_nRows, m_nCols);
    final double [] [] aNewArray = aNewMatrix.internalGetArray ();
    for (int nRow = 0; nRow < m_nRows; nRow++)
    {
      final double [] aSrcRow = m_aQR[nRow];
      final double [] aDstRow = aNewArray[nRow];
      for (int nCol = 0; nCol < m_nCols; nCol++)
      {
        aDstRow[nCol] = (nRow >= nCol ? aSrcRow[nCol] : 0d);
      }
    }
    return aNewMatrix;
  }
347831
public function getS()
    {
        for ($i = 0; $i < $this->n; ++$i) {
            for ($j = 0; $j < $this->n; ++$j) {
                $S[$i][$j] = 0.0;
            }
            $S[$i][$i] = $this->s[$i];
        }
        return new Matrix($S);
    }
1188044
public Matrix transpose()
    {
        final Matrix A = new Matrix(m_columns, m_rows);

        for (int i = 0; i < m_rows; i++)
        {
            for (int j = 0; j < m_columns; j++)
            {
                A.m_data[j][i] = this.m_data[i][j];
            }
        }
        return A;
    }
452307
@Nonnull
  @ReturnsMutableCopy
  public Matrix getD ()
  {
    final Matrix aNewMatrix = new Matrix (m_nDim, m_nDim);
    final double [] [] aNewArray = aNewMatrix.internalGetArray ();
    for (int nRow = 0; nRow < m_nDim; nRow++)
    {
      final double [] aDstRow = aNewArray[nRow];
      Arrays.fill (aDstRow, 0.0);
      aDstRow[nRow] = m_aEVd[nRow];

      final double dEVe = m_aEVe[nRow];
      if (dEVe > 0)
        aDstRow[nRow + 1] = dEVe;
      else
        if (dEVe < 0)
          aDstRow[nRow - 1] = dEVe;
    }
    return aNewMatrix;
  }
227397
public Matrix getIplus() {
        Matrix Iplus = new Matrix(size, size);
        int i, j;
        for (i = 0; i < size; i++)
            for (j = 0; j < size; j++)
                Iplus.matrix[i][j] = 0d;
        for (i = 1; i < size; i++)
            Iplus.matrix[i - 1][i] = Math.sqrt(J * J + J - (J - i + 1) * (J - i + 1) + (J - i + 1));
        return Iplus;
    }
1215386
function() {
      var determinant;
      determinant = this.a * this.d - this.b * this.c;
      return Matrix(this.d / determinant, -this.b / determinant, -this.c / determinant, this.a / determinant, (this.c * this.ty - this.d * this.tx) / determinant, (this.b * this.tx - this.a * this.ty) / determinant);
    }
273121
public function matmul(Matrix $b) : self
    {
        if ($this->n !== $b->m()) {
            throw new DimensionalityMismatchException('Matrix A requires'
                . " $this->n rows but Matrix B has {$b->m()}.");
        }

        $bT = $b->transpose();

        $c = [];

        foreach ($this->a as $row) {
            $temp = [];

            foreach ($bT as $column) {
                $sigma = 0;

                foreach ($row as $i => $value) {
                    $sigma += $value * $column[$i];
                }

                $temp[] = $sigma;
            }

            $c[] = $temp;
        }

        return self::quick($c);
    }
1271920
public Matrix3x2dStack pushMatrix() {
        if (curr == mats.length) {
            throw new IllegalStateException("max stack size of " + (curr + 1) + " reached"); //$NON-NLS-1$ //$NON-NLS-2$
        }
        mats[curr++].set(this);
        return this;
    }