Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
vnl_cpoly_roots Class Reference

Find all the roots of a univariate polynomial with complex coefficients. More...

#include <vnl_cpoly_roots.h>

Public Member Functions

 vnl_cpoly_roots (vnl_vector< std::complex< double > > const &a)
 
 vnl_cpoly_roots (vnl_vector< double > const &a_real, vnl_vector< double > const &a_imag)
 

Public Attributes

vnl_vector< std::complex< double > > solns
 

Private Member Functions

void compute (vnl_vector< std::complex< double > > const &a)
 does the actual work. More...
 

Private Attributes

unsigned N
 

Detailed Description

Find all the roots of a univariate polynomial with complex coefficients.

Class to find all the roots of a univariate polynomial f with complex coefficients. Currently works by computing the eigenvalues of the companion matrix of f.

The input vector a of coefficients are given to the constructor. The polynomial is f = t^N + a[0] t^{N-1} + ... + a[N-1] The roots can then be found in the 'solns' member.

Definition at line 30 of file vnl_cpoly_roots.h.

Constructor & Destructor Documentation

◆ vnl_cpoly_roots() [1/2]

vnl_cpoly_roots::vnl_cpoly_roots ( vnl_vector< std::complex< double > > const &  a)

Definition at line 27 of file vnl_cpoly_roots.cxx.

◆ vnl_cpoly_roots() [2/2]

vnl_cpoly_roots::vnl_cpoly_roots ( vnl_vector< double > const &  a_real,
vnl_vector< double > const &  a_imag 
)

Definition at line 34 of file vnl_cpoly_roots.cxx.

Member Function Documentation

◆ compute()

void vnl_cpoly_roots::compute ( vnl_vector< std::complex< double > > const &  a)
private

does the actual work.

Definition at line 8 of file vnl_cpoly_roots.cxx.

Member Data Documentation

◆ N

unsigned vnl_cpoly_roots::N
private

Definition at line 41 of file vnl_cpoly_roots.h.

◆ solns

vnl_vector<std::complex<double> > vnl_cpoly_roots::solns

Definition at line 38 of file vnl_cpoly_roots.h.


The documentation for this class was generated from the following files: