#include "Tensor3.hh" Tensor3::Tensor3(int a, int b, int c, double val) : Tensor(0, 9), _a(a), _b(b), _c(c) { for(int i=0; i size = out.Size(); for(int ia=0; ia Tensor3::Exponential(int maxOrder) const { //:T_i:^n is of order n*(i-2)+1 //so :T_3:^n is of order n+1 int maxPower = maxOrder-1; int nFact = 1; //n! std::vector out; // sum(:t:^n) out.push_back(this->Clone()); for(int n=2; n<=maxPower; n++) { nFact *= n; Tensor* current = out.back(); out.push_back(new Tensor(current->Poisson(*this)/nFact)); } return out; } CLHEP::HepVector Tensor3::ExponentialPoisson(CLHEP::HepVector v, int maxOrder) const { std::vector ExpT = Exponential(maxOrder); CLHEP::HepVector out; for(unsigned int i=0; iPoisson(v); return out; } double Tensor3::dGdUi(int i, CLHEP::HepVector v) const { double dGdUi = 0; int dimension = v.num_row(); for(int p=0; p 1e-10 || _data[i][j][k] < -1e-10) return false; return true; } Tensor3 operator+(const Tensor3& t1, const Tensor3& t2) { Tensor3 t3(t1); std::vector size = t3.Size(); for(int ia=0; ia size = t3.Size(); for(int ia=0; ia size = Size(); for(int ia=0; ia Tensor3::Size() const { std::vector size(3); size[0] = _a; size[1] = _b; size[2] = _c; return size; }