Revision 8208cc49
| utility/matrix.h | ||
|---|---|---|
| 40 | 40 | 
    memset(_cell, 0, N*N*sizeof(double));  | 
| 41 | 41 | 
    }  | 
| 42 | 42 | 
     | 
| 43 | 
        Matrix(const Matrix &v)
   | 
|
| 43 | 
        Matrix(const Matrix &m)
   | 
|
| 44 | 44 | 
        {
   | 
| 45 | 45 | 
    _cell = &_cell_data[0];  | 
| 46 | 
            for (int x = 0; x < N; x++ )
   | 
|
| 46 | 
            for (int ij = 0; ij < N*N; ++ij)
   | 
|
| 47 | 47 | 
            {
   | 
| 48 | 
    for(int y = 0; y < N; y++)  | 
|
| 49 | 
                {
   | 
|
| 50 | 
    _cell[x*N+y] = v._cell[x*N+y];  | 
|
| 51 | 
    }  | 
|
| 48 | 
    _cell_data[ij] = m._cell_data[ij];  | 
|
| 52 | 49 | 
    }  | 
| 53 | 50 | 
    }  | 
| 54 | 51 | 
     | 
| ... | ... | |
| 56 | 53 | 
        {
   | 
| 57 | 54 | 
    }  | 
| 58 | 55 | 
     | 
| 59 | 
        void operator = (Matrix m)
   | 
|
| 56 | 
        Matrix& operator=(const Matrix& m)
   | 
|
| 60 | 57 | 
        {
   | 
| 61 | 
            for(int x = 0; x < N; x++)
   | 
|
| 58 | 
            for (int ij = 0; ij < N*N; ++ij)
   | 
|
| 62 | 59 | 
            {
   | 
| 63 | 
    for(int y = 0; y < N; y++)  | 
|
| 64 | 
                {
   | 
|
| 65 | 
    cell(x, y) = m.cell(x, y);  | 
|
| 66 | 
    }  | 
|
| 60 | 
    _cell_data[ij] = m._cell_data[ij];  | 
|
| 67 | 61 | 
    }  | 
| 68 | 62 | 
    }  | 
| 69 | 63 | 
     | 
Also available in: Unified diff