herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
GSLHelper.h
1// -*- C++ -*-
2//
3// GSLHelper.h is a part of Herwig - A multi-purpose Monte Carlo event generator
4// Copyright (C) 2002-2019 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
15namespace Herwig {
16
17 using namespace ThePEG;
18
30template <typename V, typename T>
31struct GSLHelper
32{
33
34public:
35
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
66private:
67
72 GSLHelper & operator=(const GSLHelper &) = delete;
73
74};
75
76}
77
78namespace {
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 */
-*- C++ -*-
from, which can then be used by the GSL algorithms that need a pointer to a function and don't know a...
Definition: GSLHelper.h:32
T ArgType
Typedef for Agrument type.
Definition: GSLHelper.h:49
virtual T aUnit() const
Agrument type.
Definition: GSLHelper.h:64
virtual V vUnit() const
Value type.
Definition: GSLHelper.h:59
GSLHelper & operator=(const GSLHelper &)=delete
The assignment operator is private and must never be called.
virtual ~GSLHelper()
Destructor.
Definition: GSLHelper.h:44
GSLHelper()
Constructor.
Definition: GSLHelper.h:39
V ValType
Typedef for Value type.
Definition: GSLHelper.h:54
static constexpr std::enable_if<(std::is_arithmetic< U >::value &&std::is_same< U, T >::value), U >::type baseunit()