Last data update: 2014.03.03

R: Get canonical polynomial chaos expansion size
getMR Documentation

Get canonical polynomial chaos expansion size

Description

The getM is a very simple function that determines the size of the canonical polynomial chaos expansion for d random variables up to and including degree p in the expansion. The size is determined from choose(d+p,d) or factorial(d+p)/factorial(d)/factorial(p).

Usage

getM(d,p)

Arguments

d

Number of input random variables

p

Order of the polynomial chaos expansion

Value

M

Number of terms in the canonical d-dimensional polynomial chaos expansion up to and including degree p

Author(s)

Jordan Ko

References

R. Ghanem and P. Spanos, 1991, Stochastic Finite Elements: A Spectral Approach. Berlin: Springer.

Examples

d <- 10
p <- 15
m <- getM(d,p)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GPC)
Loading required package: randtoolbox
Loading required package: rngWELL
This is randtoolbox. For overview, type 'help("randtoolbox")'.
Loading required package: orthopolynom
Loading required package: polynom
Loading required package: ks
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: misc3d
Loading required package: mvtnorm
Loading required package: rgl
Loading required package: lars
Loaded lars 1.2

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GPC/getM.Rd_%03d_medium.png", width=480, height=480)
> ### Name: getM
> ### Title: Get canonical polynomial chaos expansion size
> ### Aliases: getM
> 
> ### ** Examples
> 
> d <- 10
> p <- 15
> m <- getM(d,p)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>