The TolerantLoss loss function.
More...
#include <tolerant_loss.h>
|
template<class Archive > |
void | serialize (Archive &archive, const unsigned int) |
| The Boost Serialize method that serializes all of the data members in to/out of the archive. More...
|
|
The TolerantLoss loss function.
This class encapsulates the ceres::TolerantLoss class, adding the ability to serialize it and load it dynamically.
See the Ceres documentation for more details. http://ceres-solver.org/nnls_modeling.html#lossfunction
Definition at line 57 of file tolerant_loss.h.
◆ TolerantLoss()
fuse_loss::TolerantLoss::TolerantLoss |
( |
const double |
a = 1.0 , |
|
|
const double |
b = 0.1 |
|
) |
| |
|
explicit |
Constructor.
- Parameters
-
[in] | a | TolerantLoss parameter 'a'. See Ceres documentation for more details |
[in] | b | TolerantLoss parameter 'b'. See Ceres documentation for more details |
Definition at line 48 of file tolerant_loss.cpp.
◆ ~TolerantLoss()
fuse_loss::TolerantLoss::~TolerantLoss |
( |
| ) |
|
|
overridedefault |
◆ a() [1/2]
double fuse_loss::TolerantLoss::a |
( |
| ) |
const |
|
inline |
Parameter 'a' accessor.
- Returns
- Parameter 'a'.
Definition at line 108 of file tolerant_loss.h.
◆ a() [2/2]
void fuse_loss::TolerantLoss::a |
( |
const double |
a | ) |
|
|
inline |
◆ b() [1/2]
double fuse_loss::TolerantLoss::b |
( |
| ) |
const |
|
inline |
Parameter 'b' accessor.
- Returns
- Parameter 'b'.
Definition at line 118 of file tolerant_loss.h.
◆ b() [2/2]
void fuse_loss::TolerantLoss::b |
( |
const double |
b | ) |
|
|
inline |
◆ FUSE_LOSS_DEFINITIONS()
fuse_loss::TolerantLoss::FUSE_LOSS_DEFINITIONS |
( |
TolerantLoss |
| ) |
|
◆ initialize()
void fuse_loss::TolerantLoss::initialize |
( |
const std::string & |
name | ) |
|
|
overridevirtual |
Perform any required post-construction initialization, such as reading from the parameter server.
This will be called on each plugin after construction.
- Parameters
-
[in] | name | A unique name to initialize this plugin instance, such as from the parameter server. |
Implements fuse_core::Loss.
Definition at line 53 of file tolerant_loss.cpp.
◆ lossFunction()
ceres::LossFunction * fuse_loss::TolerantLoss::lossFunction |
( |
| ) |
const |
|
overridevirtual |
Return a raw pointer to a ceres::LossFunction that implements the loss function.
The Ceres interface requires a raw pointer. Ceres will take ownership of the pointer and promises to properly delete the loss function when it is done. Additionally, Fuse promises that the Loss object will outlive any generated loss functions (i.e. the Ceres objects will be destroyed before the Loss Function objects). This guarantee may allow optimizations for the creation of the loss function objects.
- Returns
- A base pointer to an instance of a derived ceres::LossFunction.
Implements fuse_core::Loss.
Definition at line 68 of file tolerant_loss.cpp.
◆ print()
void fuse_loss::TolerantLoss::print |
( |
std::ostream & |
stream = std::cout | ) |
const |
|
overridevirtual |
Print a human-readable description of the loss function to the provided stream.
- Parameters
-
[out] | stream | The stream to write to. Defaults to stdout. |
Implements fuse_core::Loss.
Definition at line 61 of file tolerant_loss.cpp.
◆ serialize()
template<class Archive >
void fuse_loss::TolerantLoss::serialize |
( |
Archive & |
archive, |
|
|
const unsigned int |
|
|
) |
| |
|
inlineprivate |
The Boost Serialize method that serializes all of the data members in to/out of the archive.
- Parameters
-
| [in/out] | archive - The archive object that holds the serialized class members |
[in] | version | - The version of the archive being read/written. Generally unused. |
Definition at line 157 of file tolerant_loss.h.
◆ boost::serialization::access
friend class boost::serialization::access |
|
friend |
◆ a_
double fuse_loss::TolerantLoss::a_ { 1.0 } |
|
private |
◆ b_
double fuse_loss::TolerantLoss::b_ { 0.1 } |
|
private |
The documentation for this class was generated from the following files: