EmrysFilter 0.1.0
State estimation utilities in C++23 using Eigen
Loading...
Searching...
No Matches
Emrys::BatchedOutput< In, Out, Scalar_, Mark > Class Template Reference

The output of a batched function (decisions.md [batched-functions]): its values, a column per point, and the Jacobians the library uses, by block of the function's input, in storage the library provides and sizes once before the call. More...

#include <EmrysFilter/Models/Batched.h>

Public Types

using Scalar = Scalar_
 the scalar type
using ValuesType
 The values, a column per point.
using JacobiansType
 The Jacobians' storage: the blocks wanted side by side, for each column or once.

Public Member Functions

 BatchedOutput (ValuesType values, JacobiansType jacobians, In const &in, std::array< bool, BlockCount > const &wanted)
 The output over the values values and the Jacobians' storage jacobians, of the function's input in, with the Jacobian of block k wanted where wanted says.
ValuesType & values ()
ValuesType const & values () const
template<typename Name>
bool wantsJacobian () const
bool wantsJacobians () const
auto jacobian (Eigen::Index j)
auto jacobian ()
template<typename Name>
auto jacobian (Eigen::Index j)
template<typename Name>
auto jacobian ()
template<typename Out2, typename In2>
BatchedOutput< In2, Out2, Scalar_, Mark > renamed (In2 const &in)

Detailed Description

template<typename In, typename Out, typename Scalar_, typename Mark>
class Emrys::BatchedOutput< In, Out, Scalar_, Mark >

The output of a batched function (decisions.md [batched-functions]): its values, a column per point, and the Jacobians the library uses, by block of the function's input, in storage the library provides and sizes once before the call.

The function writes values() whole. Where its mark gives Jacobians, it writes jacobian<Name>(j) (jacobians::perColumn()) or jacobian<Name>() (jacobians::shared()) for each block Name of its input for which wantsJacobian<Name>() is true on this call: the columns of the Jacobian for the block that reads() names Name. The storage holds only those blocks, so a block not wanted is not written. A function of a model without tags writes jacobian(j) or jacobian(), the Jacobian over its whole input, when wantsJacobians() says every block is wanted (decisions.md [whole-state-models]).

Template Parameters
Inthe function's input space, a Composite of the names reads() gives, or the state's space for a whole-state model, which is its own one block
Outits output space: the values have a row per value coordinate of it, and the Jacobians a row per difference coordinate
Scalar_the scalar the function writes
Markthe Jacobians the function writes

Member Typedef Documentation

◆ JacobiansType

template<typename In, typename Out, typename Scalar_, typename Mark>
using Emrys::BatchedOutput< In, Out, Scalar_, Mark >::JacobiansType
Initial value:
Eigen::Map<internal::MatrixOf<
Scalar_,
Eigen::Dynamic,
Eigen::Dynamic>>
constexpr int valueDimensionAtCompileTime
The value dimension of Space at compile time, or Eigen::Dynamic if it is resizable.
Definition Space.h:251
constexpr int maxValueDimensionAtCompileTime
The largest valid value dimension of Space, or Eigen::Dynamic if it is unbounded.
Definition Space.h:258

The Jacobians' storage: the blocks wanted side by side, for each column or once.

◆ ValuesType

template<typename In, typename Out, typename Scalar_, typename Mark>
using Emrys::BatchedOutput< In, Out, Scalar_, Mark >::ValuesType
Initial value:
Eigen::Map<internal::MatrixOf<
Scalar_,
Eigen::Dynamic,
Eigen::Dynamic>>

The values, a column per point.

Constructor & Destructor Documentation

◆ BatchedOutput()

template<typename In, typename Out, typename Scalar_, typename Mark>
Emrys::BatchedOutput< In, Out, Scalar_, Mark >::BatchedOutput ( ValuesType values,
JacobiansType jacobians,
In const & in,
std::array< bool, BlockCount > const & wanted )
inline

The output over the values values and the Jacobians' storage jacobians, of the function's input in, with the Jacobian of block k wanted where wanted says.

The storage holds the wanted blocks' columns side by side, once per column of the values under jacobians::perColumn() and once under jacobians::shared(). in outlives this.

Member Function Documentation

◆ jacobian() [1/4]

template<typename In, typename Out, typename Scalar_, typename Mark>
template<typename Name>
auto Emrys::BatchedOutput< In, Out, Scalar_, Mark >::jacobian ( )
inlinenodiscard
Returns
the Jacobian of every column in the block named Name, writable, under jacobians::shared(), for a block wantsJacobian() says is wanted

◆ jacobian() [2/4]

template<typename In, typename Out, typename Scalar_, typename Mark>
auto Emrys::BatchedOutput< In, Out, Scalar_, Mark >::jacobian ( )
inlinenodiscard
Returns
the Jacobian of every column over the whole input, writable, under jacobians::shared(), when wantsJacobians() says every block is wanted

◆ jacobian() [3/4]

template<typename In, typename Out, typename Scalar_, typename Mark>
template<typename Name>
auto Emrys::BatchedOutput< In, Out, Scalar_, Mark >::jacobian ( Eigen::Index j)
inlinenodiscard
Returns
the Jacobian of column j in the block named Name, writable: its rows are the output's differences and its columns the block's, under jacobians::perColumn(), for a block wantsJacobian() says is wanted

◆ jacobian() [4/4]

template<typename In, typename Out, typename Scalar_, typename Mark>
auto Emrys::BatchedOutput< In, Out, Scalar_, Mark >::jacobian ( Eigen::Index j)
inlinenodiscard
Returns
the Jacobian of column j over the whole input, writable, under jacobians::perColumn(), when wantsJacobians() says every block is wanted: what a function of a model without tags writes

◆ renamed()

template<typename In, typename Out, typename Scalar_, typename Mark>
template<typename Out2, typename In2>
BatchedOutput< In2, Out2, Scalar_, Mark > Emrys::BatchedOutput< In, Out, Scalar_, Mark >::renamed ( In2 const & in)
inlinenodiscard
Returns
this output over the same storage for a function whose input space in and output space Out2 name the same blocks in the same order and sizes, under names of their own: what a placed model's function gives the model it places, which reads and writes the blocks by its own names (decisions.md [model-placement]). in outlives the result.

◆ values() [1/2]

template<typename In, typename Out, typename Scalar_, typename Mark>
ValuesType & Emrys::BatchedOutput< In, Out, Scalar_, Mark >::values ( )
inlinenodiscard
Returns
the values, a column per point, for the function to write

◆ values() [2/2]

template<typename In, typename Out, typename Scalar_, typename Mark>
ValuesType const & Emrys::BatchedOutput< In, Out, Scalar_, Mark >::values ( ) const
inlinenodiscard
Returns
the values, a column per point

◆ wantsJacobian()

template<typename In, typename Out, typename Scalar_, typename Mark>
template<typename Name>
bool Emrys::BatchedOutput< In, Out, Scalar_, Mark >::wantsJacobian ( ) const
inlinenodiscard
Returns
whether the library uses the Jacobian of the block named Name on this call, which the function then writes; always false for a function marked without Jacobians

◆ wantsJacobians()

template<typename In, typename Out, typename Scalar_, typename Mark>
bool Emrys::BatchedOutput< In, Out, Scalar_, Mark >::wantsJacobians ( ) const
inlinenodiscard
Returns
whether the library uses the Jacobian of every block of the input on this call, the whole of it, which a function of a model without tags writes with jacobian(j) or jacobian()

The documentation for this class was generated from the following file: