nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Math.SignalProcessing / BasisFunction

BasisFunction

Full name Microsoft.VisualBasic.Math.SignalProcessing.Source.Generators.BasisFunction Assembly Microsoft.VisualBasic.Math.SignalProcessing Members 10

The abstract base class for all deterministic basis signal functions.

00 Remarks

Every basis function is modeled as a function of a single time variable x with four universal parameters:

The default evaluation is Offset + Amp * Shape((x - Center) / Scale). A concrete basis function only needs to override BasisFunction.Shape(), while combinators (sum, product, convolution, ...) override BasisFunction.Evaluate() instead. This makes both primitive functions and composite generators interchangeable as building blocks.

01 Syntax

Microsoft.VisualBasic.Math.SignalProcessing.Source.Generators.BasisFunction

02 Methods

NameOverloadsSummary
Shape 1 the normalized shape of the basis function, evaluated at the shifted and scaled coordinate u which equals (x - Center) / Scale at call time.
Evaluate 1 evaluate the basis function at a given time point x.
Sample 2 sample the signal over a given time grid.
ToGeneralSignal 1 sample the signal and wrap it into a GeneralSignal so that it can be consumed by the downstream processing pipeline.
CopyParametersTo 1 create a deep-ish copy of the universal parameters onto another basis function (useful when building a generator programmatically).

03 Properties

NameOverloadsSummary
Amp 1 amplitude / scaling factor.
Center 1 center / horizontal shift (x0).
Scale 1 width / frequency / steepness factor.
Offset 1 vertical offset (baseline).

04 Members

method Shape #
Shape(Double)

the normalized shape of the basis function, evaluated at the shifted and scaled coordinate u which equals (x - Center) / Scale at call time.

Parameters
NameTypeDescription
uDouble

the normalized coordinate

Returns

the shape value (before amp / offset applied)

method Evaluate #
Evaluate(Double)

evaluate the basis function at a given time point x. Combinators override this to combine their operands.

Parameters
NameTypeDescription
xDouble

the time coordinate

Returns

the signal value

method Sample #
Sample(IEnumerable(Of Double))

sample the signal over a given time grid. The default implementation simply evaluates each point; combinators such as convolution may override this to perform whole-signal operations.

Parameters
NameTypeDescription
xIEnumerable(Of Double)

the time grid to sample on

Returns

the sampled signal values

method Sample overload 2 #
Sample(Double, Double, Int32)

sample the signal on an evenly spaced time grid.

Parameters
NameTypeDescription
minDouble

the start time

maxDouble

the end time

nInt32

the number of sample points (must be > 0)

Returns

the sampled signal values

method ToGeneralSignal #
ToGeneralSignal(IEnumerable(Of Double), String, String)

sample the signal and wrap it into a GeneralSignal so that it can be consumed by the downstream processing pipeline.

Parameters
NameTypeDescription
xIEnumerable(Of Double)

the time grid

referenceString

the signal id / variable name

unitString

the measure unit of the x axis

Returns

the sampled signal as a GeneralSignal

method CopyParametersTo #
CopyParametersTo(BasisFunction)

create a deep-ish copy of the universal parameters onto another basis function (useful when building a generator programmatically).

Parameters
NameTypeDescription
otherBasisFunction

the target basis function

Returns

the target, for chaining

property Amp #
Amp

amplitude / scaling factor. Default 1.

property Center #
Center

center / horizontal shift (x0). Controls when the feature occurs.

property Scale #
Scale

width / frequency / steepness factor. Interpreted by each subclass.

property Offset #
Offset

vertical offset (baseline). Default 0.