herwig is hosted by Hepforge, IPPP Durham
Herwig  7.1.5
GSLHelper.h
1 // -*- C++ -*-
2 //
3 // GSLHelper.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4 // Copyright (C) 2002-2017 The Herwig Collaboration
5 //
6 // Herwig is licenced under version 3 of the GPL, see COPYING for details.
7 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
8 //
9 #ifndef HERWIG_GSLHelper_H
10 #define HERWIG_GSLHelper_H
11 //
12 // This is the declaration of the GSLHelper class.
13 //
14 
15 namespace Herwig {
16 
17  using namespace ThePEG;
18 
30 template <typename V, typename T>
31 struct GSLHelper
32 {
33 
34 public:
35 
39  GSLHelper() {}
40 
44  virtual ~GSLHelper() {}
45 
49  typedef T ArgType;
50 
54  typedef V ValType;
55 
59  virtual V vUnit() const {return TypeTraits<V>::baseunit();}
60 
64  virtual T aUnit() const {return TypeTraits<T>::baseunit();}
65 
66 private:
67 
72  GSLHelper & operator=(const GSLHelper &) = delete;
73 
74 };
75 
76 }
77 
78 namespace {
79 
80  template <class T> struct GSLparam {
81 
82  //The function to find root for
83  const T & function;
84 
85  };
86 
87 }
88 
89 #endif /* HERWIG_GSLHelper_H */
V ValType
Typedef for Value type.
Definition: GSLHelper.h:54
GSLHelper()
Constructor.
Definition: GSLHelper.h:39
from, which can then be used by the GSL algorithms that need a pointer to a function and don&#39;t know a...
Definition: GSLHelper.h:31
virtual ~GSLHelper()
Destructor.
Definition: GSLHelper.h:44
virtual T aUnit() const
Agrument type.
Definition: GSLHelper.h:64
-*- C++ -*-
T ArgType
Typedef for Agrument type.
Definition: GSLHelper.h:49
static constexpr std::enable_if<(std::is_arithmetic< U >::value &&std::is_same< U, T >::value), U >::type baseunit()
virtual V vUnit() const
Value type.
Definition: GSLHelper.h:59