31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

integer vector M.col(int i) returns the i-th column of M (an n - vector).<br />

Precondition: 0 ≤ i ≤ m − 1.<br />

integer& M(int i, int j) returns M i,j .<br />

Precondition: 0 ≤ i ≤ n − 1 and 0 ≤ j ≤<br />

m − 1.<br />

Arithmetic Operators<br />

integer matrix<br />

M + const integer matrix& M1<br />

Addition.<br />

Precondition:<br />

M.dim1() == M1.dim1() and M.dim2() ==<br />

M1.dim2().<br />

integer matrix<br />

M − const integer matrix& M1<br />

Subtraction.<br />

Precondition:<br />

M.dim1() == M1.dim1() and M.dim2() ==<br />

M1.dim2().<br />

integer matrix<br />

M ∗ const integer matrix& M1<br />

Multiplication.<br />

Precondition:<br />

M.dim2() == M1.dim1().<br />

integer vector<br />

M ∗ const integer vector& vec<br />

Multiplication with vector.<br />

Precondition:<br />

M.dim2() == vec.dim().<br />

integer matrix<br />

const integer matrix& M ∗ const integer& x<br />

Multiplication of every entry with integer x.<br />

integer matrix<br />

const integer& x ∗ const integer matrix& M<br />

Multiplication of every entry with integer x.<br />

Non-Member Functions<br />

integer matrix transpose(const integer matrix& M)<br />

returns M T (m × n - matrix).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!