#ifndef __Matrice_H__
#define __Matrice_H__

#include <iostream>
#include <assert.h>
#include "vecteur.h"

using namespace std;


class Matrice
{
public :
    Matrice (int lignes = 100, int colonnes = 100);
    Matrice (const Matrice & x);
    ~ Matrice ();

    int getLignes () const
    {
        return _lignes;
    }

    int getColonnes () const
    {
        return _colonnes;
    }

    Matrice & operator= (const Matrice & x);

    // retour référence sur un vecteur constant
    // moins coûteux qu'un vecteur en retour
    // car ceci nécessite une copie via le constructeur de copie
    // Vecteur operator[] (int i) const; // R_Value
    const Vecteur & operator[] (int i) const; // R_Value
    Vecteur & operator[] (int i); // L_Value

    int operator()(int i, int j) const; // R_Value
    int & operator()(int i, int j); // L_Value

    Matrice  operator+ (const Matrice  & x)const;
    Matrice operator- ( ) const;
    Matrice operator* (const Matrice  & x) const;

    friend ostream & operator<< (ostream & os, const Matrice & x);
    friend istream & operator>> (istream & is, Matrice & x);

private :
    const int _lignes;
    const int _colonnes;
    Vecteur ** t;
};

#endif
