func (e *EigenSym) Factorize(a Symmetric, vectors bool) (ok bool) {
	// kill previous decomposition
	e.vectorsComputed = false
	e.values = e.values[:]

	n := a.Symmetric()
	sd := NewSymDense(n, nil)
	sd.CopySym(a)

	jobz := lapack.EVNone
	if vectors {
		jobz = lapack.EVCompute
	}
	w := make([]float64, n)
	work := []float64{0}
	lapack64.Syev(jobz, sd.mat, w, work, -1)

	work = getFloats(int(work[0]), false)
	ok = lapack64.Syev(jobz, sd.mat, w, work, len(work))
	putFloats(work)
	if !ok {
		e.vectorsComputed = false
		e.values = nil
		e.vectors = nil
		return false
	}
	e.vectorsComputed = vectors
	e.values = w
	e.vectors = NewDense(n, n, sd.mat.Data)
	return true
}
// Factorize computes the eigenvalue decomposition of the symmetric matrix a.
// The Eigen decomposition is defined as
//  A = P * D * P^-1
// where D is a diagonal matrix containing the eigenvalues of the matrix, and
// P is a matrix of the eigenvectors of A. Factorize computes the eigenvalues
// in ascending order. If the vectors input argument is false, the eigenvectors
// are not computed.
//
// Factorize returns whether the decomposition succeeded. If the decomposition
// failed, methods that require a successful factorization will panic.
Factorize computes the eigenvalue decomposition of the symmetric matrix a.
The Eigen decomposition is defined as
A = P * D * P^-1
where D is a diagonal matrix containing the eigenvalues of the matrix, and
P is a matrix of the eigenvectors of A. Factorize computes the eigenvalues
in ascending order. If the vectors input argument is false, the eigenvectors
are not computed.

Factorize returns whether the decomposition succeeded. If the decomposition
failed, methods that require a successful factorization will panic.
// Factorize computes the eigenvalue decomposition of the symmetric matrix a . // The Eigen decomposition is defined as // A = P * D * P^ - 1 // where D is a diagonal matrix containing the eigenvalues of the matrix and // P is a matrix of the eigenvectors of A . Factorize computes the eigenvalues // in ascending order . If the vectors input argument is false the eigenvectors // are not computed . // // Factorize returns whether the decomposition succeeded . If the decomposition // failed methods that require a successful factorization will panic .
func (e *EigenSym) Factorize(a Symmetric, vectors bool) (ok bool) {
	e.vectorsComputed = false
	e.values = e.values[:]
	n := a.Symmetric()
	sd := NewSymDense(n, nil)
	sd.CopySym(a)
	jobz := lapack.EVNone
	if vectors {
		jobz = lapack.EVCompute
	}
	w := make([]float64, n)
	work := []float64{0}
	lapack64.Syev(jobz, sd.mat, w, work, -1)
	work = getFloats(int(work[0]), false)
	ok = lapack64.Syev(jobz, sd.mat, w, work, len(work))
	putFloats(work)
	if !ok {
		e.vectorsComputed = false
		e.values = nil
		e.vectors = nil
		return false
	}
	e.vectorsComputed = vectors
	e.values = w
	e.vectors = NewDense(n, n, sd.mat.Data)
	return true
}
func ( e * EigenSym ) Factorize ( a Symmetric , vectors bool ) ( ok bool ) { e . vectorsComputed = false e . values = e . values [ : ] n := a . Symmetric ( ) sd := NewSymDense ( n , nil ) sd . CopySym ( a ) jobz := lapack . EVNone if vectors { jobz = lapack . EVCompute } w := make ( [ ] float64 , n ) work := [ ] float64 { 0 } lapack64 . Syev ( jobz , sd . mat , w , work , - 1 ) work = getFloats ( int ( work [ 0 ] ) , false ) ok = lapack64 . Syev ( jobz , sd . mat , w , work , len ( work ) ) putFloats ( work ) if ! ok { e . vectorsComputed = false e . values = nil e . vectors = nil return false } e . vectorsComputed = vectors e . values = w e . vectors = NewDense ( n , n , sd . mat . Data ) return true }
Factorize computes the eigenvalue decomposition of the symmetric matrix a.
Factorize computes the eigenvalue decomposition of the symmetric matrix a .
// kill previous decomposition