MagT64

class MagT64

Abstract type representing magnetization type chosen for cavity messages.

Note
MagT64 means a double type wit tanh application.

Public Functions

MagT64()

Default constructor.

MagT64(const double &x, double m = 30.0)

Constructor with value.

Note
In MagT64 the magnetization is converted to a value given by tanh(x).
Parameters
  • x: magnetization
  • m: boundary value

~MagT64()

Default destructor.

MagT64(const MagT64 &m)

Copy constructor.

Parameters

MagT64 &operator=(const MagT64 &m)

Assigment operator constructor.

Parameters

std::string magformat() const

Return the mag description (tanh for MagT64).

double value() const

Get the magnetization value.

Note
In MagT64 the value is given by tanh(mag).

MagT64 operator%(const MagT64 &m)

Overload operator.

Add magnetization (m1 + m2)

Note
The summation exclude the tanh evaluation.
Parameters

MagT64 operator+(const MagT64 &m)

Overload operator.

Just a simple addition of the mag values.

Parameters

MagT64 operator/(const double &x)

Overload operator.

Just a simple division as (mag / x)

Parameters
  • x: double value

MagT64 operator^(const MagT64 &m)

Overload operator.

Combine two mags.

Parameters

double operator-(const MagT64 &m)

Overload operator.

Subtract values (val1 - val2)

Parameters

MagT64 operator-() const

Get a magnetization with a flipped sign.

flip magnetization sign

bool operator==(const MagT64 &m)

Check magnetization equality.

Compare magnetizations

Parameters

bool operator!=(const MagT64 &m)

Check magnetization not equality.

compare magnetizations

Parameters

Public Members

double mag

Magnetization.

double mInf

Boundary dimension.

Friends

double operator*(const double &x, const MagT64 &m)

Overload operator.

Just a simple product as (x * mag)

Parameters
  • x: double value
  • m: MagT64 object

std::ostream &operator<<(std::ostream &os, const MagT64 &m)

Print operator with stdout/stderr.

print mag

Parameters
  • os: ostream operator
  • m: MagT64 object