public NonNegLsSolver(int numIsos, int maxRows, int maxTransitions, bool useFirstGuess = false)
        {
            _conditioner   = new WeightedConditioner();
            _firstGuess    = new DenseMatrix(numIsos, maxTransitions);
            _matrixAx      = new DenseMatrix(maxRows, maxTransitions);
            _matrixWs      = new DenseMatrix(numIsos, maxTransitions);
            _x             = new DenseMatrix(numIsos, 1);
            _z             = new DenseMatrix(numIsos, 1);
            _solutionCol   = new DenseVector(numIsos);
            _initializeCol = new DenseVector(numIsos);
            _binnedDataCol = new DenseVector(maxRows);
            _matrixAxCol   = new DenseVector(maxRows);
            _matrixWsCol   = new DenseVector(numIsos);
            _tol           = null;
            _maxIter       = null;
            _zSet          = new SizedSet(numIsos);
            _pSet          = new SizedSet(numIsos);
            _colMatrixB    = new DenseMatrix(maxRows, 1);
            _w             = new DenseMatrix(numIsos, 1);
            _matrixAxC     = new DenseMatrix(maxRows, 1);
            _matrixDiff    = new DenseMatrix(maxRows, 1);
            _matrixDiffBig = new DenseMatrix(maxRows, maxTransitions);
            _useFirstGuess = useFirstGuess;

            SetMathNetParameters();
        }
 private Matrix <double> GetMatrixColumns(Matrix <double> input, SizedSet columns)
 {
     double[,] matrixData = new double[input.RowCount, columns.Count];
     for (int row = 0; row < input.RowCount; ++row)
     {
         int destColumn = 0;
         foreach (var column in columns)
         {
             matrixData[row, destColumn++] = input[row, column];
         }
     }
     return(DenseMatrix.OfArray(matrixData));
 }