23#include <kisstype/type.h>
33 void mulitplyAdd(std::vector<eis::DataPoint>& data, fvalue mult, fvalue add);
42 std::complex<fvalue>
absGrad(
const std::vector<eis::DataPoint>& data,
size_t index);
51 fvalue
grad(
const std::vector<fvalue>& data,
const std::vector<fvalue>& omega,
size_t index);
60 std::complex<fvalue>
grad(
const std::vector<eis::DataPoint>& data,
size_t index);
68 fvalue
mean(
const std::vector<fvalue>& data);
76 std::complex<fvalue>
mean(
const std::vector<eis::DataPoint>& data);
84 fvalue
median(std::vector<fvalue> data);
92 std::complex<fvalue>
median(
const std::vector<eis::DataPoint>& data);
103 void difference(std::vector<eis::DataPoint>& a,
const std::vector<eis::DataPoint>& b);
112 std::vector<eis::DataPoint>
rescale(
const std::vector<eis::DataPoint>& data,
size_t outputSize);
122 fvalue nonConstantScore(
const std::vector<eis::DataPoint>& data);
148 void noise(std::vector<eis::DataPoint>& data,
double amplitude,
bool relative);
168 bool fvalueEq(fvalue a, fvalue b,
unsigned int ulp = 4);
182 const std::vector<eis::DataPoint>& data,
183 bool linearExtrapolation =
false);
194 fvalue
eisDistance(
const std::vector<eis::DataPoint>& a,
const std::vector<eis::DataPoint>& b);
208 fvalue
eisNyquistDistance(
const std::vector<eis::DataPoint>& a,
const std::vector<eis::DataPoint>& b);
std::vector< eis::DataPoint > fitToFrequencies(std::vector< fvalue > omegas, const std::vector< eis::DataPoint > &data, bool linearExtrapolation=false)
This function resamples, extrapolates and interpolates to fit the data given to the frequencies also ...
std::vector< eis::DataPoint > rescale(const std::vector< eis::DataPoint > &data, size_t outputSize)
Resamples the data to the given amount of points.
fvalue median(std::vector< fvalue > data)
Calculates the median of the given data.
fvalue mean(const std::vector< fvalue > &data)
Calculates the mean of the given data.
void difference(std::vector< eis::DataPoint > &a, const std::vector< eis::DataPoint > &b)
Calculates the difference between two spectra.
fvalue maximumNyquistJump(const std::vector< eis::DataPoint > &data)
Finds the maximum distance between subsequent points in the data in the nyquist plane.
fvalue nyquistAreaVariance(const std::vector< eis::DataPoint > &data, eis::DataPoint *centroid=nullptr)
Calculates the variance of the distance of the data from a centroid in the nyquist plane.
void removeDuplicates(std::vector< eis::DataPoint > &data)
Removes duplicate data points from the data.
fvalue eisDistance(const std::vector< eis::DataPoint > &a, const std::vector< eis::DataPoint > &b)
Returns the mean l2 element wise distance of the given spectra.
fvalue grad(const std::vector< fvalue > &data, const std::vector< fvalue > &omega, size_t index)
Calculates derivative at the given point of the data given.
bool fvalueEq(fvalue a, fvalue b, unsigned int ulp=4)
Checks two fvalues for equality.
void noise(std::vector< eis::DataPoint > &data, double amplitude, bool relative)
Adds white noise to the data.
fvalue pearsonCorrelation(const std::vector< eis::DataPoint > &data)
Calculates the Pearson correlation between the imaginary and the real part of the data.
fvalue eisNyquistDistance(const std::vector< eis::DataPoint > &a, const std::vector< eis::DataPoint > &b)
Returns the mean distance of the points in a to the linearly interpolated nyquist curve of b.
std::complex< fvalue > absGrad(const std::vector< eis::DataPoint > &data, size_t index)
Calculates the element wise absolute gradient at the given point of the data given.
eisgenerator Copyright (C) 2021 Carl Klemm
Definition basicmath.h:26