30#ifndef VP_TEMPORAL_WEIGHTING_H
31#define VP_TEMPORAL_WEIGHTING_H
33#include <visp3/core/vpConfig.h>
34#include <visp3/core/vpException.h>
36#if defined(VISP_HAVE_NLOHMANN_JSON)
37#include VISP_NLOHMANN_JSON(json_fwd.hpp)
45 virtual double weight(
const double progress)
const = 0;
47#if defined(VISP_HAVE_NLOHMANN_JSON)
59 double weight(
const double )
const VP_OVERRIDE;
77 if (maxWeight < minWeight) {
85 if (location < 0 || location > 1) {
88 m_location = location;
91 double weight(
const double progress)
const VP_OVERRIDE;
error that can be emitted by ViSP classes.
@ badValue
Used to indicate that a value is not in the allowed range.
double weight(const double) const VP_OVERRIDE
void setWeight(double weight)
vpFixedTemporalWeighting(double weight)
double getSlopePower() const
void setSlopePower(double power)
void setMaximumWeight(double w)
void setLocation(double location)
double getMaximumWeight() const
vpSigmoidTemporalWeighting(double minWeight, double maxWeight, double location, double power)
double getMinimumWeight() const
void setMinimumWeight(double w)
double getLocation() const
virtual double weight(const double progress) const =0
virtual ~vpTemporalWeighting()=default
vpTemporalWeighting()=default
static std::shared_ptr< vpTemporalWeighting > parseTemporalWeighting(const nlohmann::json &j)
static std::shared_ptr< vpTemporalWeighting > parseTemporalWeightingRawJson(const std::string &j)