Revision a2da8ab6

View differences:

utility/matrix.h
36 36
public:
37 37
    Matrix()
38 38
    {
39
        int r = sizeof(double)*N;
40 39
        _cell = &_cell_data[0];
41
        memset(_cell, 0, r*r);
40
        memset(_cell, 0, N*N*sizeof(double));
42 41
    }
43 42

  
44 43
    Matrix(const Matrix &v)
45 44
    {
46
        int r = sizeof(double)*N;
47 45
        _cell = &_cell_data[0];
48
        memset(_cell, 0, r*r);
49 46
        for (int x = 0; x < N; x++ )
50 47
        {
51 48
            for(int y = 0; y < N; y++)

Also available in: Unified diff