ARTS  2.2.66
poly_roots.cc File Reference

Contains the code to determine roots of polynomials. More...

#include <iostream>
#include <cmath>
#include <stdexcept>
#include "poly_roots.h"

Go to the source code of this file.

Classes

struct  gsl_poly_complex_workspace
 

Macros

#define MAT(m, i, j, n)   ((m)[(i)*(n) + (j)])
 
#define FMAT(m, i, j, n)   ((m)[((i)-1)*(n) + ((j)-1)])
 
#define GSL_DBL_EPSILON   2.2204460492503131e-16
 
#define RADIX   2
 
#define RADIX2   (RADIX*RADIX)
 
#define GSL_SUCCESS   0
 
#define GSL_FAILURE   -1
 
#define GSL_EINVAL   4
 
#define GSL_EFAILED   5
 
#define GSL_SET_COMPLEX_PACKED(zp, n, x, y)   do {*((zp)+2*(n))=(x); *((zp)+(2*(n)+1))=(y);} while(0)
 

Typedefs

typedef double * gsl_complex_packed_ptr
 

Functions

int poly_root_solve (Matrix &roots, Vector &coeffs)
 

Detailed Description

Contains the code to determine roots of polynomials.

Code was taken from the GNU Scientific library. http://sources.redhat.com/gsl/

Author
Oliver Lemke
Date
2002-03-06

Definition in file poly_roots.cc.

Macro Definition Documentation

◆ FMAT

#define FMAT (   m,
  i,
  j,
 
)    ((m)[((i)-1)*(n) + ((j)-1)])

Definition at line 50 of file poly_roots.cc.

◆ GSL_DBL_EPSILON

#define GSL_DBL_EPSILON   2.2204460492503131e-16

Definition at line 53 of file poly_roots.cc.

◆ GSL_EFAILED

#define GSL_EFAILED   5

Definition at line 61 of file poly_roots.cc.

◆ GSL_EINVAL

#define GSL_EINVAL   4

Definition at line 60 of file poly_roots.cc.

◆ GSL_FAILURE

#define GSL_FAILURE   -1

Definition at line 59 of file poly_roots.cc.

◆ GSL_SET_COMPLEX_PACKED

#define GSL_SET_COMPLEX_PACKED (   zp,
  n,
  x,
 
)    do {*((zp)+2*(n))=(x); *((zp)+(2*(n)+1))=(y);} while(0)

Definition at line 63 of file poly_roots.cc.

◆ GSL_SUCCESS

#define GSL_SUCCESS   0

Definition at line 58 of file poly_roots.cc.

◆ MAT

#define MAT (   m,
  i,
  j,
 
)    ((m)[(i)*(n) + (j)])

Definition at line 47 of file poly_roots.cc.

◆ RADIX

#define RADIX   2

Definition at line 55 of file poly_roots.cc.

◆ RADIX2

#define RADIX2   (RADIX*RADIX)

Definition at line 56 of file poly_roots.cc.

Typedef Documentation

◆ gsl_complex_packed_ptr

typedef double* gsl_complex_packed_ptr

Definition at line 66 of file poly_roots.cc.

Function Documentation

◆ poly_root_solve()

int poly_root_solve ( Matrix roots,
Vector coeffs 
)