slicing.cpp | slicing.cpp | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
// Set the upper right quadrant of A to an identity matrix | // Set the upper right quadrant of A to an identity matrix | |||
B = 1, 0, 0, | B = 1, 0, 0, | |||
0, 1, 0, | 0, 1, 0, | |||
0, 0, 1; | 0, 0, 1; | |||
A(Range(0,2), Range(3,5)) = B; | A(Range(0,2), Range(3,5)) = B; | |||
// Set the fourth row to 1 | // Set the fourth row to 1 | |||
A(3, Range::all()) = 1; | A(3, Range::all()) = 1; | |||
// Set the last two rows to 0 | // Set the last two rows to 0 | |||
A(Range(4, Range::toEnd), Range::all()) = 0; | A(Range(4, toEnd), Range::all()) = 0; | |||
// Set the bottom right element to 8 | // Set the bottom right element to 8 | |||
A(5,5) = 8; | A(5,5) = 8; | |||
cout << "A = " << A << endl; | cout << "A = " << A << endl; | |||
return 0; | return 0; | |||
} | } | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |