algebraic lens distortion

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Defines
Functions
ami_pol.c File Reference

library to estimate real polynomial roots. More...

`#include "ami_pol.h"`
`#include "stdlib.h"`
`#include "stdio.h"`
Include dependency graph for ami_pol.c:

Go to the source code of this file.

## Functions
long double | ami_horner (long double *pol, int degree, long double x, long double *fp)
| function to evaluate a polynomial and its derivate using Horner Algorithm
long double | ami_root_bisection (long double *pol, int degree, long double a, long double b, long double TOL)
| function to compute the polynomial root in an interval. We use a combination of bisection and Newton-Raphson tecniques
int | ami_polynomial_root (double *pol, int degree, double *root_r, double *root_i)
| function to estimate real polynomial roots. We use a recursive procedure computing the derivative polynomial roots. This function only works for relative low polynomial degree

## Detailed Description

library to estimate real polynomial roots.

Author:
  Luis Alvarez

Definition in file ami_pol.c.

## Function Documentation

long double ami_horner | ( | long double * | pol,
|  | int | degree,
|  | long double | x,
|  | long double * | fp
| ) |  |

function to evaluate a polynomial and its derivate using Horner Algorithm

Returns:
  polynomial evaluation

Author:
  Luis Alvarez

Parameters:

  pol | coefficient polynomial vector pol[0]+pol[1]*x+pol[2]*x^2+...
  degree | polynomial degree
  x | point to evaluate the polynomial
  fp | output polynomial derivate evaluation

Definition at line 35 of file ami_pol.c.

Here is the caller graph for this function:

int ami_polynomial_root | ( | double * | pol,
|  | int | degree,
|  | double * | root_r,
|  | double * | root_i
| ) |  |

function to estimate real polynomial roots. We use a recursive procedure computing the derivative polynomial roots. This function only works for relative low polynomial degree

Returns:
  The number of real polynomial root

Author:
  Luis Alvarez

Parameters:

  pol | coefficient polynomial vector pol[degree]+pol[degree-1]*x+pol[degree-2]*x^2+... FOR HISTORICAL REASONS THE ORDER POLYNOMIAL COEFICIENT IS GIVEN IS DIFFERENT THAT IN THE OTHERS POLYNOMIAL FUNCTIONS
  degree | polynomial degree
  root_r | output real component of polynomial roots
  root_i | output complex component of polynomial roots. Since this function only real roots this complex part is fitted to 0. FOR HISTORICAL REASONS WE KEEP THIS COMPLEX PART IN THE FUNCTION

Definition at line 119 of file ami_pol.c.

Here is the call graph for this function:

Here is the caller graph for this function:

long double ami_root_bisection | ( | long double * | pol,
|  | int | degree,
|  | long double | a,
|  | long double | b,
|  | long double | TOL
| ) |  |

function to compute the polynomial root in an interval. We use a combination of bisection and Newton-Raphson tecniques

Returns:
  polynomial root in the interval

Author:
  Luis Alvarez

Parameters:

  pol | coefficient polynomial vector pol[0]+pol[1]*x+pol[2]*x^2+...
  degree | polynomial degree
  a | left interval extreme
  b | right interval extreme
  TOL | convergence accuracy

Definition at line 60 of file ami_pol.c.

Here is the call graph for this function:

Here is the caller graph for this function: