centeringConstant: Finds the centering constant(s)

View source: R/helpers.R

centeringConstantR Documentation

Finds the centering constant(s)

Description

A centering constant is a real value, by which needs to be substracted from a function (of its log in case of densities) get an integral of 0.

Usage

centeringConstant(f, ...)

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

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

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

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

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

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

## S3 method for class 'BDataSplines'
centeringConstant(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 centering constants. Might contain Inf in case of infinite measures and 0 in case of functions that are constant zeros

Methods (by class)

  • centeringConstant(`function`): method for function

  • centeringConstant(BayesSpaceBasis): method for BayesSpaceBasis

  • centeringConstant(BDataDensities): method for BDataDensities

  • centeringConstant(BDataLogDensities): method for BDataLogDensities

  • centeringConstant(BDataLogPDFs): method for BDataLogPDFs

  • centeringConstant(BDataPDFs): method for BDataPDFs

  • centeringConstant(BDataSplines): method for BDataSplines

Examples

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


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