Class TrivialLoss
Defined in File trivial_loss.hpp
Inheritance Relationships
Base Type
public fuse_core::Loss
Class Documentation
-
class TrivialLoss : public fuse_core::Loss
The TrivialLoss loss function.
This class encapsulates the ceres::TrivialLoss 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
Public Functions
-
TrivialLoss() = default
Constructor.
-
~TrivialLoss() override = default
Destructor.
-
inline void initialize(fuse_core::node_interfaces::NodeInterfaces<fuse_core::node_interfaces::Base, fuse_core::node_interfaces::Logging, fuse_core::node_interfaces::Parameters>, const std::string&) override
Perform any required post-construction initialization, such as reading from the parameter server.
This will be called on each plugin after construction.
- Parameters:
interfaces – [in] - The node interfaces used to load the parameter
name – [in] A unique name to initialize this plugin instance, such as from the parameter server.
-
void print(std::ostream &stream = std::cout) const override
Print a human-readable description of the loss function to the provided stream.
- Parameters:
stream – [out] The stream to write to. Defaults to stdout.
-
ceres::LossFunction *lossFunction() const override
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.
Friends
- friend class boost::serialization::access
-
TrivialLoss() = default