From: Richard Kreckel Date: Mon, 24 Jan 2000 22:15:31 +0000 (+0000) Subject: - added missing method matrix::op() X-Git-Tag: release_0-5-0~41 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=b810b012f15981b0937fca5385a8fa2428180a6e - added missing method matrix::op() --- diff --git a/ginac/matrix.cpp b/ginac/matrix.cpp index 4a55ef1f..9bcab8bd 100644 --- a/ginac/matrix.cpp +++ b/ginac/matrix.cpp @@ -204,6 +204,12 @@ unsigned matrix::nops() const return row*col; } +/** returns matrix entry at position (i/col, i%col). */ +ex matrix::op(int i) const +{ + return m[i]; +} + /** returns matrix entry at position (i/col, i%col). */ ex & matrix::let_op(int i) { diff --git a/ginac/matrix.h b/ginac/matrix.h index 1b454a78..23d2a475 100644 --- a/ginac/matrix.h +++ b/ginac/matrix.h @@ -65,6 +65,7 @@ public: void print(ostream & os, unsigned upper_precedence=0) const; void printraw(ostream & os) const; unsigned nops() const; + ex op(int i) const; ex & let_op(int i); ex expand(unsigned options=0) const; bool has(const ex & other) const;