27#include "neml2/models/Model.h"
41 const auto am = T(a.batch_expand(B, I).index({m.batch_expand(B, I)}), 0);
42 I.erase(I.end() - mdim, I.end());
43 return am.batch_reshape(B, I);
Variable< T > & _p
The interpolated value.
Definition Interpolation.h:75
const T & _Y
The ordinate values of the interpolant.
Definition Interpolation.h:72
static OptionSet expected_options()
Interpolation(const OptionSet &options)
Model(const OptionSet &options)
Construct a new Model object.
A custom map-like data structure. The keys are strings, and the values can be nonhomogeneously typed.
Definition OptionSet.h:52
Scalar.
Definition Scalar.h:38
TensorShapeRef intmd_sizes() const
Definition TensorBaseImpl.h:217
Concrete definition of a variable.
Definition Variable.h:37
TensorShape broadcast_sizes(const T &... shapes)
Return the broadcast shape of all the shapes.
Definition shape_utils.h:277
TraceableTensorShape broadcast_dynamic_sizes(const std::vector< Tensor > &tensors)
Find the broadcast dynamic shape of all the tensors The returned dynamic shape will be traceable.
Definition DiagnosticsInterface.h:31
std::tuple< Scalar, Scalar, Scalar > parametric_coordinates(const Scalar &X, const Scalar &x)
T apply_mask(const T &a, const Scalar &m, std::size_t mdim)
Definition Interpolation.h:37