Stimfit
0.13.15
|
Math functions. More...
#include <vector>
#include <complex>
#include <deque>
#include "./../stf.h"
#include "fftw3.h"
#include "./spline.h"
Go to the source code of this file.
Classes | |
struct | stf::parInfo |
Information about parameters used in storedFunc. More... | |
struct | stf::storedFunc |
Function used for least-squares fitting. More... | |
Namespaces | |
namespace | stf |
The stimfit namespace. | |
Typedefs | |
typedef boost::function < double(double, const Vector_double &)> | stf::Func |
A function taking a double and a vector and returning a double. | |
typedef boost::function < Vector_double(double, const Vector_double &)> | stf::Jac |
The jacobian of a stf::Func. | |
typedef boost::function < double(double, double, double, double, double)> | stf::Scale |
Scaling function for fit parameters. | |
typedef boost::function< Table(const Vector_double &, const std::vector< stf::parInfo > , double)> | stf::Output |
Print the output of a fit into a stf::Table. | |
typedef boost::function< void(const Vector_double &, double, double, double, double, double, Vector_double &)> | stf::Init |
Initialising function for the parameters in stf::Func to start a fit. | |
typedef std::vector < stf::storedFunc > ::const_iterator | c_stfunc_it |
Functions | |
Vector_double | stf::nojac (double x, const Vector_double &p) |
Dummy function, serves as a placeholder to initialize functions without a Jacobian. | |
double | stf::noscale (double param, double xscale, double xoff, double yscale, double yoff) |
Dummy function, serves as a placeholder to initialize parameters without a scaling function. | |
Table | stf::defaultOutput (const Vector_double &pars, const std::vector< parInfo > &parsInfo, double chisqr) |
Default fit output function, constructing a stf::Table from the parameters, their description and chisqr. | |
template<typename T > | |
T | stf::SQR (T a) |
Calculates the square of a number. | |
Vector_double | stf::filter (const Vector_double &toFilter, std::size_t filter_start, std::size_t filter_end, const Vector_double &a, int SR, stf::Func func, bool inverse=false) |
Convolves a data set with a filter function. | |
std::map< double, int > | stf::histogram (const Vector_double &data, int nbins=-1) |
Computes a histogram. | |
StfDll Vector_double | stf::deconvolve (const Vector_double &data, const Vector_double &templ, int SR, double hipass, double lopass, stfio::ProgressInfo &progDlg) |
Deconvolves a template from a signal. | |
template<class T > | |
std::vector< T > | stf::cubicSpline (const std::vector< T > &y, T oldF, T newF) |
Interpolates a dataset using cubic splines. | |
template<class T > | |
std::vector< T > | stf::diff (const std::vector< T > &input, T x_scale) |
Differentiate data. | |
double | stf::integrate_simpson (const Vector_double &input, std::size_t a, std::size_t b, double x_scale) |
Integration using Simpson's rule. | |
double | stf::integrate_trapezium (const Vector_double &input, std::size_t a, std::size_t b, double x_scale) |
Integration using the trapezium rule. | |
int | stf::linsolv (int m, int n, int nrhs, Vector_double &A, Vector_double &B) |
Solves a linear equation system using LAPACK. | |
Vector_double | stf::quad (const Vector_double &data, std::size_t begin, std::size_t end) |
Solve quadratic equations for 3 adjacent sampling points. | |
StfDll Vector_double | stf::detectionCriterion (const Vector_double &data, const Vector_double &templ, stfio::ProgressInfo &progDlg) |
Computes the event detection criterion according to Clements & Bekkers (1997). | |
StfDll std::vector< int > | stf::peakIndices (const Vector_double &data, double threshold, int minDistance) |
Searches for positive-going peaks. | |
StfDll Vector_double | stf::linCorr (const Vector_double &va1, const Vector_double &va2, stfio::ProgressInfo &progDlg) |
Computes the linear correlation between two arrays. | |
double | stf::fgaussColqu (double x, const Vector_double &p) |
Computes a Gaussian that can be used as a filter kernel. | |
double | stf::fboltz (double x, const Vector_double &p) |
Computes a Boltzmann function. | |
double | stf::fbessel (double x, int n) |
Computes a Bessel polynomial. | |
double | stf::fbessel4 (double x, const Vector_double &p) |
Computes a 4th-order Bessel polynomial that can be used as a filter kernel. | |
int | stf::fac (int arg) |
Computes the faculty of an integer. | |
int | stf::pow2 (int arg) |
Computes \( 2^{arg} \). Uses the bitwise-shift operator (<<). | |
template<typename T > | |
void | SWAP (T s1, T s2) |
Swaps s1 and s2. |
typedef std::vector< stf::storedFunc >::const_iterator c_stfunc_it |
constant stf::storedFunc iterator