Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder > Struct Template Reference

#include <tiny_cost_function.h>

Public Types

enum  { NUM_RESIDUALS = Eigen::Dynamic , NUM_PARAMETERS = Eigen::Dynamic }
 
using Scalar = ScalarType
 
using JacobianType = Eigen::Matrix<Brush::Scalar, -1, -1>
 
using QRSolver = Eigen::ColPivHouseholderQR<JacobianType>
 

Public Member Functions

 TinyCostFunction (CostFunctor const &functor)
 
auto Evaluate (Scalar const *parameters, Scalar *residuals, Scalar *jacobian) const -> bool
 
auto operator() (Scalar const *parameters, Scalar *residuals, Scalar *jacobian) const -> bool
 
auto NumResiduals () const -> int
 
auto NumParameters () const -> int
 
auto operator() (Eigen::Matrix< Scalar, -1, 1 > const &input, Eigen::Matrix< Scalar, -1, 1 > &residual) -> int
 
auto df (Eigen::Matrix< Scalar, -1, 1 > const &input, Eigen::Matrix< Scalar, -1, -1 > &jacobian) -> int
 
auto values () const -> int
 
auto inputs () const -> int
 

Static Public Attributes

static constexpr int Stride = DualType::DIMENSION
 
static constexpr int Storage = StorageOrder
 

Private Attributes

CostFunctor functor_
 

Detailed Description

template<typename CostFunctor, typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
struct Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >

Definition at line 81 of file tiny_cost_function.h.

Member Typedef Documentation

◆ JacobianType

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
using Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::JacobianType = Eigen::Matrix<Brush::Scalar, -1, -1>

Definition at line 112 of file tiny_cost_function.h.

◆ QRSolver

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
using Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::QRSolver = Eigen::ColPivHouseholderQR<JacobianType>

Definition at line 113 of file tiny_cost_function.h.

◆ Scalar

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
using Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::Scalar = ScalarType

Definition at line 84 of file tiny_cost_function.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
anonymous enum
Enumerator
NUM_RESIDUALS 
NUM_PARAMETERS 

Definition at line 86 of file tiny_cost_function.h.

Constructor & Destructor Documentation

◆ TinyCostFunction()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::TinyCostFunction ( CostFunctor const & functor)
inlineexplicit

Definition at line 91 of file tiny_cost_function.h.

Member Function Documentation

◆ df()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::df ( Eigen::Matrix< Scalar, -1, 1 > const & input,
Eigen::Matrix< Scalar, -1, -1 > & jacobian ) -> int
inline

Definition at line 123 of file tiny_cost_function.h.

Here is the call graph for this function:

◆ Evaluate()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::Evaluate ( Scalar const * parameters,
Scalar * residuals,
Scalar * jacobian ) const -> bool
inline

Definition at line 96 of file tiny_cost_function.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inputs()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::inputs ( ) const -> int
inline

Definition at line 131 of file tiny_cost_function.h.

Here is the call graph for this function:

◆ NumParameters()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::NumParameters ( ) const -> int
inline

Definition at line 109 of file tiny_cost_function.h.

Here is the caller graph for this function:

◆ NumResiduals()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::NumResiduals ( ) const -> int
inline

Definition at line 108 of file tiny_cost_function.h.

Here is the caller graph for this function:

◆ operator()() [1/2]

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::operator() ( Eigen::Matrix< Scalar, -1, 1 > const & input,
Eigen::Matrix< Scalar, -1, 1 > & residual ) -> int
inline

Definition at line 117 of file tiny_cost_function.h.

Here is the call graph for this function:

◆ operator()() [2/2]

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::operator() ( Scalar const * parameters,
Scalar * residuals,
Scalar * jacobian ) const -> bool
inline

Definition at line 103 of file tiny_cost_function.h.

Here is the call graph for this function:

◆ values()

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
auto Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::values ( ) const -> int
inline

Definition at line 130 of file tiny_cost_function.h.

Here is the call graph for this function:

Member Data Documentation

◆ functor_

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
CostFunctor Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::functor_
private

Definition at line 134 of file tiny_cost_function.h.

◆ Storage

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
constexpr int Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::Storage = StorageOrder
staticconstexpr

Definition at line 83 of file tiny_cost_function.h.

◆ Stride

template<typename CostFunctor , typename DualType = fJet, typename ScalarType = float, int StorageOrder = Eigen::ColMajor>
constexpr int Brush::TinyCostFunction< CostFunctor, DualType, ScalarType, StorageOrder >::Stride = DualType::DIMENSION
staticconstexpr

Definition at line 82 of file tiny_cost_function.h.


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