ARTS  2.4.0(git:4fb77825)
poly_roots.cc File Reference

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

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

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)
 

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 46 of file poly_roots.cc.

◆ GSL_DBL_EPSILON

#define GSL_DBL_EPSILON   2.2204460492503131e-16

Definition at line 48 of file poly_roots.cc.

◆ GSL_EFAILED

#define GSL_EFAILED   5

Definition at line 56 of file poly_roots.cc.

◆ GSL_EINVAL

#define GSL_EINVAL   4

Definition at line 55 of file poly_roots.cc.

◆ GSL_FAILURE

#define GSL_FAILURE   -1

Definition at line 54 of file poly_roots.cc.

◆ GSL_SET_COMPLEX_PACKED

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

Definition at line 58 of file poly_roots.cc.

◆ GSL_SUCCESS

#define GSL_SUCCESS   0

Definition at line 53 of file poly_roots.cc.

◆ MAT

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

Definition at line 43 of file poly_roots.cc.

◆ RADIX

#define RADIX   2

Definition at line 50 of file poly_roots.cc.

◆ RADIX2

#define RADIX2   (RADIX * RADIX)

Definition at line 51 of file poly_roots.cc.

Typedef Documentation

◆ gsl_complex_packed_ptr

typedef double* gsl_complex_packed_ptr

Definition at line 64 of file poly_roots.cc.

Function Documentation

◆ poly_root_solve()

int poly_root_solve ( Matrix roots,
Vector coeffs 
)

Definition at line 90 of file poly_roots.cc.

Referenced by main(), rslope_crossing2d(), and rslope_crossing3d().

ARTS::Var::y
Vector y(Workspace &ws) noexcept
Definition: autoarts.h:7401
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346