getPDF: returns the probability density function

View source: R/helpers.R

getPDFR Documentation

returns the probability density function

Description

The probability density function, also known as the Lebesgue density of the measure is returned. In case of datasets a dataset of such functions is returned. (To be encoded as BDataPDF)

Usage

getPDF(X, ...)

## S3 method for class 'ReferenceMeasureUniform'
getPDF(X, ...)

## S3 method for class 'ReferenceMeasureTransformed'
getPDF(X, ...)

## S3 method for class 'BData'
getPDF(X, ...)

Arguments

X

the distribution hows Lebesgue density shall be returned

...

potential futher arguments for the computational method

Value

a function (or a list of functions if a dataset of distributions is given) that can compute the probably density function.

Methods (by class)

  • getPDF(ReferenceMeasureUniform): method for ReferenceMeasureUniform

  • getPDF(ReferenceMeasureTransformed): method for ReferenceMeasureUniform

  • getPDF(BData): method for BData objects, returns BDataPDFs (TODO)

Examples

x = seq(-1,2,by=0.1)
f1 = getPDF(StdReferenceMeasureUnif01)
plot(x,f1(x))
f2 = getPDF(StdReferenceMeasureN01)
plot(x,f2(x),type="l")
f3 = getPDF(BDataLogDensities(list(sin),basis=B2Unif01Basis5))
plot(x,f3(x),type="l")
getPDF(BDataLogDensities(list(sin,cos,\(x)(1)),basis=B2Unif01Basis5))


DistributionalDDA documentation built on Oct. 20, 2026, 5:06 p.m.