func (lu *LU) Factorize(a Matrix) {
	lu.factorize(a, CondNorm)
}
Factorize computes the LU factorization of the square matrix a and stores the
result. The LU decomposition will complete regardless of the singularity of a.

The LU factorization is computed with pivoting, and so really the decomposition
is a PLU decomposition where P is a permutation matrix. The individual matrix
factors can be extracted from the factorization using the Permutation method
on Dense, and the LU LTo and UTo methods.
package mat
import (
	"math"
	"gonum.org/v1/gonum/blas"
	"gonum.org/v1/gonum/blas/blas64"
	"gonum.org/v1/gonum/floats"
	"gonum.org/v1/gonum/lapack"
	"gonum.org/v1/gonum/lapack/lapack64"
)
const (
	badSliceLength = "mat: improper slice length"
	badLU          = "mat: invalid LU factorization"
)
type LU struct {
	lu    *Dense
	pivot []int
	cond  float64
}
func (lu *LU) updateCond(anorm float64, norm lapack.MatrixNorm) {
	n := lu.lu.mat.Cols
	work := getFloats(4*n, false)
	defer putFloats(work)
	iwork := getInts(n, false)
	defer putInts(iwork)
	if anorm < 0 {
		u := lu.lu.asTriDense(n, blas.NonUnit, blas.Upper)
		l := lu.lu.asTriDense(n, blas.Unit, blas.Lower)
		unorm := lapack64.Lantr(norm, u.mat, work)
		lnorm := lapack64.Lantr(norm, l.mat, work)
		anorm = unorm * lnorm
	}
	v := lapack64.Gecon(norm, lu.lu.mat, anorm, work, iwork)
	lu.cond = 1 / v
}