closingConstant: Finds the closing constant(s)

View source: R/helpers.R

closingConstantR Documentation

Finds the closing constant(s)

Description

A closing constant is a real value, by which the function (or its Exp in case of log functions) needs to be divided to get the representative with measure 1.

Usage

closingConstant(f, ...)

## S3 method for class ''function''
closingConstant(f, measure = getReferenceMeasure(f), ...)

## S3 method for class 'BayesSpaceBasis'
closingConstant(f, measure = getReferenceMeasure(f), ...)

## S3 method for class 'BDataDensities'
closingConstant(f, measure = getReferenceMeasure(f), ...)

## S3 method for class 'BDataLogDensities'
closingConstant(f, measure = getReferenceMeasure(f), ...)

## S3 method for class 'BDataLogPDFs'
closingConstant(f, measure = getReferenceMeasure(f), ...)

## S3 method for class 'BDataPDFs'
closingConstant(f, measure = getReferenceMeasure(f), ...)

## S3 method for class 'BDataSplines'
closingConstant(f, measure = getReferenceMeasure(f), ...)

Arguments

f

a representation of a measure

...

further arguments for generic use

measure

the ReferenceMeasure, needed especially for functions

Value

a (vector) of numeric closing constants. Might contain Inf in case of infinite measures and 0 in case of functions that are constant zeros

Methods (by class)

  • closingConstant(`function`): method for function

  • closingConstant(BayesSpaceBasis): method for BayesSpaceBasis

  • closingConstant(BDataDensities): method for BDataDensities

  • closingConstant(BDataLogDensities): method for BDataLogDensities

  • closingConstant(BDataLogPDFs): method for BDataLogPDFs

  • closingConstant(BDataPDFs): method for BDataPDFs

  • closingConstant(BDataSplines): method for BDataSplines

Examples

# closing constant of f(x) = x^2 on Uniform(0,1)
closingConstant(function(x) x^2, measure = ReferenceMeasureUniform(0,1))


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