1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| template <typename T> class matrice {
private:
//ce qui te semble utile
public:
typedef T element_t;
matrice(int hauteur, int largeur);//matrice vide
explicit matrice(int taille);//pour les matrices carrées vides
~matrice();
element_t& operator()(int ligne, int colonne);
const element_t& operator()(int ligne, int colonne) const;
int hauteur() const;
int largeur() const;
element_t discriminant() const
};
template<typename T> operator*(matrice<T> const & a, matrice<T> const & b);
template<typename T> matrice<T> operator+(matrice<T> const & a, matrice<T> const & b);
template<typename T> matrice<T> operator-(matrice<T> const & a, matrice<T> const & b);
template<typename T> std::vector<T> operator*(matrice<T> const & m, std::vector<T> const & v); |
Partager