# unitCube_cos2-class: An S4 class to represent the function... In multIntTestFunc: Provides Test Functions for Multivariate Integration

## Description

Implementation of the function

f \colon [0,1]^n \to [0,1],\, \vec{x} \mapsto f(\vec{x}) = (\cos(\vec{x}\cdot\vec{v}))^2,

where n \in \{1,2,3,…\} is the dimension of the integration domain C_n = [0,1]^n and \vec{v} is a n-dimensional parameter vector where each entry is different from 0. The integral is known to be

\int_{C_n} f(\vec{x}) d\vec{x} = \frac{1}{2}+\frac{1}{2}\cos(∑_{j=1}^{n}v_j)∏_{j=1}^{n}\frac{\sin(v_j)}{v_j}.

## Details

The instance needs to be created with two parameters representing the dimension n and the n-dimensional parameter vector where each entry is different from 0.

## Slots

dim

An integer that captures the dimension

coeffs

A vector of non-zero parameters

## Examples

 1 2 n <- as.integer(3) f <- new("unitCube_cos2",dim=n, coeffs=c(-1,2,-2)) 

multIntTestFunc documentation built on Oct. 5, 2021, 5:08 p.m.