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

Solves for roots of system of real polynomials. More...

#include <vnl_rnpoly_solve.h>

Public Member Functions

 vnl_rnpoly_solve (std::vector< vnl_real_npolynomial * > ps)
 The constructor already does all the calculations. More...
 
 ~vnl_rnpoly_solve ()
 
std::vector< vnl_vector< double > * > real ()
 Array of real parts of roots. More...
 
std::vector< vnl_vector< double > * > imag ()
 Array of imaginary parts of roots. More...
 
std::vector< vnl_vector< double > * > realroots (double tol=1e-12)
 Return real roots only. More...
 

Private Member Functions

bool compute ()
 Compute roots using continuation algorithm. More...
 
void Read_Input (std::vector< unsigned int > &ideg, std::vector< unsigned int > &terms, std::vector< int > &polyn, std::vector< double > &coeff)
 This will read the input polynomials from a data file. More...
 

Private Attributes

std::vector< vnl_real_npolynomial * > ps_
 
std::vector< vnl_vector< double > * > r_
 
std::vector< vnl_vector< double > * > i_
 

Detailed Description

Solves for roots of system of real polynomials.

Calculates all the roots of a system of N polynomials in N variables through continuation. Adapted from the PARALLEL CONTINUATION algorithm, written by Darrell Stam, 1991, and further improved by Kriegman and Ponce, 1992.

Definition at line 34 of file vnl_rnpoly_solve.h.

Constructor & Destructor Documentation

◆ vnl_rnpoly_solve()

vnl_rnpoly_solve::vnl_rnpoly_solve ( std::vector< vnl_real_npolynomial * >  ps)
inline

The constructor already does all the calculations.

Definition at line 46 of file vnl_rnpoly_solve.h.

◆ ~vnl_rnpoly_solve()

vnl_rnpoly_solve::~vnl_rnpoly_solve ( )

Definition at line 759 of file vnl_rnpoly_solve.cxx.

Member Function Documentation

◆ compute()

bool vnl_rnpoly_solve::compute ( )
private

Compute roots using continuation algorithm.

Definition at line 765 of file vnl_rnpoly_solve.cxx.

◆ imag()

std::vector<vnl_vector<double>*> vnl_rnpoly_solve::imag ( )
inline

Array of imaginary parts of roots.

Definition at line 59 of file vnl_rnpoly_solve.h.

◆ Read_Input()

void vnl_rnpoly_solve::Read_Input ( std::vector< unsigned int > &  ideg,
std::vector< unsigned int > &  terms,
std::vector< int > &  polyn,
std::vector< double > &  coeff 
)
private

This will read the input polynomials from a data file.

Definition at line 721 of file vnl_rnpoly_solve.cxx.

◆ real()

std::vector<vnl_vector<double>*> vnl_rnpoly_solve::real ( )
inline

Array of real parts of roots.

Definition at line 56 of file vnl_rnpoly_solve.h.

◆ realroots()

std::vector< vnl_vector< double > * > vnl_rnpoly_solve::realroots ( double  tol = 1e-12)

Return real roots only.

Roots are real if the absolute value of their imaginary part is less than the optional argument tol, which defaults to 1e-12 [untested]

Definition at line 57 of file vnl_rnpoly_solve.cxx.

Member Data Documentation

◆ i_

std::vector<vnl_vector<double>*> vnl_rnpoly_solve::i_
private

Definition at line 39 of file vnl_rnpoly_solve.h.

◆ ps_

std::vector<vnl_real_npolynomial*> vnl_rnpoly_solve::ps_
private

Definition at line 37 of file vnl_rnpoly_solve.h.

◆ r_

std::vector<vnl_vector<double>*> vnl_rnpoly_solve::r_
private

Definition at line 38 of file vnl_rnpoly_solve.h.


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