all: update packages from mat64 to mat.

This mostly changes package name and code, but also fixes a couple of name clashes with the new package names
This commit is contained in:
Brendan Tracey
2017-06-13 10:28:21 -06:00
parent 3fa9374bd4
commit 0d639745f1
43 changed files with 607 additions and 610 deletions

View File

@@ -9,7 +9,7 @@ import (
"math"
"gonum.org/v1/gonum/diff/fd"
"gonum.org/v1/gonum/matrix/mat64"
"gonum.org/v1/gonum/mat"
)
func ExampleDerivative() {
@@ -53,12 +53,12 @@ func ExampleJacobian() {
dst[2] = 4*x[1]*x[1] - 2*x[2]
dst[3] = x[2] * math.Sin(x[0])
}
jac := mat64.NewDense(4, 3, nil)
jac := mat.NewDense(4, 3, nil)
fd.Jacobian(jac, f, []float64{1, 2, 3}, &fd.JacobianSettings{
Formula: fd.Central,
Concurrent: true,
})
fmt.Printf("J ≈ %.6v\n", mat64.Formatted(jac, mat64.Prefix(" ")))
fmt.Printf("J ≈ %.6v\n", mat.Formatted(jac, mat.Prefix(" ")))
// Output:
// J ≈ ⎡ 1 0 0⎤