mat: check validity in Cholesky.Cond
MODIFY
mat/cholesky.go
mat/cholesky.go
@@ -60,6 +60,9 @@ func (c *Cholesky) updateCond(norm float64) {
// Cond returns the condition number of the factorized matrix.
func (c *Cholesky) Cond() float64 {
+ if !c.valid() {
+ panic(badCholesky)
+ }
return c.cond
}

mat: check validity in Cholesky.Cond