|
Security Scol plugin
|
Polynomials over a fixed ring. More...
#include <polynomi.h>
Public Types | |
| typedef T | Ring |
| typedef T::Element | CoefficientType |
| typedef B::DivideByZero | DivideByZero |
| typedef B::RandomizationParameter | RandomizationParameter |
Public Member Functions | |
ACCESSORS | |
| int | Degree () const |
| the zero polynomial will return a degree of -1 | |
| unsigned int | CoefficientCount () const |
| degree + 1 | |
| CoefficientType | GetCoefficient (unsigned int i) const |
| return coefficient for x^i | |
| CoefficientType | operator[] (unsigned int i) const |
| return coefficient for x^i | |
MANIPULATORS | |
| ThisType & | operator= (const ThisType &t) |
| ThisType & | operator+= (const ThisType &t) |
| ThisType & | operator-= (const ThisType &t) |
| ThisType & | operator*= (const ThisType &t) |
| ThisType & | operator/= (const ThisType &t) |
| ThisType & | operator%= (const ThisType &t) |
| ThisType & | operator<<= (unsigned int n) |
| ThisType & | operator>>= (unsigned int n) |
| void | SetCoefficient (unsigned int i, const CoefficientType &value) |
| set the coefficient for x^i to value | |
| void | Randomize (RandomNumberGenerator &rng, const RandomizationParameter ¶meter) |
| void | Negate () |
| void | swap (ThisType &t) |
UNARY OPERATORS | |
| bool | operator! () const |
| ThisType | operator+ () const |
| ThisType | operator- () const |
Friends | |
BINARY OPERATORS | |
| ThisType | operator>> (ThisType a, unsigned int n) |
| ThisType | operator<< (ThisType a, unsigned int n) |
INPUT/OUTPUT | |
| std::istream & | operator>> (std::istream &in, ThisType &a) |
| std::ostream & | operator<< (std::ostream &out, const ThisType &a) |
CREATORS | |
| PolynomialOverFixedRing (unsigned int count=0) | |
| creates the zero polynomial | |
| PolynomialOverFixedRing (const ThisType &t) | |
| copy constructor | |
| PolynomialOverFixedRing (const B &t) | |
| PolynomialOverFixedRing (const CoefficientType &element) | |
| construct constant polynomial | |
| template<typename Iterator > | |
| PolynomialOverFixedRing (Iterator first, Iterator last) | |
| construct polynomial with specified coefficients, starting from coefficient of x^0 | |
| PolynomialOverFixedRing (const char *str) | |
| convert from string | |
| PolynomialOverFixedRing (const byte *encodedPoly, unsigned int byteCount) | |
| convert from big-endian byte array | |
| PolynomialOverFixedRing (const byte *BEREncodedPoly) | |
| convert from Basic Encoding Rules encoded byte array | |
| PolynomialOverFixedRing (BufferedTransformation &bt) | |
| convert from BER encoded byte array stored in a BufferedTransformation object | |
| PolynomialOverFixedRing (RandomNumberGenerator &rng, const RandomizationParameter ¶meter) | |
| create a random PolynomialOverFixedRing | |
| static const ThisType & | Zero () |
| static const ThisType & | One () |
OTHER ARITHMETIC FUNCTIONS | |
| ThisType | MultiplicativeInverse () const |
| bool | IsUnit () const |
| ThisType | Doubled () const |
| ThisType | Squared () const |
| CoefficientType | EvaluateAt (const CoefficientType &x) const |
| static void | Divide (ThisType &r, ThisType &q, const ThisType &a, const ThisType &d) |
| calculate r and q such that (a == d*q + r) && (0 <= r < abs(d)) | |
Polynomials over a fixed ring.
Having a fixed ring allows overloaded operators
Definition at line 163 of file polynomi.h.
| typedef T::Element PolynomialOverFixedRing< T, instance >::CoefficientType |
Definition at line 170 of file polynomi.h.
| typedef B::DivideByZero PolynomialOverFixedRing< T, instance >::DivideByZero |
Definition at line 171 of file polynomi.h.
| typedef B::RandomizationParameter PolynomialOverFixedRing< T, instance >::RandomizationParameter |
Definition at line 172 of file polynomi.h.
| typedef T PolynomialOverFixedRing< T, instance >::Ring |
Definition at line 169 of file polynomi.h.
|
inline |
creates the zero polynomial
Definition at line 177 of file polynomi.h.
|
inline |
copy constructor
Definition at line 180 of file polynomi.h.
|
inlineexplicit |
Definition at line 182 of file polynomi.h.
|
inline |
construct constant polynomial
Definition at line 185 of file polynomi.h.
|
inline |
construct polynomial with specified coefficients, starting from coefficient of x^0
Definition at line 188 of file polynomi.h.
|
inlineexplicit |
convert from string
Definition at line 192 of file polynomi.h.
|
inline |
convert from big-endian byte array
Definition at line 195 of file polynomi.h.
|
inlineexplicit |
convert from Basic Encoding Rules encoded byte array
Definition at line 198 of file polynomi.h.
|
inlineexplicit |
convert from BER encoded byte array stored in a BufferedTransformation object
Definition at line 201 of file polynomi.h.
|
inline |
create a random PolynomialOverFixedRing
Definition at line 204 of file polynomi.h.
|
inline |
degree + 1
Definition at line 215 of file polynomi.h.
|
inline |
the zero polynomial will return a degree of -1
Definition at line 213 of file polynomi.h.
|
inlinestatic |
calculate r and q such that (a == d*q + r) && (0 <= r < abs(d))
Definition at line 287 of file polynomi.h.
|
inline |
Definition at line 280 of file polynomi.h.
|
inline |
Definition at line 284 of file polynomi.h.
|
inline |
return coefficient for x^i
Definition at line 217 of file polynomi.h.
|
inline |
Definition at line 277 of file polynomi.h.
|
inline |
Definition at line 275 of file polynomi.h.
|
inline |
Definition at line 249 of file polynomi.h.
|
static |
Definition at line 572 of file polynomi.cpp.
|
inline |
Definition at line 257 of file polynomi.h.
|
inline |
Definition at line 235 of file polynomi.h.
|
inline |
Definition at line 231 of file polynomi.h.
|
inline |
Definition at line 259 of file polynomi.h.
|
inline |
Definition at line 227 of file polynomi.h.
|
inline |
Definition at line 261 of file polynomi.h.
|
inline |
Definition at line 229 of file polynomi.h.
|
inline |
Definition at line 233 of file polynomi.h.
|
inline |
Definition at line 238 of file polynomi.h.
|
inline |
Definition at line 225 of file polynomi.h.
|
inline |
Definition at line 240 of file polynomi.h.
|
inline |
return coefficient for x^i
Definition at line 219 of file polynomi.h.
|
inline |
Definition at line 246 of file polynomi.h.
|
inline |
set the coefficient for x^i to value
Definition at line 243 of file polynomi.h.
|
inline |
Definition at line 282 of file polynomi.h.
|
inline |
Definition at line 251 of file polynomi.h.
|
static |
Definition at line 566 of file polynomi.cpp.
|
friend |
Definition at line 297 of file polynomi.h.
Definition at line 269 of file polynomi.h.
|
friend |
Definition at line 294 of file polynomi.h.
Definition at line 267 of file polynomi.h.