#include <mod.h>
Publikus tagfüggvények | |
| Mod () | |
| Default konstruktor. | |
| Mod (int _val) | |
| Kezdeti érték beállítása a default modulus mellett. | |
| Mod (int _val, int _mod) | |
| Kezdeti érték beállítása a default modulus mellett. | |
| Mod (const Mod &other) | |
| Másoló konstruktor. | |
| int | get_val () const |
| Maradékosztály reprezentánsa. | |
| void | set_val (int _val) |
| Maradékosztály beállítása. | |
| int | get_mod () const |
| Modulus lekérdezése. | |
| void | set_mod (int _mod) |
| Modulus beállítása. | |
| bool | is_invalid () const |
| Invalid objektum lekérdezése. | |
| bool | operator== (const Mod &other) const |
| bool | operator== (int other) const |
| bool | operator!= (const Mod &other) const |
| bool | operator!= (int other) const |
| bool | operator< (const Mod &other) const |
| bool | operator<= (const Mod &other) const |
| bool | operator> (const Mod &other) const |
| bool | operator>= (const Mod &other) const |
| Mod & | operator= (const Mod &other) |
| Mod | add (const Mod &other) const |
| Az összeadást megvalósító függvény. | |
| Mod | operator+ (const Mod &other) const |
| Mod | operator+ (int other) const |
| Mod & | operator+= (const Mod &other) |
| Mod & | operator+= (int other) |
| Mod | operator- () const |
| Mod | operator- (const Mod &other) const |
| Mod | operator- (int other) const |
| Mod & | operator-= (const Mod &other) |
| Mod & | operator-= (int other) |
| Mod | multiply (const Mod &other) const |
| A szorzást megvalósító függvény. | |
| Mod | operator* (const Mod &other) const |
| Mod | operator* (int other) const |
| Mod & | operator*= (const Mod &other) |
| Mod & | operator*= (int other) |
| Mod | inverse () const |
| Az inverzet számoló függvény. | |
| Mod | operator/ (const Mod &other) const |
| Mod | operator/ (int other) const |
| Mod & | operator/= (const Mod &other) |
| Mod & | operator/= (int other) |
| Mod | pow (int k) const |
| Hatványozás. | |
Statikus publikus tagfüggvények | |
| static void | set_default_modulus (int _def_mod) |
| Default modulus beállítása. | |
| static void | set_normal_print_mode () |
| Kiírás módjának beállítása. | |
| static void | set_short_print_mode () |
| Kiírás módjának beállítása. | |
| static int | get_print_mode () |
| Kiírás módja. | |
| static int | get_default_modulus () |
| Default modulus lekérdezése. | |
A Mod osztály a modulo n maradékosztályok gyűrűjét reprezentálja.
|
inline |
|
inline |
|
inline |
Kezdeti érték beállítása a default modulus mellett.
Ez a konstruktor beállítja a megadott modulust (_mod) és a paraméterként megadott maradékosztályt (_val) egy 0 és _mod-1 közötti reprezentánssal. Ha a megadott modulus nem pozitív, akkor a beállított érték invalid (0,0).
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
| Mod bme::Mod::inverse | ( | ) | const |
|
inline |
| Mod bme::Mod::pow | ( | int | k | ) | const |
|
inlinestatic |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |