23 Ord::Ord() : order(0) {}
24 Ord::Ord(
int o) : order(o) {}
25 Ord::Ord(
double o) : order(0) {}
27 int Ord::get_order()
const {
return order; }
29 Ord Ord::get_max_order() {
return Ord(30); }
31 Ord Ord::operator+ (
const Ord &o) {
return Ord(std::max(this->order, o.order)); }
32 Ord Ord::operator+ (
double d) {
return *
this; }
33 Ord Ord::operator+ (std::complex<double> d) {
return *
this; }
34 Ord Ord::operator-(
const Ord &o) {
return Ord(std::max(this->order, o.order)); }
35 Ord Ord::operator-(
double d) {
return *
this; }
36 Ord Ord::operator-(std::complex<double> d) {
return *
this; }
37 Ord Ord::operator*(
const Ord &o) {
return Ord(this->order + o.order); }
38 Ord Ord::operator*(
double d) {
return *
this; }
39 Ord Ord::operator*(std::complex<double> d) {
return *
this; }
40 Ord Ord::operator/(
const Ord &o) {
return Ord::get_max_order(); }
41 Ord Ord::operator/(
double d) {
return *
this; }
42 Ord Ord::operator/(std::complex<double> d) {
return *
this; }
44 Ord Ord::operator+=(
const Ord &o) { this->order = std::max(this->order, o.order);
return *
this; }
45 Ord Ord::operator-=(
const Ord &o) { this->order = std::max(this->order, o.order);
return *
this; }
47 Ord Ord::operator+=(
const double &d) {
return *
this; }
48 Ord Ord::operator+=(
const std::complex<double> &d) {
return *
this; }
49 Ord Ord::operator-=(
const double &d) {
return *
this; }
50 Ord Ord::operator-=(
const std::complex<double> &d) {
return *
this; }
51 Ord Ord::operator*=(
const double &d) {
return *
this; }
52 Ord Ord::operator*=(
const std::complex<double> &d) {
return *
this; }
53 Ord Ord::operator/=(
const double &d) {
return *
this; }
54 Ord Ord::operator/=(
const std::complex<double> &d) {
return *
this; }
56 bool Ord::operator<(
double d) {
return true; }
57 bool Ord::operator<(std::complex<double> d) {
return true; }
58 bool Ord::operator>(
double d) {
return false; }
59 bool Ord::operator>(std::complex<double> d) {
return false; }
60 bool Ord::operator<(
const Ord &o) {
return this->order < o.order; }
61 bool Ord::operator>(
const Ord &o) {
return this->order > o.order; }
63 Ord operator/(
const double &a,
const Ord &b) {
return Ord::get_max_order(); }
64 Ord operator*(
const double &a,
const Ord &b) {
return b; }
65 Ord operator + (
const double &a,
const Ord &b) {
return b; }
66 Ord operator-(
const double &a,
const Ord &b) {
return b; }
67 Ord operator/(
const std::complex<double> &a,
const Ord &b) {
return Ord::get_max_order(); }
68 Ord operator*(
const std::complex<double> &a,
const Ord &b) {
return b; }
69 Ord operator + (
const std::complex<double> &a,
const Ord &b) {
return b; }
70 Ord operator-(
const std::complex<double> &a,
const Ord &b) {
return b; }
71 Ord operator-(
const Ord &a) {
return a; }
73 Ord pow(
const Ord &a,
const double &b) {
return Ord((
int)ceil(fabs(b)) * a.get_order()); }
74 Ord sqrt(
const Ord &a) {
return a; }
75 Ord sqr(
const Ord &a) {
return Ord(2 * a.get_order()); }
76 Ord conj(
const Ord &a) {
return a; }
77 Ord abs(
const Ord &a) {
return a; }
78 Ord magn(
const Ord &a) {
return a; }
80 Ord atan2(
const Ord &a,
const Ord &b) {
return Ord::get_max_order(); }
81 Ord atan(
const Ord &a) {
return Ord::get_max_order(); }
82 Ord sin(
const Ord &a) {
return Ord::get_max_order(); }
83 Ord cos(
const Ord &a) {
return Ord::get_max_order(); }
84 Ord log(
const Ord &a) {
return Ord::get_max_order(); }
85 Ord exp(
const Ord &a) {
return Ord(3 * a.get_order()); }
General namespace for the Hermes library.
Contains class Ord for calculation of integration order.