Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Geom::Poly Class Reference

Polynomial in canonical (monomial) basis. More...

#include <polynomial.h>

Inheritance diagram for Geom::Poly:

Public Member Functions

unsigned degree () const
 
Poly operator+ (const Poly &p) const
 
Poly operator- (const Poly &p) const
 
Poly operator-= (const Poly &p)
 
Poly operator- (const double k) const
 
Poly operator- () const
 
Poly operator* (const double p) const
 
Poly shifted (unsigned const terms) const
 
Poly operator* (const Poly &p) const
 
template<typename T >
eval (T x) const
 
template<typename T >
operator() (T t) const
 
void normalize ()
 
void monicify ()
 
 Poly ()
 
 Poly (const Poly &p)
 
 Poly (const double a)
 
template<class T , class U >
void val_and_deriv (T x, U &pd) const
 

Static Public Member Functions

static Poly linear (double ax, double b)
 

Detailed Description

Polynomial in canonical (monomial) basis.

Definition at line 50 of file polynomial.h.

Constructor & Destructor Documentation

◆ Poly() [1/3]

Geom::Poly::Poly ( )
inline

Definition at line 164 of file polynomial.h.

◆ Poly() [2/3]

Geom::Poly::Poly ( const Poly p)
inline

Definition at line 165 of file polynomial.h.

◆ Poly() [3/3]

Geom::Poly::Poly ( const double  a)
inline

Definition at line 166 of file polynomial.h.

Member Function Documentation

◆ degree()

unsigned Geom::Poly::degree ( ) const
inline

Definition at line 55 of file polynomial.h.

References size.

Referenced by Geom::divide(), operator*(), and Geom::solve().

◆ eval()

template<typename T >
T Geom::Poly::eval ( x) const
inline

Definition at line 150 of file polynomial.h.

References size.

Referenced by operator()().

◆ linear()

static Poly Geom::Poly::linear ( double  ax,
double  b 
)
inlinestatic

Definition at line 189 of file polynomial.h.

Referenced by main().

◆ monicify()

void Geom::Poly::monicify ( )

Definition at line 72 of file polynomial.cpp.

References normalize(), scale, and size.

◆ normalize()

void Geom::Poly::normalize ( )

Definition at line 67 of file polynomial.cpp.

Referenced by Geom::divide(), monicify(), Geom::sbasis_to_poly(), and Geom::solve().

◆ operator()()

template<typename T >
T Geom::Poly::operator() ( t) const
inline

Definition at line 159 of file polynomial.h.

References eval().

◆ operator*() [1/2]

Poly Geom::Poly::operator* ( const double  p) const
inline

Definition at line 124 of file polynomial.h.

References result, and size.

◆ operator*() [2/2]

Poly Geom::Poly::operator* ( const Poly p) const

Definition at line 51 of file polynomial.cpp.

References degree(), result, and size.

◆ operator+()

Poly Geom::Poly::operator+ ( const Poly p) const
inline

Definition at line 60 of file polynomial.h.

References result, and size.

◆ operator-() [1/3]

Poly Geom::Poly::operator- ( ) const
inline

Definition at line 115 of file polynomial.h.

References result, and size.

◆ operator-() [2/3]

Poly Geom::Poly::operator- ( const double  k) const
inline

Definition at line 104 of file polynomial.h.

References result, and size.

◆ operator-() [3/3]

Poly Geom::Poly::operator- ( const Poly p) const
inline

Definition at line 76 of file polynomial.h.

References result, and size.

◆ operator-=()

Poly Geom::Poly::operator-= ( const Poly p)
inline

Definition at line 92 of file polynomial.h.

References resize(), and size.

◆ shifted()

Poly Geom::Poly::shifted ( unsigned const  terms) const
inline

Definition at line 136 of file polynomial.h.

References result, and size.

Referenced by Geom::divide().

◆ val_and_deriv()

template<class T , class U >
void Geom::Poly::val_and_deriv ( x,
U &  pd 
) const
inline

Definition at line 170 of file polynomial.h.

References size.


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