Ejemplo n.º 1
0
        public void solve(T B, T X)
        {
            if (alg.modifiesB())
            {
                this.B    = UtilEjml.reshapeOrDeclare(this.B, B);
                this.B.To = B;
                B         = this.B;
            }

            alg.solve(B, X);
        }
Ejemplo n.º 2
0
        public virtual void solve(T B, T X)
        {
            if (alg.modifiesB())
            {
                if (this.B == null)
                {
                    this.B = (T)B.copy();
                }
                else
                {
                    if (this.B.getNumRows() != B.getNumRows() || this.B.getNumCols() != B.getNumCols())
                    {
                        this.B.reshape(A.getNumRows(), B.getNumCols());
                    }
                    this.B.set(B);
                }
                B = this.B;
            }

            alg.solve(B, X);
        }