Code-Eli  0.3.6
eli::mutil::poly::polynomial< data__ > Class Template Reference

#include <polynomial.hpp>

Public Types

typedef data__ data_type
 
typedef Eigen::Matrix< data_type, Eigen::Dynamic, 1 > coefficient_type
 
typedef coefficient_type::Index index_type
 

Public Member Functions

 polynomial ()
 
 polynomial (const coefficient_type &c)
 
 polynomial (const polynomial< data__ > &p)
 
 polynomial (const data_type &root)
 
 polynomial (const data_type &root1, const data_type &root2)
 
 polynomial (const data_type &root1, const data_type &root2, const data_type &root3)
 
 polynomial (const data_type &root1, const data_type &root2, const data_type &root3, const data_type &root4)
 
template<typename itroot__ >
 polynomial (itroot__ its, itroot__ ite)
 
polynomial< data__ > & operator= (const data_type &d)
 
polynomial< data__ > & operator= (const polynomial< data__ > &p)
 
index_type degree () const
 
data_type coefficient (const index_type &i) const
 
void set_coefficients (const coefficient_type &ain)
 
void get_coefficients (coefficient_type &aout) const
 
void compress ()
 
void adjust_zero (const data_type &small)
 
void set_roots (const data_type &root)
 
void set_roots (const data_type &root1, const data_type &root2)
 
void set_roots (const data_type &root1, const data_type &root2, const data_type &root3)
 
void set_roots (const data_type &root1, const data_type &root2, const data_type &root3, const data_type &root4)
 
template<typename itroot__ >
void set_roots (itroot__ its, itroot__ ite)
 
data_type f (const data_type &t) const
 
data_type fp (const data_type &t) const
 
data_type fpp (const data_type &t) const
 
data_type fppp (const data_type &t) const
 
polynomial< data_type > * f () const
 
polynomial< data_type > * fp () const
 
polynomial< data_type > * fpp () const
 
polynomial< data_type > * fppp () const
 
void add (const polynomial< data_type > &p1, const polynomial< data_type > &p2)
 
void subtract (const polynomial< data_type > &p1, const polynomial< data_type > &p2)
 
void multiply (const polynomial< data_type > &p1, const polynomial< data_type > &p2)
 
void multiply (const data_type &d)
 
void divide (polynomial< data_type > &prem, const polynomial< data_type > &p1, const polynomial< data_type > &p2)
 
void divide (const data_type &d)
 
void negative ()
 

Private Member Functions

index_type size () const
 

Private Attributes

coefficient_type a
 

Member Typedef Documentation

template<typename data__>
typedef Eigen::Matrix<data_type, Eigen::Dynamic, 1> eli::mutil::poly::polynomial< data__ >::coefficient_type
template<typename data__>
typedef data__ eli::mutil::poly::polynomial< data__ >::data_type
template<typename data__>
typedef coefficient_type::Index eli::mutil::poly::polynomial< data__ >::index_type

Constructor & Destructor Documentation

template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( )
inline
template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( const coefficient_type c)
inline
template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( const polynomial< data__ > &  p)
inline
template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( const data_type root)
inline

Here is the call graph for this function:

template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( const data_type root1,
const data_type root2 
)
inline

Here is the call graph for this function:

template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( const data_type root1,
const data_type root2,
const data_type root3 
)
inline

Here is the call graph for this function:

template<typename data__>
eli::mutil::poly::polynomial< data__ >::polynomial ( const data_type root1,
const data_type root2,
const data_type root3,
const data_type root4 
)
inline

Here is the call graph for this function:

template<typename data__>
template<typename itroot__ >
eli::mutil::poly::polynomial< data__ >::polynomial ( itroot__  its,
itroot__  ite 
)
inline

Here is the call graph for this function:

Member Function Documentation

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::add ( const polynomial< data_type > &  p1,
const polynomial< data_type > &  p2 
)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::adjust_zero ( const data_type small)
inline

Here is the call graph for this function:

template<typename data__>
data_type eli::mutil::poly::polynomial< data__ >::coefficient ( const index_type i) const
inline
template<typename data__>
void eli::mutil::poly::polynomial< data__ >::compress ( )
inline

Here is the call graph for this function:

template<typename data__>
index_type eli::mutil::poly::polynomial< data__ >::degree ( ) const
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::divide ( polynomial< data_type > &  prem,
const polynomial< data_type > &  p1,
const polynomial< data_type > &  p2 
)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::divide ( const data_type d)
inline

Here is the call graph for this function:

template<typename data__>
data_type eli::mutil::poly::polynomial< data__ >::f ( const data_type t) const
inline

Here is the call graph for this function:

template<typename data__>
polynomial<data_type>* eli::mutil::poly::polynomial< data__ >::f ( ) const
inline

Here is the call graph for this function:

template<typename data__>
data_type eli::mutil::poly::polynomial< data__ >::fp ( const data_type t) const
inline

Here is the call graph for this function:

template<typename data__>
polynomial<data_type>* eli::mutil::poly::polynomial< data__ >::fp ( ) const
inline

Here is the call graph for this function:

template<typename data__>
data_type eli::mutil::poly::polynomial< data__ >::fpp ( const data_type t) const
inline

Here is the call graph for this function:

template<typename data__>
polynomial<data_type>* eli::mutil::poly::polynomial< data__ >::fpp ( ) const
inline

Here is the call graph for this function:

template<typename data__>
data_type eli::mutil::poly::polynomial< data__ >::fppp ( const data_type t) const
inline

Here is the call graph for this function:

template<typename data__>
polynomial<data_type>* eli::mutil::poly::polynomial< data__ >::fppp ( ) const
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::get_coefficients ( coefficient_type aout) const
inline
template<typename data__>
void eli::mutil::poly::polynomial< data__ >::multiply ( const polynomial< data_type > &  p1,
const polynomial< data_type > &  p2 
)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::multiply ( const data_type d)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::negative ( )
inline

Here is the call graph for this function:

template<typename data__>
polynomial<data__>& eli::mutil::poly::polynomial< data__ >::operator= ( const data_type d)
inline

Here is the call graph for this function:

template<typename data__>
polynomial<data__>& eli::mutil::poly::polynomial< data__ >::operator= ( const polynomial< data__ > &  p)
inline
template<typename data__>
void eli::mutil::poly::polynomial< data__ >::set_coefficients ( const coefficient_type ain)
inline
template<typename data__>
void eli::mutil::poly::polynomial< data__ >::set_roots ( const data_type root)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::set_roots ( const data_type root1,
const data_type root2 
)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::set_roots ( const data_type root1,
const data_type root2,
const data_type root3 
)
inline

Here is the call graph for this function:

template<typename data__>
void eli::mutil::poly::polynomial< data__ >::set_roots ( const data_type root1,
const data_type root2,
const data_type root3,
const data_type root4 
)
inline

Here is the call graph for this function:

template<typename data__>
template<typename itroot__ >
void eli::mutil::poly::polynomial< data__ >::set_roots ( itroot__  its,
itroot__  ite 
)
inline

This algorithm uses the fact that each coefficient is the sum of the multiplication of all combinations of a number of roots. See hand coded root cases to see the pattern.

Here is the call graph for this function:

template<typename data__>
index_type eli::mutil::poly::polynomial< data__ >::size ( ) const
inlineprivate
template<typename data__>
void eli::mutil::poly::polynomial< data__ >::subtract ( const polynomial< data_type > &  p1,
const polynomial< data_type > &  p2 
)
inline

Here is the call graph for this function:

Member Data Documentation

template<typename data__>
coefficient_type eli::mutil::poly::polynomial< data__ >::a
private

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