ARTS  2.3.1285(git:92a29ea9-dirty)
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 
56 void nlinspace(VectorView x,
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 
67  ConstVectorView za_grid,
68  ConstVectorView aa_grid);
69 
71  ConstVectorView za_grid);
72 
74  ConstVectorView za_grid,
75  ConstVectorView aa_grid,
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 
125 void flat(VectorView x, ConstMatrixView X);
126 void flat(VectorView x, ConstTensor3View X);
127 
130 
131 void calculate_weights_linear(Vector& x, Vector& w, const Index nph);
132 
133 #endif // math_funcs_h
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
The VectorView class.
Definition: matpackI.h:610
Numeric sign(const Numeric &x)
sign
Definition: math_funcs.cc:423
The Vector class.
Definition: matpackI.h:860
Numeric last(ConstVectorView x)
last
Definition: math_funcs.cc:165
The MatrixView class.
Definition: matpackI.h:1093
Index integer_div(const Index &x, const Index &y)
integer_div
Definition: math_funcs.cc:87
cmplx FADDEEVA() w(cmplx z, double relerr)
Definition: Faddeeva.cc:680
void nlogspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlogspace
Definition: math_funcs.cc:267
void nlinspace(Vector &x, const Numeric start, const Numeric stop, const Index n)
nlinspace
Definition: math_funcs.cc:231
Numeric mod_gamma_dist(Numeric x, Numeric N0, Numeric Lambda, Numeric mu, Numeric gamma)
Generalized Modified Gamma Distribution.
Definition: math_funcs.cc:653
The Tensor3View class.
Definition: matpackIII.h:239
void mgd(VectorView psd, const Vector &x, const Numeric &n0, const Numeric &mu, const Numeric &la, const Numeric &ga)
Definition: math_funcs.cc:451
#define beta
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Implementation of Matrix, Vector, and such stuff.
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
void linspace(Vector &x, const Numeric start, const Numeric stop, const Numeric step)
linspace
Definition: math_funcs.cc:204
Numeric fac(const Index n)
fac
Definition: math_funcs.cc:63
This can be used to make arrays out of anything.
Definition: array.h:40
Numeric AngIntegrate_trapezoid(ConstMatrixView Integrand, ConstVectorView za_grid, ConstVectorView aa_grid)
AngIntegrate_trapezoid.
Definition: math_funcs.cc:296
A constant view of a Tensor3.
Definition: matpackIII.h:132
A constant view of a Vector.
Definition: matpackI.h:476
void reshape(MatrixView X, ConstVectorView x)
reshape
Definition: math_funcs.cc:789
Numeric AngIntegrate_trapezoid_opti(ConstMatrixView Integrand, ConstVectorView za_grid, ConstVectorView aa_grid, ConstVectorView grid_stepsize)
AngIntegrate_trapezoid_opti.
Definition: math_funcs.cc:340
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
void calculate_weights_linear(Vector &x, Vector &w, const Index nph)
calculate_weights_linear
Definition: math_funcs.cc:813
A constant view of a Matrix.
Definition: matpackI.h:982
void unitl(Vector &x)
unitl
Definition: math_funcs.cc:687
void flat(VectorView x, ConstMatrixView X)
flat
Definition: math_funcs.cc:707
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