Package_gsl.hpp
Go to the documentation of this file.
1
// Copyright 2019, University of Maryland and the MANGO development team.
2
//
3
// This file is part of MANGO.
4
//
5
// MANGO is free software: you can redistribute it and/or modify it
6
// under the terms of the GNU Lesser General Public License as
7
// published by the Free Software Foundation, either version 3 of the
8
// License, or (at your option) any later version.
9
//
10
// MANGO is distributed in the hope that it will be useful, but
11
// WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with MANGO. If not, see
17
// <https://www.gnu.org/licenses/>.
18
19
#ifndef MANGO_PACKAGE_GSL_H
20
#define MANGO_PACKAGE_GSL_H
21
22
#ifdef MANGO_GSL_AVAILABLE
23
#include <gsl/gsl_vector.h>
24
#include <gsl/gsl_matrix.h>
25
#endif
26
27
namespace
mango
{
28
29
class
Solver;
30
class
Least_squares_solver;
31
32
class
Package_gsl
:
public
Package
{
33
private
:
34
#ifdef MANGO_GSL_AVAILABLE
35
static
int
gsl_residual_function(
const
gsl_vector*,
void
*, gsl_vector*);
36
static
int
gsl_residual_function_and_Jacobian(
const
gsl_vector*,
void
*, gsl_matrix*);
37
static
double
gsl_objective_function(
const
gsl_vector*,
void
*);
38
static
void
gsl_gradient(
const
gsl_vector*,
void
*, gsl_vector*);
39
static
void
gsl_objective_function_and_gradient(
const
gsl_vector*,
void
*,
double
*, gsl_vector*);
40
#endif
41
42
public
:
43
void
optimize
(
Solver
*);
44
void
optimize_least_squares
(
Least_squares_solver
*);
45
};
46
}
47
48
#endif
mango::Package
Definition:
Package.hpp:29
mango::Least_squares_solver
Definition:
Least_squares_solver.hpp:28
mango::Package_gsl
Definition:
Package_gsl.hpp:32
mango::Package_gsl::optimize_least_squares
void optimize_least_squares(Least_squares_solver *)
Definition:
optimize_least_squares_gsl.cpp:32
mango
This C++ namespace contains everything related to MANGO.
Definition:
Imfil.hpp:7
mango::Solver
Definition:
Solver.hpp:31
mango::Package_gsl::optimize
void optimize(Solver *)
Definition:
optimize_gsl.cpp:32