flavour
std::Matrix Class Reference

#include <multivector.h>

Inheritance diagram for std::Matrix:
Collaboration diagram for std::Matrix:

Public Member Functions

 Matrix ()
 
 Matrix (const Matrix &m)
 
 Matrix (const char *m[3][3])
 constructs a symbolic matrix with the symbols names given by the argument More...
 
 Matrix (const char *name, const char **index1, const char **index2)
 constructs a symbolic matrix with the symbols names given by the arguments More...
 
 Matrix (ex m1, ex m2, ex m3)
 constructs a diagonal matrix More...
 
 Matrix (ex m1)
 constructs a diagonal matrix with all diagonal elements equal More...
 
 Matrix (ex t12, ex t13, ex t23, ex d13)
 constructs a unitary matrix in the standard form More...
 
ex cs (ex t12)
 used in the unitary constructor More...
 
ex sn (ex t12)
 used in the unitary constructor More...
 
Matrix conjugate () const
 computes the hermitian conjugate of the matrix More...
 
- Public Member Functions inherited from std::multivector< ex, 2 >
 multivector ()
 Default constructor. More...
 
 multivector (const multivector &m)
 Copy constructor. More...
 
 multivector (const ex &value,...)
 Recommended constructor. More...
 
 multivector (const ex &value, va_list &listPointer)
 Auxiliary constructor (recursive) More...
 

Additional Inherited Members

- Public Types inherited from std::multivector< ex, 2 >
typedef vector< multivector< ex, N-1 > > v
 

Detailed Description

Definition at line 67 of file multivector.h.

Constructor & Destructor Documentation

std::Matrix::Matrix ( )
inline

Definition at line 70 of file multivector.h.

70 : multivector< ex,2>(0,3,3) {}
std::Matrix::Matrix ( const Matrix m)
inline

Definition at line 72 of file multivector.h.

72 : multivector< ex,2>(m) {}
std::Matrix::Matrix ( const char *  m[3][3])
inline

constructs a symbolic matrix with the symbols names given by the argument

Definition at line 74 of file multivector.h.

74  : multivector< ex,2>(0,3,3){
75  for(uint i=0;i<3;i++)
76  for(uint j=0;j<3;j++) at(i)[j]=symbol(m[i][j]);
77  }
unsigned int uint
Definition: script.cpp:4
std::Matrix::Matrix ( const char *  name,
const char **  index1,
const char **  index2 
)
inline

constructs a symbolic matrix with the symbols names given by the arguments

Definition at line 79 of file multivector.h.

79  : multivector< ex,2>(0,3,3){
80  for(uint i=0;i<3;i++)
81  for(uint j=0;j<3;j++){
82  string res=string(name)+"_{"+string(index1[i])+" "+string(index2[j])+"}";
83  //cout<<res<<endl;
84  at(i)[j]=symbol(res.c_str());
85  }
86  }
unsigned int uint
Definition: script.cpp:4
std::Matrix::Matrix ( ex  m1,
ex  m2,
ex  m3 
)
inline

constructs a diagonal matrix

Definition at line 88 of file multivector.h.

88  : multivector< ex,2>(0,3,3) {
89  at(0)[0]=m1;
90  at(1)[1]=m2;
91  at(2)[2]=m3;
92 }
std::Matrix::Matrix ( ex  m1)
inline

constructs a diagonal matrix with all diagonal elements equal

Definition at line 95 of file multivector.h.

95  : multivector< ex,2>(0,3,3){
96  Matrix();
97  at(0)[0]=m1;
98  at(1)[1]=m1;
99  at(2)[2]=m1;
100  }
std::Matrix::Matrix ( ex  t12,
ex  t13,
ex  t23,
ex  d13 
)
inline

constructs a unitary matrix in the standard form

Definition at line 102 of file multivector.h.

102  : multivector< ex,2>(0,3,3) {
103  Matrix();
104  ex c12=cos(t12), c13=cos(t13), c23=cos(t23);
105  ex s12=sin(t12), s13=sin(t13), s23=sin(t23);
106  ex e13=exp(I*d13);
107  ex e13t=ex(1)/e13;
108 
109  ex aux[3][3]={
110  {c12*c13,s12*c13,s13*e13t},
111  {-s12*c23-c12*s23*s13*e13,c12*c23-s12*s23*s13*e13,s23*c13},
112  {s12*s23-c12*c23*s13*e13,-c12*s23-s12*c23*s13*e13,c13*c23}
113  };
114  for(uint i=0;i<3; i++) at(i).assign(aux[i],aux[i]+3);
115  }
unsigned int uint
Definition: script.cpp:4

Member Function Documentation

Matrix std::Matrix::conjugate ( ) const
inline

computes the hermitian conjugate of the matrix

Definition at line 125 of file multivector.h.

References conjugate().

Referenced by BGLmodels::BGL::BGL(), conjugate(), and BGLmodels::Mixes::Mixes().

125  {
126  Matrix res;
127  for(uint i=0;i<3;i++)
128  for(uint j=0;j<3;j++)
129  res[i][j]=at(j)[i].conjugate();
130 
131  return res;
132 }
unsigned int uint
Definition: script.cpp:4

Here is the call graph for this function:

Here is the caller graph for this function:

ex std::Matrix::cs ( ex  t12)
inline

used in the unitary constructor

Definition at line 117 of file multivector.h.

117  {
118  return (exp(I*t12)+1/exp(I*t12))/2;
119  }
ex std::Matrix::sn ( ex  t12)
inline

used in the unitary constructor

Definition at line 121 of file multivector.h.

121  {
122  return -I*(exp(I*t12)-1/exp(I*t12))/2;
123  }

The documentation for this class was generated from the following file: