Change Viewer interface to receiver assignment

This commit is contained in:
kortschak
2013-10-15 14:14:11 +10:30
parent 34da1fe0fb
commit 9184de1c41
2 changed files with 12 additions and 15 deletions

View File

@@ -78,11 +78,11 @@ type Copier interface {
// A Viewer can extract a submatrix view of of the receiver, starting at row i, column j
// and extending r rows and c columns. If i or j are out of range, or r or c extend beyond
// the bounds of the matrix View will panic with ErrIndexOutOfRange. Viewer must not return
// a copy of the submatrix; changes in the elements of the submatrix must be reflected in the
// original and vice versa.
// the bounds of the matrix View will panic with ErrIndexOutOfRange. View must retain the
// receiver's reference to the original matrix such that changes in the elements of the
// submatrix are reflected in the original and vice versa.
type Viewer interface {
View(i, j, r, c int) Blasser
View(i, j, r, c int)
}
// A Submatrixer can extract a copy of submatrix from a into the receiver, starting at row i,