mat: rename Tridiag.Clone to CloneFromTridiag
MODIFY
mat/list_test.go
mat/list_test.go
@@ -848,6 +848,10 @@ func makeCopyOf(a Matrix) Matrix {
}
copy(d.mat.Data, diag.mat.Data)
return returnAs(d, t)
+ case *Tridiag:
+ var m Tridiag
+ m.CloneFromTridiag(a.(*Tridiag))
+ return returnAs(&m, t)
}
}

MODIFY
mat/tridiag.go
mat/tridiag.go
@@ -129,10 +129,10 @@ func (a *Tridiag) Reset() {
a.mat.DU = a.mat.DU[:0]
}
-// Clone makes a copy of the input Tridiag into the receiver, overwriting the
-// previous value of the receiver. Clone does not place any restrictions on
-// receiver shape.
-func (a *Tridiag) Clone(from *Tridiag) {
+// CloneFromTridiag makes a copy of the input Tridiag into the receiver,
+// overwriting the previous value of the receiver. CloneFromTridiag does not
+// place any restrictions on receiver shape.
+func (a *Tridiag) CloneFromTridiag(from *Tridiag) {
n := from.mat.N
switch n {
case 0:
@@ -232,7 +232,7 @@ func (a *Tridiag) SolveTo(dst *Dense, trans bool, b Matrix) error {
dst.Copy(b)
}
var aCopy Tridiag
- aCopy.Clone(a)
+ aCopy.CloneFromTridiag(a)
var ok bool
if trans {
ok = lapack64.Gtsv(blas.Trans, aCopy.mat, dst.mat)
@@ -263,7 +263,7 @@ func (a *Tridiag) SolveVecTo(dst *VecDense, trans bool, b Vector) error {
dst.CopyVec(b)
}
var aCopy Tridiag
- aCopy.Clone(a)
+ aCopy.CloneFromTridiag(a)
var ok bool
if trans {
ok = lapack64.Gtsv(blas.Trans, aCopy.mat, dst.asGeneral())

mat: rename Tridiag.Clone to CloneFromTridiag