13 for (
unsigned i=0; i<
N-1; ++i)
15 for (
unsigned i=0; i<
N; ++i)
16 comp(i,
N-1) = -a[
N-1-i];
23 std::cerr <<
"s = " <<
solns <<
'\n';
36 : solns(a_real.size())
39 assert(a_real.
size() == a_imag.
size());
41 for (
unsigned i=0; i<
N; ++i)
42 a[i] = std::complex<double>(a_real[i], a_imag[i]);
45 std::cerr <<
"a = " << a <<
'\n';
void compute(vnl_vector< std::complex< double > > const &a)
does the actual work.
size_t size() const
Return the length, number of elements, dimension of this vector.
finds roots of a univariate polynomial with complex coefficients
Calculates eigenvalues and eigenvectors of a square complex matrix.
An ordinary mathematical matrix.
vnl_matrix & fill(T const &)
Sets all elements of matrix to specified value, and returns "*this".
Mathematical vector class, templated by type of element.
Calculates eigenvalues and eigenvectors of a square complex matrix.
vnl_vector< std::complex< double > > solns
vnl_vector< std::complex< double > > W
vnl_cpoly_roots(vnl_vector< std::complex< double > > const &a)