Namespaces

Types

Type Sample

Namespace MathNet.Numerics.Sampling

Generic Function Sampling and Quantization Provider

Methods

Public static methods

T[] ChebyshevNodesFirstKind<T>(Func<double, T> function, double intervalBegin, double intervalEnd, int sampleCount)

Samples a function at the roots of the Chebyshev polynomial of the first kind.
Parameters
return T[] Vector of the function sampled in [a,b] at (b+a)/2+(b-1)/2*cos(pi*(2i-1)/(2n))
Func<double, T> function The real-domain function to sample.
double intervalBegin The real domain interval begin where to start sampling.
double intervalEnd The real domain interval end where to stop sampling.
int sampleCount The number of samples to generate.

T[] ChebyshevNodesSecondKind<T>(Func<double, T> function, double intervalBegin, double intervalEnd, int sampleCount)

Samples a function at the roots of the Chebyshev polynomial of the second kind.
Parameters
return T[] Vector of the function sampled in [a,b] at (b+a)/2+(b-1)/2*cos(pi*i/(n-1))
Func<double, T> function The real-domain function to sample.
double intervalBegin The real domain interval begin where to start sampling.
double intervalEnd The real domain interval end where to stop sampling.
int sampleCount The number of samples to generate.

IEnumerable<T> EquidistantContinuous<T>(Func<double, T> function, double start, double step)

Samples a function equidistant continuously starting from the provided location with a fixed step length.
Parameters
return IEnumerable<T> The generated sample enumerator.
Func<double, T> function The real-domain function to sample.
double start The real domain location offset where to start sampling.
double step The real domain step length between the equidistant samples.

T[] EquidistantInterval<T>(Func<double, T> function, double intervalBegin, double intervalEnd, int sampleCount, Double[]& samplePoints)

Parameters
return T[]
Func<double, T> function
double intervalBegin
double intervalEnd
int sampleCount
Double[]& samplePoints

T[] EquidistantInterval<T>(Func<double, T> function, double intervalBegin, double intervalEnd, int sampleCount)

Samples a function equidistant within the provided interval.
Parameters
return T[] The generated sample vector.
Func<double, T> function The real-domain function to sample.
double intervalBegin The real domain interval begin where to start sampling.
double intervalEnd The real domain interval end where to stop sampling.
int sampleCount The number of samples to generate.

T[] EquidistantPeriodic<T>(Func<double, T> function, double periodLength, double periodOffset, int sampleCount)

Samples a periodic function equidistant within one period, but omits the last sample such that the sequence can be concatenated together.
Parameters
return T[] The generated sample vector.
Func<double, T> function The real-domain function to sample.
double periodLength The real domain full period length.
double periodOffset The real domain offset where to start the sampling period.
int sampleCount The number of samples to generate.

T[] EquidistantPeriodic<T>(Func<double, T> function, double periodLength, double periodOffset, int sampleCount, Double[]& samplePoints)

Parameters
return T[]
Func<double, T> function
double periodLength
double periodOffset
int sampleCount
Double[]& samplePoints

T[] EquidistantStartingAt<T>(Func<double, T> function, double start, double step, int sampleCount, Double[]& samplePoints)

Parameters
return T[]
Func<double, T> function
double start
double step
int sampleCount
Double[]& samplePoints

T[] EquidistantStartingAt<T>(Func<double, T> function, double start, double step, int sampleCount)

Samples a function equidistant starting from the provided location with a fixed step length.
Parameters
return T[] The generated sample vector.
Func<double, T> function The real-domain function to sample.
double start The real domain location offset where to start sampling.
double step The real domain step length between the equidistant samples.
int sampleCount The number of samples to generate.

Func<int, T> EquidistantToFunction<T>(Func<double, T> function, double start, double step)

Samples a function equidistant with the provided start and step length to an integer-domain function
Parameters
return Func<int, T> The generated samples integer-domain function.
Func<double, T> function The real-domain function to sample.
double start The real domain location where to start sampling.
double step The real domain step length between the equidistant samples.

T[] Random<T>(Func<double, double, T> function, IContinuousDistribution distribution, int sampleCount)

Samples a two-domain function randomly with the provided distribution.
Parameters
return T[] The generated sample vector.
Func<double, double, T> function The real-domain function to sample.
IContinuousDistribution distribution Random distribution of the real domain sample points.
int sampleCount The number of samples to generate.

T[] Random<T>(Func<double, T> function, IContinuousDistribution distribution, int sampleCount, Double[]& samplePoints)

Parameters
return T[]
Func<double, T> function
IContinuousDistribution distribution
int sampleCount
Double[]& samplePoints

T[] Random<T>(Func<double, T> function, IContinuousDistribution distribution, int sampleCount)

Samples a function randomly with the provided distribution.
Parameters
return T[] The generated sample vector.
Func<double, T> function The real-domain function to sample.
IContinuousDistribution distribution Random distribution of the real domain sample points.
int sampleCount The number of samples to generate.