ARTS  2.4.0(git:4fb77825)
math_funcs.h
Go to the documentation of this file.
1 /* Copyright (C) 2002-2012
2  Patrick Eriksson <Patrick.Eriksson@chalmers.se>
3  Stefan Buehler <sbuehler@ltu.se>
4 
5  This program is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License as published by the
7  Free Software Foundation; either version 2, or (at your option) any
8  later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18  USA. */
19 
20 /*****************************************************************************
21  *** File description
22  *****************************************************************************/
23 
32 #ifndef math_funcs_h
33 #define math_funcs_h
34 
35 #include "matpackI.h"
36 #include "matpackIII.h"
37 
38 Numeric fac(const Index n);
39 
40 Index integer_div(const Index& x, const Index& y);
41 
43 
44 Index last(const ArrayOfIndex& x);
45 
46 void linspace(Vector& x,
47  const Numeric start,
48  const Numeric stop,
49  const Numeric step);
50 
51 void nlinspace(Vector& x,
52  const Numeric start,
53  const Numeric stop,
54  const Index n);
55 
57  const Numeric start,
58  const Numeric stop,
59  const Index n);
60 
61 void nlogspace(Vector& x,
62  const Numeric start,
63  const Numeric stop,
64  const Index n);
65 
69 
72 
76  ConstVectorView grid_stepsize);
77 
78 Numeric sign(const Numeric& x);
79 
80 void mgd(VectorView psd,
81  const Vector& x,
82  const Numeric& n0,
83  const Numeric& mu,
84  const Numeric& la,
85  const Numeric& ga);
86 
88  MatrixView jac_data,
89  const Vector& x,
90  const Numeric& n0,
91  const Numeric& mu,
92  const Numeric& la,
93  const Numeric& ga,
94  const bool& do_n0_jac,
95  const bool& do_mu_jac,
96  const bool& do_la_jac,
97  const bool& do_ga_jac);
98 
115  MatrixView jac_data,
116  const Vector& x,
117  const Numeric& alpha,
118  const Numeric& beta);
119 
121  Numeric x, Numeric N0, Numeric Lambda, Numeric mu, Numeric gamma);
122 
123 void unitl(Vector& x);
124 
127 
130 
131 void calculate_weights_linear(Vector& x, Vector& w, const Index nph);
132 
133 #endif // math_funcs_h
MatrixView
The MatrixView class.
Definition: matpackI.h:1093
integer_div
Index integer_div(const Index &x, const Index &y)
integer_div
Definition: math_funcs.cc:87
mod_gamma_dist
Numeric mod_gamma_dist(Numeric x, Numeric N0, Numeric Lambda, Numeric mu, Numeric gamma)
Generalized Modified Gamma Distribution.
Definition: math_funcs.cc:653
w
Complex w(Complex z) noexcept
The Faddeeva function.
Definition: linefunctions.cc:42
nlinspace
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Definition: math_funcs.cc:231
ARTS::Var::y
Vector y(Workspace &ws) noexcept
Definition: autoarts.h:7401
nlogspace
void nlogspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlogspace
Definition: math_funcs.cc:267
matpackI.h
Implementation of Matrix, Vector, and such stuff.
reshape
void reshape(MatrixView X, ConstVectorView x)
reshape
Definition: math_funcs.cc:789
Tensor3View
The Tensor3View class.
Definition: matpackIII.h:239
delanoe_shape_with_derivative
void delanoe_shape_with_derivative(VectorView psd, MatrixView jac_data, const Vector &x, const Numeric &alpha, const Numeric &beta)
! Shape functions for normalized PSD.
Definition: math_funcs.cc:619
Array
This can be used to make arrays out of anything.
Definition: array.h:108
sign
Numeric sign(const Numeric &x)
sign
Definition: math_funcs.cc:423
mgd_with_derivatives
void mgd_with_derivatives(VectorView psd, MatrixView jac_data, const Vector &x, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga, const bool &do_n0_jac, const bool &do_mu_jac, const bool &do_la_jac, const bool &do_ga_jac)
Definition: math_funcs.cc:530
VectorView
The VectorView class.
Definition: matpackI.h:610
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
last
Numeric last(ConstVectorView x)
last
Definition: math_funcs.cc:165
matpackIII.h
ARTS::Var::za_grid
Vector za_grid(Workspace &ws) noexcept
Definition: autoarts.h:7771
fac
Numeric fac(const Index n)
fac
Definition: math_funcs.cc:63
ConstMatrixView
A constant view of a Matrix.
Definition: matpackI.h:982
linspace
void linspace(Vector &x, const Numeric start, const Numeric stop, const Numeric step)
linspace
Definition: math_funcs.cc:204
Zeeman::start
constexpr Rational start(Rational Ju, Rational Jl, Polarization type) noexcept
Gives the lowest M for a polarization type of this transition.
Definition: zeemandata.h:77
unitl
void unitl(Vector &x)
unitl
Definition: math_funcs.cc:687
ConstTensor3View
A constant view of a Tensor3.
Definition: matpackIII.h:132
AngIntegrate_trapezoid_opti
Numeric AngIntegrate_trapezoid_opti(ConstMatrixView Integrand, ConstVectorView za_grid, ConstVectorView aa_grid, ConstVectorView grid_stepsize)
AngIntegrate_trapezoid_opti.
Definition: math_funcs.cc:340
calculate_weights_linear
void calculate_weights_linear(Vector &x, Vector &w, const Index nph)
calculate_weights_linear
Definition: math_funcs.cc:813
flat
void flat(VectorView x, ConstMatrixView X)
flat
Definition: math_funcs.cc:707
ARTS::Var::x
Vector x(Workspace &ws) noexcept
Definition: autoarts.h:7346
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
Vector
The Vector class.
Definition: matpackI.h:860
beta
#define beta
Definition: legacy_continua.cc:21435
AngIntegrate_trapezoid
Numeric AngIntegrate_trapezoid(ConstMatrixView Integrand, ConstVectorView za_grid, ConstVectorView aa_grid)
AngIntegrate_trapezoid.
Definition: math_funcs.cc:296
ARTS::Var::aa_grid
Vector aa_grid(Workspace &ws) noexcept
Definition: autoarts.h:1717
ConstVectorView
A constant view of a Vector.
Definition: matpackI.h:476
mgd
void mgd(VectorView psd, const Vector &x, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga)
Definition: math_funcs.cc:451