yat
0.21pre
yat
utility
multivariable
f.h
1
#ifndef theplu_yat_utility_multivariable_f
2
#define theplu_yat_utility_multivariable_f
3
4
// $Id: f.h 4252 2022-11-18 02:54:04Z peter $
5
6
/*
7
Copyright (C) 2022 Peter Johansson
8
9
This file is part of the yat library, https://dev.thep.lu.se/yat
10
11
The yat library is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License as
13
published by the Free Software Foundation; either version 3 of the
14
License, or (at your option) any later version.
15
16
The yat library is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
General Public License for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with yat. If not, see <https://www.gnu.org/licenses/>.
23
*/
24
25
#include <yat/utility/VectorConstView.h>
26
27
#include <gsl/gsl_vector.h>
28
29
namespace
theplu
{
30
namespace
yat {
31
namespace
utility {
32
33
namespace
multivariable
34
{
35
template
<
class
FUNC>
36
double
f(
const
gsl_vector* gsl_x,
void
* params)
37
{
38
FUNC* func =
static_cast<
FUNC*
>
(params);
39
yat::utility::VectorConstView x(gsl_x);
40
return
(*func)(x);
41
}
42
}
// end namespace multi_minimizer
43
44
}}}
// end namespaces utility, yat and theplu
45
#endif
theplu
The Department of Theoretical Physics namespace as we define it.
Generated on Wed Jan 25 2023 03:34:29 for yat by
1.8.14