tinyopt 700
Tinyopt, a lightweight, header only optimization library
Loading...
Searching...
No Matches
tinyopt::Cost Struct Reference

Public Types

using Scalar = double

Public Member Functions

 Cost (Scalar cost_)
 Cost (Scalar cost_, int num_resisuals_, float inlier_ratio_=1.0f, const std::string &log_="")
template<typename Derived>
 Cost (const MatrixBase< Derived > &residuals, float inlier_ratio_=1.0f, const std::string &log_="")
template<typename Derived>
Cost & operator= (const MatrixBase< Derived > &residuals)
bool operator< (const Cost &other) const
bool operator<= (const Cost &other) const
bool operator< (Scalar other_cost) const
bool operator< (float other_cost) const
bool operator<= (Scalar other_cost) const
bool operator<= (float other_cost) const
 operator Scalar () const
Cost & operator+= (const Cost &other)
 Accumulate another cost.
template<typename Derived>
Cost & operator+= (const MatrixBase< Derived > &residuals)
 Accumulate residuals considering all are inliers.
std::string toString (const std::string &cost_label="ε", bool print_inliers=false) const
bool isValid () const
int NumInliers () const
int NumOutliers () const
void AddResiduals (int new_residuals, int new_inliers)

Public Attributes

Scalar cost = Scalar(0)
 The function cost.
int num_resisuals = 0
 The number of residuals (for e.g. NLLS).
float inlier_ratio = 1.0f
 The ratio of inlier residuals (when robust norms are used).
std::string log_str
 Extra information that will be printed as part of the opt. iterations.

Friends

std::ostream & operator<< (std::ostream &os, const Cost &cost)

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