Psi4
utility.h
Go to the documentation of this file.
1 /*
2  * @BEGIN LICENSE
3  *
4  * Psi4: an open-source quantum chemistry software package
5  *
6  * Copyright (c) 2007-2017 The Psi4 Developers.
7  *
8  * The copyrights for code used from other parties are included in
9  * the corresponding files.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version.
15  *
16  * This program 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
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License along
22  * with this program; if not, write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24  *
25  * @END LICENSE
26  */
27 
28 #ifndef FUNCTIONAL_UTILITY
29 #define FUNCTIONAL_UTILITY
30 
32 // 0.0 if x <= 0
33 // for matlab piecewise functions
34 inline double heaviside(double x)
35 {
36  return (x > 0.0 ? 1.0 : 0.0);
37 }
38 
40 // for matlab piecewise functions
41 inline double dirac(double x, ...)
42 {
43  return 0.0;
44 }
45 
46 double Ei(double x);
47 double expei(double x);
48 static const double expei_cutoff = 700.0;
49 
50 #endif
double Ei(double x)
Definition: utility.cc:103
double heaviside(double x)
heaviside(x) = 1.0 if x &gt; 0
Definition: utility.h:34
double dirac(double x,...)
dirac(...) = 0.0 for all x
Definition: utility.h:41
static const double expei_cutoff
Definition: utility.h:48
double expei(double x)
Definition: utility.cc:60