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 file is part of Psi4.
12  *
13  * Psi4 is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU Lesser General Public License as published by
15  * the Free Software Foundation, version 3.
16  *
17  * Psi4 is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Lesser General Public License for more details.
21  *
22  * You should have received a copy of the GNU Lesser General Public License along
23  * with Psi4; if not, write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25  *
26  * @END LICENSE
27  */
28 
29 #ifndef FUNCTIONAL_UTILITY
30 #define FUNCTIONAL_UTILITY
31 
33 // 0.0 if x <= 0
34 // for matlab piecewise functions
35 inline double heaviside(double x)
36 {
37  return (x > 0.0 ? 1.0 : 0.0);
38 }
39 
41 // for matlab piecewise functions
42 inline double dirac(double x, ...)
43 {
44  return 0.0;
45 }
46 
47 double Ei(double x);
48 double expei(double x);
49 static const double expei_cutoff = 700.0;
50 
51 #endif
double Ei(double x)
Definition: utility.cc:104
double heaviside(double x)
heaviside(x) = 1.0 if x &gt; 0
Definition: utility.h:35
double dirac(double x,...)
dirac(...) = 0.0 for all x
Definition: utility.h:42
static const double expei_cutoff
Definition: utility.h:49
double expei(double x)
Definition: utility.cc:61