File indexing completed on 2024-04-06 12:24:18
0001 #ifndef PhysicsTools_Utilities_DecomposePower_h
0002 #define PhysicsTools_Utilities_DecomposePower_h
0003 #include "PhysicsTools/Utilities/interface/Power.h"
0004 #include "PhysicsTools/Utilities/interface/Numerical.h"
0005
0006 namespace funct {
0007 template <typename A, typename B>
0008 struct DecomposePower {
0009 typedef PowerStruct<A, B> type;
0010 inline static const A& getBase(const type& _) { return _._1; }
0011 inline static const B& getExp(const type& _) { return _._2; }
0012 };
0013
0014 template <typename A>
0015 struct DecomposePower<A, Numerical<1> > {
0016 typedef A type;
0017 inline static const A& getBase(const type& _) { return _; }
0018 inline static Numerical<1> getExp(const type& _) { return num<1>(); }
0019 };
0020
0021 }
0022
0023 #endif