- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# PolynomialOver< T > Class Template Reference

`#include <polynomi.h>`

Inheritance diagram for PolynomialOver< T >:

List of all members.

## Detailed Description

### template<class T>
class PolynomialOver< T >

represents single-variable polynomials over arbitrary rings

Definition at line 17 of file polynomi.h.

## ENUMS, EXCEPTIONS, and TYPEDEFS
typedef T | Ring
typedef T::Element | CoefficientType
## CREATORS
| PolynomialOver ()
| creates the zero polynomial
| PolynomialOver (const Ring &ring, unsigned int count)
| PolynomialOver (const PolynomialOver< Ring > &t)
| copy constructor
| PolynomialOver (const CoefficientType &element)
| construct constant polynomial
template<typename Iterator>
| PolynomialOver (Iterator begin, Iterator end)
| construct polynomial with specified coefficients, starting from coefficient of x^0
| PolynomialOver (const char *str, const Ring &ring)
| convert from string
| PolynomialOver (const byte *encodedPolynomialOver, unsigned int byteCount)
| convert from big-endian byte array
| PolynomialOver (const byte *BEREncodedPolynomialOver)
| convert from Basic Encoding Rules encoded byte array
| PolynomialOver (BufferedTransformation &bt)
| convert from BER encoded byte array stored in a BufferedTransformation object
| PolynomialOver (RandomNumberGenerator &rng, const RandomizationParameter &parameter, const Ring &ring)
| create a random PolynomialOver<T>
## ACCESSORS
int | Degree (const Ring &ring) const
| the zero polynomial will return a degree of -1
unsigned int | CoefficientCount (const Ring &ring) const
CoefficientType | GetCoefficient (unsigned int i, const Ring &ring) const
| return coefficient for x^i
## MANIPULATORS
PolynomialOver< Ring > & | operator= (const PolynomialOver< Ring > &t)
void | Randomize (RandomNumberGenerator &rng, const RandomizationParameter &parameter, const Ring &ring)
void | SetCoefficient (unsigned int i, const CoefficientType &value, const Ring &ring)
| set the coefficient for x^i to value
void | Negate (const Ring &ring)
void | swap (PolynomialOver< Ring > &t)
## BASIC ARITHMETIC ON POLYNOMIALS
bool | Equals (const PolynomialOver< Ring > &t, const Ring &ring) const
bool | IsZero (const Ring &ring) const
PolynomialOver< Ring > | Plus (const PolynomialOver< Ring > &t, const Ring &ring) const
PolynomialOver< Ring > | Minus (const PolynomialOver< Ring > &t, const Ring &ring) const
PolynomialOver< Ring > | Inverse (const Ring &ring) const
PolynomialOver< Ring > | Times (const PolynomialOver< Ring > &t, const Ring &ring) const
PolynomialOver< Ring > | DividedBy (const PolynomialOver< Ring > &t, const Ring &ring) const
PolynomialOver< Ring > | Modulo (const PolynomialOver< Ring > &t, const Ring &ring) const
PolynomialOver< Ring > | MultiplicativeInverse (const Ring &ring) const
bool | IsUnit (const Ring &ring) const
PolynomialOver< Ring > & | Accumulate (const PolynomialOver< Ring > &t, const Ring &ring)
PolynomialOver< Ring > & | Reduce (const PolynomialOver< Ring > &t, const Ring &ring)
PolynomialOver< Ring > | Doubled (const Ring &ring) const
PolynomialOver< Ring > | Squared (const Ring &ring) const
CoefficientType | EvaluateAt (const CoefficientType &x, const Ring &ring) const
PolynomialOver< Ring > & | ShiftLeft (unsigned int n, const Ring &ring)
PolynomialOver< Ring > & | ShiftRight (unsigned int n, const Ring &ring)
static void | Divide (PolynomialOver< Ring > &r, PolynomialOver< Ring > &q, const PolynomialOver< Ring > &a, const PolynomialOver< Ring > &d, const Ring &ring)
| calculate r and q such that (a == d*q + r) && (0 <= degree of r < degree of d)
## INPUT/OUTPUT
std::istream & | Input (std::istream &in, const Ring &ring)
std::ostream & | Output (std::ostream &out, const Ring &ring) const
## Classes
class | DivideByZero
| division by zero exception More...
class | RandomizationParameter
| specify the distribution for randomization functions More...

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

- polynomi.h
- polynomi.cpp