From b810b012f15981b0937fca5385a8fa2428180a6e Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Mon, 24 Jan 2000 22:15:31 +0000 Subject: [PATCH] - added missing method matrix::op() --- ginac/matrix.cpp | 6 ++++++ ginac/matrix.h | 1 + 2 files changed, 7 insertions(+) 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; -- 2.47.0