Skip to content

Commit

Permalink
mat: make Diagonal satisfy Symmetric
Browse files Browse the repository at this point in the history
  • Loading branch information
kortschak committed Nov 20, 2018
1 parent c8e06d7 commit d752f8f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mat/diagonal.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ var (
// has non-zero terms on the diagonal.
type Diagonal interface {
Matrix
// Diag returns the number of rows/columns in the matrix
// Diag and Symmetric return the number of rows/columns in
// the matrix. Both methods are included to allow diagonal
// matrices to be used in functions taking symmetric inputs.
Diag() int
Symmetric() int
}

// MutableDiagonal is a Diagonal matrix whose elements can be set.
Expand Down

0 comments on commit d752f8f

Please sign in to comment.