TransportMaps.Maps.Functionals.FunctionalBase
¶
Module Contents¶
Classes¶
Abstract class for functions \(f:\mathbb{R}^d\rightarrow\mathbb{R}\). |
|
Abstract class for functions \(f:\mathbb{R}^d\rightarrow\mathbb{R}\). |
- class TransportMaps.Maps.Functionals.FunctionalBase.Functional(dim)[source]¶
Bases:
TransportMaps.Maps.Map
Abstract class for functions \(f:\mathbb{R}^d\rightarrow\mathbb{R}\).
- abstract evaluate(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(f_{\bf a}\) at
x
.- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
dict
) – dictionary of precomputed valuesidxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by
idxs_slice
must matchx.shape[0]
.cache (
dict
) – cache
- Returns:
(
ndarray
[\(m,1\)]) – function evaluations
- abstract grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(\nabla_{\bf x} f_{\bf a}\) at
x
.- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
dict
) – dictionary of precomputed valuesidxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by
idxs_slice
must matchx.shape[0]
.cache (
dict
) – cache
- Returns:
- (
ndarray
[\(m,1,d\)]) – \(\nabla_{\bf x} f_{\bf a}({\bf x})\)
- (
- abstract partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(\partial_{x_d} f_{\bf a}\) at
x
.- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
dict
) – dictionary of precomputed valuesidxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by
idxs_slice
must matchx.shape[0]
.cache (
dict
) – cache
- Returns:
- (
ndarray
[\(m,1\)]) – \(\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- abstract grad_x_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(\nabla_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
dict
) – dictionary of precomputed valuesidxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by
idxs_slice
must matchx.shape[0]
.cache (
dict
) – cache
- Returns:
- (
ndarray
[\(m,1,d\)]) – \(\nabla_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- abstract hess_x_partial_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}\) at
x
.- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
dict
) – dictionary of precomputed valuesidxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by
idxs_slice
must matchx.shape[0]
.cache (
dict
) – cache
- Returns:
- (
ndarray
[\(m,1,d,d\)]) – \(\nabla^2_{\bf x}\partial_{x_d} f_{\bf a}({\bf x})\)
- (
- abstract partial2_xd(x, precomp=None, idxs_slice=slice(None), cache=None)[source]¶
[Abstract] Evaluate \(\partial^2_{x_d} f_{\bf a}\) at
x
.- Parameters:
x (
ndarray
[\(m,d\)]) – evaluation pointsprecomp (
dict
) – dictionary of precomputed valuesidxs_slice (slice) – if precomputed values are present, this parameter indicates at which of the points to evaluate. The number of indices represented by
idxs_slice
must matchx.shape[0]
.cache (
dict
) – cache
- Returns:
- (
ndarray
[\(m,1\)]) – \(\partial^2_{x_d} f_{\bf a}({\bf x})\)
- (
- abstract precomp_evaluate(x, precomp=None)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(f_{\bf a}\) at
x
.
- abstract precomp_grad_x(x, precomp=None)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\nabla_{\bf x} f_{\bf a}\) at
x
- abstract precomp_partial_xd(x, precomp=None)[source]¶
[Abstract] Precompute necessary structures for the evaluation of \(\partial_{x_d} f_{\bf a}\) at
x
.
- class TransportMaps.Maps.Functionals.FunctionalBase.Function(dim)[source]¶
Bases:
Functional
Abstract class for functions \(f:\mathbb{R}^d\rightarrow\mathbb{R}\).