SoftSUSY is hosted by Hepforge, IPPP Durham
SOFTSUSY  4.0
tensor.h
Go to the documentation of this file.
1 
13 #ifndef TENSOR_H
14 #define TENSOR_H
15 
16 #include <iostream>
17 #include <cmath>
18 #include <fstream>
19 #include "linalg.h"
20 //#include "rge.h"
21 //#include "lowe.h"
22 //#include "susy.h"
23 using namespace std;
24 using namespace softsusy;
25 
26 class Tensor;
27 ostream & operator <<(ostream &left, const Tensor &);
28 
30 class Tensor {
35 private:
36  DoubleMatrix A1, A2, A3;
37 
39  void setTensor(const DoubleMatrix &, const DoubleMatrix &, const
40  DoubleMatrix &);
41 
42 public:
43  Tensor();
44  Tensor(const Tensor &);
46 
48  void threecheck(const DoubleMatrix &, const DoubleMatrix &,
49  const DoubleMatrix &);
50 
52  double & operator () (int, int, int);
54  DoubleMatrix & operator () (int);
56  const DoubleMatrix & display(int) const;
58  double display(int, int, int) const;
61  void checkOut(double) const;
63  void set(int i, int j, int k, double f);
64 
66  DoubleVector trace(int) const;
68  Tensor transpose() const;
74  DoubleMatrix dotProd(const DoubleVector & v, int i) const;
76  Tensor operator*(double) const;
78  Tensor operator/(double) const;
80  Tensor operator*(const DoubleMatrix &) const;
82  Tensor operator+(const Tensor &) const;
84  Tensor operator-(const Tensor &) const;
86  Tensor product(const DoubleMatrix &) const;
88  Tensor swap(int);
90  Tensor raise(const DoubleMatrix & M) const;
91 };
93 Tensor operator*(double, const Tensor &);
95 Tensor operator*(const DoubleMatrix &, const Tensor &);
98 Tensor outerProduct(const DoubleVector &, const DoubleMatrix &, int);
100 DoubleMatrix matrixify(const Tensor &, const Tensor &);
101 // \f$ M_{ij} = A^{lik} B^{lkj} \f$
102 DoubleMatrix sumProd(const Tensor & A, const Tensor & B);
103 
104 #endif
global variable declaration
Definition: def.cpp:13
DoubleVector is of variable length, and contains double precision.
Definition: linalg.h:35
DoubleMatrix matrixify(const Tensor &, const Tensor &)
Definition: tensor.cpp:294
DoubleVector and DoubleMatrix classes of doubles and operations between them, complexified copies als...
Tensor outerProduct(const DoubleVector &, const DoubleMatrix &, int)
Definition: tensor.cpp:273
Tensor operator*(double, const Tensor &)
Multiplies all matrices in tensor by a double.
Definition: tensor.cpp:311
Matrix from 1..rows, 1..cols of double values.
Definition: linalg.h:211
MatXpr< T, MatXprScalOp< T, MatConstRef< T, MatIndexable< T, B > >, OpMultiply< T > > > operator/(const MatIndexable< T, B > &b, T a)
divide xpr matrix by scalar
Definition: xpr-matrix.h:602
MatXpr< T, MatXprBinOp< T, MatConstRef< T, MatIndexable< T, A > >, MatConstRef< T, MatIndexable< T, B > >, OpSubtract< T > > > operator-(const MatIndexable< T, A > &a, const MatIndexable< T, B > &b)
xpr matrix subtraction
Definition: xpr-matrix.h:169
MatXpr< T, MatXprBinOp< T, MatConstRef< T, MatIndexable< T, A > >, MatConstRef< T, MatIndexable< T, B > >, OpAdd< T > > > operator+(const MatIndexable< T, A > &a, const MatIndexable< T, B > &b)
add two xpr matrices
Definition: xpr-matrix.h:25
Three-index tensor for containing information on RPV couplings.
Definition: tensor.h:30