BornAgain  1.19.79
Open-source research software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering
SpinMatrix Class Reference

Public Member Functions

 SpinMatrix ()
 Contructs the null matrix. More...
 
 SpinMatrix (complex_t a_, complex_t b_, complex_t c_, complex_t d_)
 Constructs matrix with rows (a_,b_) and (c_,d_). More...
 
SpinMatrix adjoint () const
 
bool allFinite () const
 
Spinor col0 () const
 
Spinor col1 () const
 
complex_t determinant () const
 
SpinMatrix operator* (complex_t) const
 
SpinMatrix operator* (const SpinMatrix &) const
 
Spinor operator* (const Spinor &) const
 
SpinMatrix operator* (double) const
 
SpinMatrix operator*= (complex_t)
 
SpinMatrix operator*= (const SpinMatrix &)
 
SpinMatrix operator*= (double)
 
SpinMatrix operator+ (const SpinMatrix &) const
 
SpinMatrix operator+= (const SpinMatrix &)
 
SpinMatrix operator- () const
 
SpinMatrix operator- (const SpinMatrix &) const
 
SpinMatrix operator/ (complex_t) const
 
SpinMatrix operator/ (double) const
 
SpinMatrix operator/= (complex_t)
 
SpinMatrix operator/= (double)
 
complex_t trace () const
 

Static Public Member Functions

static SpinMatrix Diag (complex_t a_, complex_t d_)
 
static SpinMatrix FromBlochVector (const R3 &v)
 Constructs matrix (I+v*s)/2, where s is the Pauli vector. More...
 
static SpinMatrix One ()
 

Public Attributes

complex_t a
 
complex_t b
 
complex_t c
 
complex_t d
 

Constructor & Destructor Documentation

◆ SpinMatrix() [1/2]

SpinMatrix::SpinMatrix ( complex_t  a_,
complex_t  b_,
complex_t  c_,
complex_t  d_ 
)

Constructs matrix with rows (a_,b_) and (c_,d_).

◆ SpinMatrix() [2/2]

SpinMatrix::SpinMatrix ( )

Contructs the null matrix.

Member Function Documentation

◆ adjoint()

SpinMatrix SpinMatrix::adjoint ( ) const

◆ allFinite()

bool SpinMatrix::allFinite ( ) const

◆ col0()

Spinor SpinMatrix::col0 ( ) const

◆ col1()

Spinor SpinMatrix::col1 ( ) const

◆ determinant()

complex_t SpinMatrix::determinant ( ) const

◆ Diag()

static SpinMatrix SpinMatrix::Diag ( complex_t  a_,
complex_t  d_ 
)
static

◆ FromBlochVector()

static SpinMatrix SpinMatrix::FromBlochVector ( const R3 v)
static

Constructs matrix (I+v*s)/2, where s is the Pauli vector.

◆ One()

static SpinMatrix SpinMatrix::One ( )
static

◆ operator*() [1/4]

SpinMatrix SpinMatrix::operator* ( complex_t  ) const

◆ operator*() [2/4]

SpinMatrix SpinMatrix::operator* ( const SpinMatrix ) const

◆ operator*() [3/4]

Spinor SpinMatrix::operator* ( const Spinor ) const

◆ operator*() [4/4]

SpinMatrix SpinMatrix::operator* ( double  ) const

◆ operator*=() [1/3]

SpinMatrix SpinMatrix::operator*= ( complex_t  )

◆ operator*=() [2/3]

SpinMatrix SpinMatrix::operator*= ( const SpinMatrix )

◆ operator*=() [3/3]

SpinMatrix SpinMatrix::operator*= ( double  )

◆ operator+()

SpinMatrix SpinMatrix::operator+ ( const SpinMatrix ) const

◆ operator+=()

SpinMatrix SpinMatrix::operator+= ( const SpinMatrix )

◆ operator-() [1/2]

SpinMatrix SpinMatrix::operator- ( ) const

◆ operator-() [2/2]

SpinMatrix SpinMatrix::operator- ( const SpinMatrix ) const

◆ operator/() [1/2]

SpinMatrix SpinMatrix::operator/ ( complex_t  ) const

◆ operator/() [2/2]

SpinMatrix SpinMatrix::operator/ ( double  ) const

◆ operator/=() [1/2]

SpinMatrix SpinMatrix::operator/= ( complex_t  )

◆ operator/=() [2/2]

SpinMatrix SpinMatrix::operator/= ( double  )

◆ trace()

complex_t SpinMatrix::trace ( ) const

Member Data Documentation

◆ a

complex_t SpinMatrix::a

◆ b

complex_t SpinMatrix::b

◆ c

complex_t SpinMatrix::c

◆ d

complex_t SpinMatrix::d