Class Jones

template<typename T>
class Jones

Jones matrices are 2x2 matrices with complex elements.

Public Functions

inline Jones(T scalar = 0.0)

Default constructor.

template<typename U>
inline explicit Jones(const U &scalar)

Construct from a castable type.

inline Jones(std::complex<T> j00_, std::complex<T> j01_, std::complex<T> j10_, std::complex<T> j11_)

Construct from std::complex<T>.

inline Jones(const Jones &s)

Construct from another Jones<T> matrix.

template<typename U>
inline Jones(const Jones<U> &s)

Construct from another Jones

template<typename U>
inline Jones(const Matrix<2, 2, std::complex<U>> &M)

Construct from a Matrix.

inline Jones &operator=(const Jones &s)

Set this instance equal to another Jones<T> instance.

inline Jones &operator=(T scalar)

Set this instance equal to a scalar.

inline Jones &operator=(std::complex<T> scalar)

Set this instance equal to a complex scalar.

template<typename U>
inline Jones &operator=(const Jones<U> &s)

Set this instance equal to another Jones

inline operator equiv() const

Cast to Matrix.

inline Jones &operator+=(const Jones &s)

Add another Jones<T> instance to this one.

inline Jones &operator-=(const Jones &s)

Subract another Jones<T> instance from this one.

Jones &operator*=(const Jones &j)

Multiply another Jones<T> instance into this one (this=this*j).

template<typename U>
inline Jones &operator*=(const std::complex<U> &au)

Multiply this instance by std::complex

template<typename U>
inline Jones &operator/=(const std::complex<U> &au)

Divide this instance by std::complex

inline Jones &operator*=(T a)

Multiply this instance by T.

inline Jones &operator/=(T a)

Divide this instance by T.

inline bool operator==(const Jones &b) const

Equality.

inline bool operator!=(const Jones &b) const

Inequality.

inline std::complex<T> &operator()(unsigned ir, unsigned ic)

Returns reference to the value of the matrix at j(ir,ic).

inline const std::complex<T> &operator()(unsigned ir, unsigned ic) const

Returns const reference to the value of the matrix at j(ir,ic).

inline std::complex<T> &operator[](unsigned n)

Alternative access to elements.

inline const std::complex<T> &operator[](unsigned n) const

Alternative access to elements.

inline bool is_diagonal() const

Return true if the off-diagonal elements are zero.

inline unsigned size() const

Dimension of data.

inline T p() const

Degree of polarization.

Public Static Functions

static const Jones &identity()

The identity matrix.

Friends

template<typename U>
inline friend Jones operator*(Jones a, std::complex<U> c)

Binary multiplication of Jones<T> and std::complex

template<typename U>
inline friend Jones operator*(std::complex<U> c, Jones a)

Binary multiplication of std::complex

inline friend Jones operator*(Jones a, T c)

Binary multiplication of Jones<T> and T.

inline friend Jones operator*(T c, Jones a)

Binary multiplication of T and Jones<T>.

template<typename U>
inline friend Jones operator/(Jones a, U c)

Binary division of Jones by any type.

inline friend Jones operator-(Jones s)

Negation operator returns negative of instance.