Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Commit

Permalink
Change UseRawMatrix to SetRawMatrix
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Dec 18, 2014
1 parent 055fbcd commit 2e97541
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions mat64/dense.go
Expand Up @@ -50,8 +50,8 @@ var (
_ Equaler = matrix
_ ApproxEqualer = matrix

_ RawMatrixUser = matrix
_ RawMatrixer = matrix
_ RawMatrixSetter = matrix
_ RawMatrixer = matrix
)

type Dense struct {
Expand Down Expand Up @@ -80,7 +80,7 @@ func DenseCopyOf(a Matrix) *Dense {
return d
}

func (m *Dense) UseRawMatrix(b RawMatrix) { m.mat = b }
func (m *Dense) SetRawMatrix(b RawMatrix) { m.mat = b }

func (m *Dense) RawMatrix() RawMatrix { return m.mat }

Expand Down
8 changes: 4 additions & 4 deletions mat64/matrix.go
Expand Up @@ -258,10 +258,10 @@ type RawMatrix struct {
Data []float64
}

// A RawMatrixUser can directly attach a RawMatrix representation. There is no restriction on the shape of the
// receiver. Changes to the receiver's elements will be reflected in the RawMatrix.Data.
type RawMatrixUser interface {
UseRawMatrix(a RawMatrix)
// A RawMatrixSetter can set the underlying RawMatrix used by the reciever. There is no restriction
// on the shape of the receiver. Changes to the receiver's elements will be reflected in the RawMatrix.Data.
type RawMatrixSetter interface {
SetRawMatrix(a RawMatrix)
}

// A RawMatrixer can return a RawMatrix representation of the receiver. Changes to the RawMatrix.Data
Expand Down

0 comments on commit 2e97541

Please sign in to comment.