TransportMaps.Maps.ListStackedMapBase

Module Contents

Classes

ListStackedMap

Defines the map \(T\) obtained by stacking \(T_1, T_2, \ldots\).

class TransportMaps.Maps.ListStackedMapBase.ListStackedMap(**kwargs)[source]

Bases: TransportMaps.Maps.MapBase.Map

Defines the map \(T\) obtained by stacking \(T_1, T_2, \ldots\).

\[\begin{split}T({\bf x}) = \left[ \begin{array}{c} T_1({\bf x}_{0:d_1}) \\ T_2({\bf x}_{0:d_2}) \\ \vdots \end{array} \right]\end{split}\]
property map_list[source]
property active_vars[source]
property n_maps[source]
get_ncalls_tree(indent='')[source]
get_nevals_tree(indent='')[source]
get_teval_tree(indent='')[source]
update_ncalls_tree(obj)[source]
update_nevals_tree(obj)[source]
update_teval_tree(obj)[source]
reset_counters()[source]
evaluate(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

[Abstract] Evaluate the map \(T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – evaluation points

  • precomp (dict) – dictionary of precomputed values

  • idxs_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 match x.shape[0].

Returns:

(ndarray [\(m,d_y\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

grad_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

[Abstract] Evaluate the gradient \(\nabla_{\bf x}T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – evaluation points

  • precomp (dict) – dictionary of precomputed values

  • idxs_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 match x.shape[0].

Returns:

(ndarray [\(m,d_y,d_x\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

tuple_grad_x(x, *args, **kwargs)[source]

[Abstract] Evaluate the function and gradient.

Parameters:
  • x (ndarray [\(m,d_x\)]) – evaluation points

  • precomp (dict) – dictionary of precomputed values

  • idxs_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 match x.shape[0].

Returns:

(tuple) – function and gradient evaluation

Raises:

NotImplementedError – to be implemented in sub-classes

hess_x(x, precomp=None, idxs_slice=slice(None), cache=None)[source]

[Abstract] Evaluate the Hessian \(\nabla^2_{\bf x}T\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – evaluation points

  • precomp (dict) – dictionary of precomputed values

  • idxs_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 match x.shape[0].

Returns:

(ndarray [\(m,d_y,d_x,d_x\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes

action_hess_x(x, dx, precomp=None, idxs_slice=slice(None), cache=None)[source]

[Abstract] Evaluate the action of the Hessian \(\langle\nabla^2_{\bf x}T,\delta{\bf x}\rangle\) at the points \({\bf x} \in \mathbb{R}^{m \times d_x}\).

Parameters:
  • x (ndarray [\(m,d_x\)]) – evaluation points

  • dx (ndarray [\(m,d_x\)]) – direction on which to evaluate the Hessian

  • precomp (dict) – dictionary of precomputed values

  • idxs_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 match x.shape[0].

Returns:

(ndarray [\(m,d_y,d_x\)]) – transformed points

Raises:

NotImplementedError – to be implemented in sub-classes