null consturctor A(): (0x0) Indeces: (0,0) (0,0) #ref: 1 shallow:0 (int, int) constructor C(M,N): (10x10) Indeces: (0,9) (0,9) #ref: 1 shallow:0 X(const &X) constructor D(C) :(10x10) Indeces: (0,9) (0,9) #ref: 2 shallow:0 L(O(Index(2,4),Index(2,8))) L: (3x7) Indeces: (0,2) (0,6) #ref: 1 shallow:0 K.copy(L) K: (3x7) Indeces: (0,2) (0,6) #ref: 1 shallow:0 K: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 create indices I=(2,9), J=(1,9) X(const &X) constructor with submatrices E(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 test operator(int, int) Initalize C(i,j) = i + j/100.0 C: (10x10) Indeces: (0,9) (0,9) #ref: 2 shallow:0 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 3 3.01 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 4 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 5 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 6 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 operator(Index, Index) C(I,J) (8x9) Indeces: (0,7) (0,8) #ref: 0 shallow:0 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 3.01 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 test missing indices (default to whole row or column C(Index(),J) (10x9) Indeces: (0,9) (0,8) #ref: 0 shallow:0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 3.01 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 C(I,Index()) (8x10) Indeces: (0,7) (0,9) #ref: 0 shallow:0 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 3 3.01 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 4 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 5 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 6 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 F.ref(C(I,J)) (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 F: 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 4.44 operator=() E = F : (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 operator=(const Matrix&) D = C : (10x10) Indeces: (0,9) (0,9) #ref: 2 shallow:0 0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 1 1.01 1.02 1.03 1.04 1.05 1.06 1.07 1.08 1.09 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 3 3.01 3.02 3.03 3.04 3.05 3.06 3.07 3.08 3.09 4 4.01 4.02 4.03 4.04 4.05 4.06 4.07 4.08 4.09 5 5.01 5.02 5.03 5.04 5.05 5.06 5.07 5.08 5.09 6 6.01 6.02 6.03 6.04 6.05 6.06 6.07 6.08 6.09 7 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 8 8.01 8.02 8.03 8.04 8.05 8.06 8.07 8.08 8.09 9 9.01 9.02 9.03 9.04 9.05 9.06 9.07 9.08 9.09 test automatic destructuion of temporaries: B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 B.ref(C(I,J)): (8x9) Indeces: (0,7) (0,8) #ref: 1 shallow:0 test C.ref(C) case works correctly. C.ref(C) (10x10) Indeces: (0,9) (0,9) #ref: 2 shallow:0