Bånder

Spline extends BaseAlgorithm
in package

Spline

Inputs:

[real] x - the input coordinate (x-axis)

Outputs:

[real] y - the value of the spline at x

Parameters:

beta1: real ∈ [0,inf] (default = 1) the skew or bias parameter (only available for type beta)

beta2: real ∈ [0,inf) (default = 0) the tension parameter

type: string ∈ {b,beta,quadratic} (default = "b") the type of spline to be computed

xPoints: vector_real (default = [0, 1]) the x-coordinates where data is specified (the points must be arranged in ascending order and cannot contain duplicates)

yPoints: vector_real (default = [0, 1]) the y-coordinates to be interpolated (i.e. the known data)

Description:

Evaluates a piecewise spline of type b, beta or quadratic. The input value, i.e. the point at which the spline is to be evaluated typically should be between xPoins[0] and xPoinst[size-1]. If the value lies outside this range, extrapolation is used. Regarding spline types:

  • B: evaluates a cubic B spline approximant.
  • Beta: evaluates a cubic beta spline approximant. For beta splines parameters 'beta1' and 'beta2' can be supplied. For no bias set beta1 to 1 and for no tension set beta2 to 0. Note that if beta1=1 and beta2=0, the cubic beta becomes a cubic B spline. On the other hand if beta1=1 and beta2 is large the beta spline turns into a linear spline.
  • Quadratic: evaluates a piecewise quadratic spline at a point. Note that size of input must be odd.

References: [1] Spline interpolation - Wikipedia, the free encyclopedia, http://en.wikipedia.org/wiki/Spline_interpolation

Category: Standard Mode: standard

Table of Contents

Properties

$algorithmName  : string
$category  : string
$essentia  : EssentiaFFI
$mode  : string
$parameters  : array<string|int, mixed>
$algorithmHandle  : CData|null
$configured  : bool

Methods

__construct()  : mixed
__destruct()  : mixed
compute()  : array<string|int, mixed>
getAlgorithmName()  : string
getCategory()  : string
getMode()  : string
getParameters()  : array<string|int, mixed>
setParameter()  : self
configure()  : void
isValidParameter()  : bool
validateInput()  : void
cleanupAlgorithm()  : void
configureAlgorithmParameters()  : void
estimateOutputSize()  : int
executeAlgorithm()  : array<string|int, mixed>
executeGenericAlgorithm()  : array<string|int, mixed>
executeSpecificAlgorithm()  : array<string|int, mixed>
getAlgorithmCreateFunction()  : string
getValidParameters()  : array<string|int, mixed>
initializeAlgorithm()  : void
prepareInput()  : mixed
processOutput()  : array<string|int, mixed>
processRhythmOutput()  : array<string|int, mixed>
processSpectralOutput()  : array<string|int, mixed>
processStatsOutput()  : array<string|int, mixed>
processTemporalOutput()  : array<string|int, mixed>
processTonalOutput()  : array<string|int, mixed>
setAlgorithmParameter()  : void
setArrayParameter()  : void
validateAlgorithmInput()  : void

Properties

$algorithmName

protected string $algorithmName = 'Spline'

$category

protected string $category = 'Standard'

$mode

protected string $mode = 'standard'

$parameters

protected array<string|int, mixed> $parameters = []

$algorithmHandle

private CData|null $algorithmHandle = null

$configured

private bool $configured = false

Methods

__construct()

public __construct([array<string|int, mixed> $parameters = [] ]) : mixed
Parameters
$parameters : array<string|int, mixed> = []

__destruct()

public __destruct() : mixed

compute()

public compute(mixed $input) : array<string|int, mixed>
Parameters
$input : mixed
Return values
array<string|int, mixed>

getAlgorithmName()

public getAlgorithmName() : string
Return values
string

getCategory()

public getCategory() : string
Return values
string

getParameters()

public getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

setParameter()

public setParameter(string $key, mixed $value) : self
Parameters
$key : string
$value : mixed
Return values
self

configure()

protected configure(array<string|int, mixed> $parameters) : void
Parameters
$parameters : array<string|int, mixed>

isValidParameter()

protected isValidParameter(string $parameter) : bool
Parameters
$parameter : string
Return values
bool

validateInput()

protected validateInput(mixed $input, string $expectedType) : void
Parameters
$input : mixed
$expectedType : string

cleanupAlgorithm()

private cleanupAlgorithm() : void

configureAlgorithmParameters()

private configureAlgorithmParameters() : void

estimateOutputSize()

private estimateOutputSize(mixed $input) : int
Parameters
$input : mixed
Return values
int

executeAlgorithm()

private executeAlgorithm(mixed $input) : array<string|int, mixed>
Parameters
$input : mixed
Return values
array<string|int, mixed>

executeGenericAlgorithm()

private executeGenericAlgorithm(FFI $ffi, mixed $input) : array<string|int, mixed>
Parameters
$ffi : FFI
$input : mixed
Return values
array<string|int, mixed>

executeSpecificAlgorithm()

private executeSpecificAlgorithm(FFI $ffi, mixed $input) : array<string|int, mixed>
Parameters
$ffi : FFI
$input : mixed
Return values
array<string|int, mixed>

getAlgorithmCreateFunction()

private getAlgorithmCreateFunction() : string
Return values
string

getValidParameters()

private getValidParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

initializeAlgorithm()

private initializeAlgorithm() : void

prepareInput()

private prepareInput(mixed $input) : mixed
Parameters
$input : mixed

processOutput()

private processOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
Return values
array<string|int, mixed>

processRhythmOutput()

private processRhythmOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
Return values
array<string|int, mixed>

processSpectralOutput()

private processSpectralOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
Return values
array<string|int, mixed>

processStatsOutput()

private processStatsOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
Return values
array<string|int, mixed>

processTemporalOutput()

private processTemporalOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
Return values
array<string|int, mixed>

processTonalOutput()

private processTonalOutput(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
$result : array<string|int, mixed>
Return values
array<string|int, mixed>

setAlgorithmParameter()

private setAlgorithmParameter(FFI $ffi, string $key, mixed $value) : void
Parameters
$ffi : FFI
$key : string
$value : mixed

setArrayParameter()

private setArrayParameter(FFI $ffi, string $key, array<string|int, mixed> $value) : void
Parameters
$ffi : FFI
$key : string
$value : array<string|int, mixed>

validateAlgorithmInput()

private validateAlgorithmInput(mixed $input) : void
Parameters
$input : mixed

        
On this page

Search results