]>
Dogcows Code - chaz/yoink/blob - matrix.hpp
9a0fa69c46fe7c36cbb1a753c5fbbf82314777e8
3 ////////////////////////////////////////////////////////////////////////////////
5 // Author: Andy Rushton
6 // Copyright: (c) Southampton University 1999-2004
7 // (c) Andy Rushton 2004-2009
8 // License: BSD License, see ../docs/license.html
10 // General-purpose 2D matrix data structure
12 ////////////////////////////////////////////////////////////////////////////////
13 #include "containers_fixes.hpp"
19 ////////////////////////////////////////////////////////////////////////////////
21 template<typename T
> class matrix
24 matrix(unsigned rows
= 0, unsigned cols
= 0, const T
& fill
= T()) throw();
25 ~matrix(void) throw();
27 matrix(const matrix
&) throw();
28 matrix
& operator =(const matrix
&) throw();
30 void resize(unsigned rows
, unsigned cols
, const T
& fill
= T()) throw();
32 unsigned rows(void) const throw();
33 unsigned columns(void) const throw();
35 void erase(const T
& fill
= T()) throw();
36 void erase(unsigned row
, unsigned col
, const T
& fill
= T()) throw(std::out_of_range
);
37 void insert(unsigned row
, unsigned col
, const T
&) throw(std::out_of_range
);
38 const T
& item(unsigned row
, unsigned col
) const throw(std::out_of_range
);
39 T
& item(unsigned row
, unsigned col
) throw(std::out_of_range
);
40 const T
& operator()(unsigned row
, unsigned col
) const throw(std::out_of_range
);
41 T
& operator()(unsigned row
, unsigned col
) throw(std::out_of_range
);
43 void fill(const T
& item
= T()) throw();
44 void fill_column(unsigned col
, const T
& item
= T()) throw(std::out_of_range
);
45 void fill_row(unsigned row
, const T
& item
= T()) throw(std::out_of_range
);
46 void fill_leading_diagonal(const T
& item
= T()) throw();
47 void fill_trailing_diagonal(const T
& item
= T()) throw();
48 void make_identity(const T
& one
, const T
& zero
= T()) throw();
50 void transpose(void) throw();
58 ////////////////////////////////////////////////////////////////////////////////
60 } // end namespace stlplus
This page took 0.040591 seconds and 3 git commands to generate.