Inkscape
Vector Graphics Editor
|
Polynomial in symmetric power basis. More...
#include <sbasis.h>
Public Types | |
typedef std::vector< Linear >::iterator | iterator |
typedef std::vector< Linear >::const_iterator | const_iterator |
typedef double | output_type |
Public Member Functions | |
size_t | size () const |
Linear | operator[] (unsigned i) const |
Linear & | operator[] (unsigned i) |
const_iterator | begin () const |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
bool | empty () const |
Linear & | back () |
Linear const & | back () const |
void | pop_back () |
void | resize (unsigned n) |
void | resize (unsigned n, Linear const &l) |
void | reserve (unsigned n) |
void | clear () |
void | insert (iterator before, const_iterator src_begin, const_iterator src_end) |
Linear & | at (unsigned i) |
bool | operator== (SBasis const &B) const |
bool | operator!= (SBasis const &B) const |
SBasis () | |
SBasis (double a) | |
SBasis (double a, double b) | |
SBasis (SBasis const &a) | |
SBasis (std::vector< Linear > ls) | |
SBasis (Linear const &bo) | |
SBasis (Linear *bo) | |
SBasis (size_t n, Linear const &l) | |
SBasis (Coord c0, Coord c1, Coord c2, Coord c3) | |
SBasis (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5) | |
SBasis (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5, Coord c6, Coord c7) | |
SBasis (Coord c0, Coord c1, Coord c2, Coord c3, Coord c4, Coord c5, Coord c6, Coord c7, Coord c8, Coord c9) | |
template<typename Iter > | |
SBasis (Iter first, Iter last) | |
bool | isZero (double eps=EPSILON) const |
bool | isConstant (double eps=EPSILON) const |
bool | isFinite () const |
test all coefficients are finite | |
Coord | at0 () const |
Coord & | at0 () |
Coord | at1 () const |
Coord & | at1 () |
int | degreesOfFreedom () const |
double | valueAt (double t) const |
double | operator() (double t) const |
std::vector< double > | valueAndDerivatives (double t, unsigned n) const |
Compute the value and the first n derivatives. | |
SBasis | toSBasis () const |
double | tailError (unsigned tail) const |
bound the error from term truncation | |
SBasis | operator() (SBasis const &g) const |
void | normalize () |
void | truncate (unsigned k) |
Private Member Functions | |
void | push_back (Linear const &l) |
void | derive () |
Compute the derivative of this inplace (Exact) | |
Private Attributes | |
std::vector< Linear > | d |
Related Symbols | |
(Note that these are not member symbols.) | |
SBasis | reverse (SBasis const &a) |
Returns a function which reverses the domain of a. | |
unsigned | valuation (SBasis const &a, double tol=0) |
Returns the degree of the first non zero coefficient. | |
SBasis | portion (const SBasis &t, double from, double to) |
Returns the sbasis on domain [0,1] that was t on [from, to]. | |
typedef std::vector<Linear>::const_iterator Geom::SBasis::const_iterator |
typedef std::vector<Linear>::iterator Geom::SBasis::iterator |
typedef double Geom::SBasis::output_type |
|
inline |
Definition at line 112 of file sbasis.h.
Referenced by linear_root(), Geom::operator+=(), Geom::operator-(), Geom::operator-=(), and Geom::Linear::toSBasis().
|
inlineexplicit |
|
inline |
|
inline |
Definition at line 107 of file sbasis.h.
Referenced by Geom::compose_inverse(), and Geom::Piecewise< T >::unitVector().
|
inline |
Definition at line 212 of file sbasis.h.
Referenced by Geom::Piecewise< T >::arc_length_parametrization(), Geom::Piecewise< T >::centroid(), Geom::compose_pullback(), convole(), Geom::cos(), Geom::divide(), Geom::interpolate(), portion(), Geom::Piecewise< T >::pw_compose_inverse(), Geom::sqrt_internal(), and TEST_F().
|
inline |
Definition at line 214 of file sbasis.h.
Referenced by Geom::Piecewise< T >::arc_length_parametrization(), Geom::Piecewise< T >::centroid(), Geom::compose_pullback(), Geom::cos(), Geom::divide(), Geom::interpolate(), portion(), Geom::Piecewise< T >::pw_compose_inverse(), Geom::sqrt_internal(), and TEST_F().
|
inline |
Definition at line 83 of file sbasis.h.
Referenced by divide_by_sk().
|
inline |
Definition at line 101 of file sbasis.h.
Referenced by Geom::bezier_to_sbasis(), and Geom::operator*=().
|
inline |
|
private |
Compute the derivative of this inplace (Exact)
Definition at line 350 of file sbasis.cpp.
References d, isZero(), pop_back(), and size().
Referenced by valueAndDerivatives().
|
inline |
Definition at line 84 of file sbasis.h.
Referenced by divide_by_sk().
|
inline |
Definition at line 106 of file sbasis.h.
Referenced by divide_by_sk(), and Geom::truncate().
|
inline |
bool Geom::SBasis::isFinite | ( | ) | const |
test all coefficients are finite
Definition at line 56 of file sbasis.cpp.
References size().
Referenced by TEST_F().
|
inline |
Definition at line 195 of file sbasis.h.
References size.
Referenced by Geom::Piecewise< T >::compose(), Geom::derivative(), derive(), Geom::divide(), Geom::force_continuity(), Geom::multiply(), Geom::multiply_add(), Geom::operator*=(), Geom::sbasis_to_poly(), Geom::sqrt(), Geom::sqrt_internal(), and TEST_F().
|
inline |
Definition at line 247 of file sbasis.h.
References size.
Referenced by Geom::integral(), integral(), Geom::multiply(), Geom::multiply_add(), my_inverse(), and Geom::poly_to_sbasis().
|
inline |
Definition at line 424 of file sbasis.h.
References Geom::compose().
|
inline |
|
inline |
|
inlineprivate |
Definition at line 72 of file sbasis.h.
Referenced by Geom::cheb(), Geom::chebyshev(), and TEST_F().
|
inline |
Definition at line 98 of file sbasis.h.
Referenced by Geom::bezier_to_sbasis(), Geom::compose_inverse(), Geom::derivative(), Geom::divide(), Geom::divide(), Geom::NL::LFMSBasis::instance(), Geom::integral(), integral(), Geom::inverse(), Geom::multiply_add(), Geom::operator+=(), Geom::operator-=(), Geom::sqrt(), and Geom::sqrt_internal().
|
inline |
|
inline |
Definition at line 76 of file sbasis.h.
Referenced by are_equal(), Geom::compose(), Geom::compose(), Geom::derivative(), derive(), divide_by_sk(), handle_to_sb(), Geom::inverse(), isFinite(), main(), Geom::multiply(), Geom::multiply_add(), my_inverse(), Geom::operator*(), Geom::operator+(), Geom::operator+=(), Geom::operator-(), Geom::operator-=(), Geom::Piecewise< T >::pw_compose_inverse(), sbasis_getitem(), sbasis_len(), Geom::sbasis_to_bezier(), Geom::sbasis_to_poly(), Geom::shift(), Geom::sqrt(), Geom::sqrt_internal(), and Geom::Piecewise< T >::unitVector().
double Geom::SBasis::tailError | ( | unsigned | tail | ) | const |
bound the error from term truncation
tail | first term to chop |
Definition at line 49 of file sbasis.cpp.
References Geom::bounds_fast(), and bs.
Referenced by Geom::cos(), Geom::divide(), Geom::divide(), Geom::inverse(), Geom::Piecewise< T >::pw_compose_inverse(), pw_inverse(), Geom::sqrt(), Geom::sqrt_internal(), and Geom::Piecewise< T >::unitVector().
|
inline |
Definition at line 252 of file sbasis.h.
References resize(), and size.
Referenced by Geom::compose(), Geom::compose_inverse(), Geom::cos(), Geom::divide(), Geom::inverse(), Geom::sqrt(), and Geom::sqrt_internal().
std::vector< double > Geom::SBasis::valueAndDerivatives | ( | double | t, |
unsigned | n | ||
) | const |
Compute the value and the first n derivatives.
t | position to evaluate |
n | number of derivatives (not counting value) |
There is an elegant way to compute the value and n derivatives for a polynomial using a variant of horner's rule. Someone will someday work out how for sbasis.
Definition at line 71 of file sbasis.cpp.
|
inline |
Definition at line 219 of file sbasis.h.
References size.
Referenced by are_equal(), Geom::intersect(), portion(), TEST_F(), TEST_F(), and valueAndDerivatives().
Returns the sbasis on domain [0,1] that was t on [from, to].
t | sbasis function |
from,to | interval |
Definition at line 475 of file sbasis.cpp.
References at0(), at1(), Geom::compose(), and valueAt().
Referenced by Geom::portion().
|
related |
|
private |