Changes made in dsp/fourier/internal/fftpack break the formatting used
there, so these are reverted. There will be complaints in CI.
[git-generate]
gofmt -w .
go generate gonum.org/v1/gonum/blas
go generate gonum.org/v1/gonum/blas/gonum
go generate gonum.org/v1/gonum/unit
go generate gonum.org/v1/gonum/unit/constant
go generate gonum.org/v1/gonum/graph/formats/dot
go generate gonum.org/v1/gonum/graph/formats/rdf
go generate gonum.org/v1/gonum/stat/card
git checkout -- dsp/fourier/internal/fftpack
This avoids the confusion between Zero() and IsZero() which sounds like they should be related
to one another but are not. This makes IsEmpty the counterpart to Reset. Add check for Zero in allMatrix
Fixes#1083.
Updates #1081.
Also,
- make tricky shadowing conversion from a SymDense to a TriDense more
explicit in Cholesky.ToSym,
- add a benchmark for InverseTo:
name old time/op new time/op delta
CholeskyInverseTo/n=10-4 10.8µs ± 2% 3.2µs ± 1% -70.16% (p=0.008 n=5+5)
CholeskyInverseTo/n=100-4 1.07ms ± 2% 0.51ms ± 2% -52.06% (p=0.008 n=5+5)
CholeskyInverseTo/n=1000-4 713ms ± 1% 315ms ± 1% -55.83% (p=0.008 n=5+5)
blas64: add length field N to Vector
Alongside, fix the implementation of mat.VecDense and mat.Diagonal, as well as other changes needed to fix this change.
Fixes#736.
Reorder vector and matrix struct fields to match the order in which BLAS
routines accept them. This makes calls with inline declarations with
unnamed fields consistent and easier to understand.
Replacement of isZero method calls elsewhere is done to avoid conflating
the zero concept with what we are actually asking: "Do we need to make a
matrix here?"
* mat: Add RawU method to the Cholesky decomposition to directly expose the storage matrix
This is returned as Triangular rather than TriDense for two reasons
1) In the future, we may be able to optimize Cholesky, for instance by storing the decomposition as a banded matrix if the factorized matrix was banded. Returning as Triangular allows this to be robust to future modifications of Cholesky.
2) Normally one wants to return concrete types to allow maximum flexibility is using them, for example avoiding interface assertions. However, the opposite is true here. The user should not modify the returned data, and by returning a Triangular rather than a TriDense, this forces tricky code in order to be able to modify the returned matrix.
Fixes#270.