mat: rename NewDiagonal to NewDiagDense

This commit is contained in:
Dan Kortschak
2018-12-14 20:48:51 +10:30
parent c64a0a7fc7
commit 9d66d7e8f5
5 changed files with 12 additions and 12 deletions

View File

@@ -73,10 +73,10 @@ type DiagDense struct {
mat blas64.Vector
}
// NewDiagonal creates a new Diagonal matrix with n rows and n columns.
// The length of data must be n or data must be nil, otherwise NewDiagonal
// will panic. NewDiagonal will panic if n is zero.
func NewDiagonal(n int, data []float64) *DiagDense {
// NewDiagDense creates a new Diagonal matrix with n rows and n columns.
// The length of data must be n or data must be nil, otherwise NewDiagDense
// will panic. NewDiagDense will panic if n is zero.
func NewDiagDense(n int, data []float64) *DiagDense {
if n <= 0 {
if n == 0 {
panic(ErrZeroLength)