mt2  8bbb7ce09375b7fc0edeb89e1fe1dbb76bbd0555
Classes | Namespaces | Functions
polynomial.hpp File Reference
#include <vector>

Go to the source code of this file.

Classes

class  Polynomial< CoeffType >
 

Namespaces

 anonymous_namespace{polynomial.hpp}
 

Functions

template<typename CoeffType >
unsigned anonymous_namespace{polynomial.hpp}::GetSignChanges (const std::vector< CoeffType > &coeffs)
 
template<typename CoeffType >
Polynomial< CoeffType > operator+ (Polynomial< CoeffType > a, Polynomial< CoeffType > b)
 
template<typename CoeffType >
Polynomial< CoeffType > operator- (Polynomial< CoeffType > a, Polynomial< CoeffType > b)
 
template<typename CoeffType >
Polynomial< CoeffType > operator* (Polynomial< CoeffType > a, Polynomial< CoeffType > b)
 
template<typename CoeffType >
Polynomial< CoeffType > operator/ (Polynomial< CoeffType > a, Polynomial< CoeffType > b)
 
template<typename CoeffType >
Polynomial< CoeffType > operator% (Polynomial< CoeffType > a, Polynomial< CoeffType > b)
 
template<typename CoeffType >
std::ostream & operator<< (std::ostream &stream, const Polynomial< CoeffType > &p)
 
template<typename CoeffType >
Polynomial< CoeffType > Derivative (const Polynomial< CoeffType > &poly, size_t n=1)
 
template<typename CoeffType >
std::vector< Polynomial< CoeffType > > SturmSequence (const Polynomial< CoeffType > &poly)
 
template<typename CoeffType >
unsigned NumRoots (const Polynomial< CoeffType > &poly)
 
template<typename CoeffType , typename ArgType = double>
unsigned NumRoots (const Polynomial< CoeffType > &poly, const ArgType &low, const ArgType &high)
 

Function Documentation

template<typename CoeffType >
Polynomial<CoeffType> Derivative ( const Polynomial< CoeffType > &  poly,
size_t  n = 1 
)

Definition at line 245 of file polynomial.hpp.

Referenced by SturmSequence().

template<typename CoeffType >
unsigned NumRoots ( const Polynomial< CoeffType > &  poly)
template<typename CoeffType , typename ArgType = double>
unsigned NumRoots ( const Polynomial< CoeffType > &  poly,
const ArgType &  low,
const ArgType &  high 
)
template<typename CoeffType >
Polynomial<CoeffType> operator% ( Polynomial< CoeffType >  a,
Polynomial< CoeffType >  b 
)

Definition at line 230 of file polynomial.hpp.

template<typename CoeffType >
Polynomial<CoeffType> operator* ( Polynomial< CoeffType >  a,
Polynomial< CoeffType >  b 
)

Definition at line 220 of file polynomial.hpp.

template<typename CoeffType >
Polynomial<CoeffType> operator+ ( Polynomial< CoeffType >  a,
Polynomial< CoeffType >  b 
)

Definition at line 210 of file polynomial.hpp.

template<typename CoeffType >
Polynomial<CoeffType> operator- ( Polynomial< CoeffType >  a,
Polynomial< CoeffType >  b 
)

Definition at line 215 of file polynomial.hpp.

template<typename CoeffType >
Polynomial<CoeffType> operator/ ( Polynomial< CoeffType >  a,
Polynomial< CoeffType >  b 
)

Definition at line 225 of file polynomial.hpp.

template<typename CoeffType >
std::ostream& operator<< ( std::ostream &  stream,
const Polynomial< CoeffType > &  p 
)

Definition at line 235 of file polynomial.hpp.

References Polynomial< CoeffType >::Degree().

template<typename CoeffType >
std::vector<Polynomial<CoeffType> > SturmSequence ( const Polynomial< CoeffType > &  poly)

Definition at line 257 of file polynomial.hpp.

References Polynomial< CoeffType >::Degree(), and Derivative().

Referenced by NumRoots().