22 #ifndef CRNREAL_HEADER
23 #define CRNREAL_HEADER
42 Real(
double d = 0):val(d) {}
44 virtual ~Real()
override =
default;
52 operator double() const noexcept {
return val; }
BoolNotBoolDummy operator-(const BoolNotBoolDummy &, const BoolNotBoolDummy &)
Real & operator/=(Real r) noexcept
#define CRN_SERIALIZATION_CONSTRUCTOR(classname)
Defines a default constructor from xml element.
Real & operator+=(Real r) noexcept
Real(double d=0)
Default constructor.
virtual ~Real() override=default
Destructor.
bool operator<(Real r) noexcept
void Deserialize(xml::Element &el)
Reads from an XML element.
Interface class for the metric real number class.
BoolNotBoolDummy operator*(const BoolNotBoolDummy &, const BoolNotBoolDummy &)
xml::Element Serialize(xml::Element &parent) const
Dumps to an XML element.
BoolNotBoolDummy operator+(const BoolNotBoolDummy &, const BoolNotBoolDummy &)
Real & operator=(const Real &)=default
double Distance(const Int &i1, const Int &i2) noexcept
bool operator<=(Real r) noexcept
void Abs(Image< T > &img, typename std::enable_if< std::is_arithmetic< T >::value >::type *dummy=nullptr) noexcept
Replaces each pixel by its absolute value.
Real & operator-=(Real r) noexcept
BoolNotBoolDummy operator/(const BoolNotBoolDummy &, const BoolNotBoolDummy &)
bool operator>(Real r) noexcept
#define CRN_DECLARE_CLASS_CONSTRUCTOR(classname)
Declares a class constructor.
bool operator>=(Real r) noexcept
Real & operator*=(Real r) noexcept