#include "MODEL/Main/Single_Vertex.H" #include "METOOLS/Explicit/Vertex.H" namespace METOOLS { class Identity_2_1_Calculator: public Color_Calculator { private: static std::complex m_cfacs[3][3]; // Outgoing index size_t m_out; // Mapping of indices, taking care of the 'rotation', in which the // vertex occurs such that j[m_inds[i]] = ji with i \in // {0,1,2,...,n_external-1} std::vector m_inds; public: inline Identity_2_1_Calculator(const Vertex_Key &key): Color_Calculator(key) { m_out = p_v->V()->id.back(); size_t n_ext = p_v->V()->id.size(); size_t max_ind = n_ext-1; // Set up index mapping m_inds.resize(n_ext); for(size_t i(0); i(1.00000000000000000000e+00,0.00000000000000000000e+00); m_cfacs[1][1]=std::complex(1.00000000000000000000e+00,0.00000000000000000000e+00); m_cfacs[2][2]=std::complex(1.00000000000000000000e+00,0.00000000000000000000e+00); } }; std::complex Identity_2_1_Calculator::m_cfacs[3][3] = {{ std::complex(0.0,0.0) }}; } using namespace METOOLS; using namespace ATOOLS; DECLARE_GETTER(Identity_2_1_Calculator,"Identity_2_1", Color_Calculator,Vertex_Key); Color_Calculator *ATOOLS::Getter :: operator()(const Vertex_Key &key) const { static int init(0); if (init==0) Identity_2_1_Calculator::init_cfacs(); init=1; return new Identity_2_1_Calculator(key); } void ATOOLS::Getter:: PrintInfo(std::ostream &str,const size_t width) const { str<<"Identity_2_1"; }