![]() |
EMath++
Classes for mathematical concepts
|
Class for representing and operating monomials. More...
#include <emath.h>
Public Member Functions | |
| Monomial () noexcept | |
| Default constructor for when initialized with no arguments. | |
| Monomial (const double cf, const int dgr) noexcept | |
| Normal constructor for initialization with coeff and degree. | |
| Monomial (const Monomial &ogn) noexcept | |
| Copy constructor for when initialized with an lvalue Monomial object. | |
| Monomial (Monomial &&ogn) noexcept | |
| Move constructor for when initialized with an rvalue Monomial object. | |
| Monomial & | operator= (const Monomial &ogn) noexcept |
| Assigment operator overload for when called with an lvalue. | |
| Monomial & | operator= (Monomial &&ogn) noexcept |
| Move assigment operator overload for when called with an rvalue. | |
| bool | operator== (const Monomial &ogn) const noexcept |
| Equal logic operator overload. | |
| bool | operator!= (const Monomial &ogn) const noexcept |
| Not equal logic operator overload. | |
| bool | operator> (const Monomial &ogn) const noexcept |
| Greater than logic operator overload. | |
| bool | operator< (const Monomial &ogn) const noexcept |
| Less than logic operator overload. | |
| bool | operator>= (const Monomial &ogn) const noexcept |
| Greater or equal than logic operator overload. | |
| bool | operator<= (const Monomial &ogn) const noexcept |
| Less or equal than logic operator overload. | |
| Monomial | operator+ (const Monomial &ogn) const noexcept |
| Addition operator overload. | |
| Monomial | operator- (const Monomial &ogn) const noexcept |
| Substraction operator overload. | |
| Monomial | operator* (const Monomial &ogn) const noexcept |
| Multiplication operator overload. | |
| Monomial | operator/ (const Monomial &ogn) const noexcept |
| Division operator overload. | |
| Monomial | operator% (const Monomial &ogn) const noexcept |
| Modulus operator overload. | |
| Monomial & | operator+= (const Monomial &ogn) noexcept |
| Addition assigment operator overload. | |
| Monomial & | operator-= (const Monomial &ogn) noexcept |
| Substraction assigment operator overload. | |
| Monomial & | operator*= (const Monomial &ogn) noexcept |
| Multiplication assigment operator overload. | |
| Monomial & | operator/= (const Monomial &ogn) noexcept |
| Division assigment operator overload. | |
| Monomial & | operator%= (const Monomial &ogn) noexcept |
| Modulus assigment operator overload. | |
| double | get_coeff () const noexcept |
| Getter function for getting the coefficient of the Monomial. | |
| int | get_degree () const noexcept |
| Getter function for getting the degree of the Monomial. | |
| void | set_coeff (double cf) noexcept |
| Setter function for setting the coefficient of the Monomial. | |
| void | set_degree (int dgr) noexcept |
| Setter function for setting the degree of the Monomial. | |
| std::string | get_expression () const noexcept |
| Getter function for getting the expression of the Monomial. | |
| double | get_value (const double &x) const noexcept |
| Calculus function for getting the value of the Monomial at a point. | |
| ~Monomial () | |
| The class destructor. | |
Friends | |
| std::stringstream & | operator<< (std::stringstream &ss, const Monomial &m) |
| A friend operator to insert the Monomial into a std::stringstream. | |
| std::ostream & | operator<< (std::ostream &out, const Monomial &m) |
| A friend operator to insert the Monomial into a std::ostream. | |
Class for representing and operating monomials.
The class consists of the constructors, the operators, the getters, the properties and some private functions.
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
noexcept |
|
friend |
|
friend |