]>
Dogcows Code - chaz/yoink/blob - src/Moof/stlplus/matrix.hpp
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"
18 ////////////////////////////////////////////////////////////////////////////////
20 template<typename T
> class matrix
23 matrix(unsigned rows
= 0, unsigned cols
= 0, const T
& fill
= T()) throw();
24 ~matrix(void) throw();
26 matrix(const matrix
&) throw();
27 matrix
& operator =(const matrix
&) throw();
29 void resize(unsigned rows
, unsigned cols
, const T
& fill
= T()) throw();
31 unsigned rows(void) const throw();
32 unsigned columns(void) const throw();
34 void erase(const T
& fill
= T()) throw();
35 void erase(unsigned row
, unsigned col
, const T
& fill
= T()) throw(std::out_of_range
);
36 void insert(unsigned row
, unsigned col
, const T
&) throw(std::out_of_range
);
37 const T
& item(unsigned row
, unsigned col
) const throw(std::out_of_range
);
38 T
& item(unsigned row
, unsigned col
) throw(std::out_of_range
);
39 const T
& operator()(unsigned row
, unsigned col
) const throw(std::out_of_range
);
40 T
& operator()(unsigned row
, unsigned col
) throw(std::out_of_range
);
42 void fill(const T
& item
= T()) throw();
43 void fill_column(unsigned col
, const T
& item
= T()) throw(std::out_of_range
);
44 void fill_row(unsigned row
, const T
& item
= T()) throw(std::out_of_range
);
45 void fill_leading_diagonal(const T
& item
= T()) throw();
46 void fill_trailing_diagonal(const T
& item
= T()) throw();
47 void make_identity(const T
& one
, const T
& zero
= T()) throw();
49 void transpose(void) throw();
57 ////////////////////////////////////////////////////////////////////////////////
59 } // end namespace stlplus
This page took 0.03939 seconds and 4 git commands to generate.