AGX Dynamics 2.41.1.2
Loading...
Searching...
No Matches
SmoothingFilter.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16#ifndef AGXUTIL_SMOOTHINGFILTER_H
17#define AGXUTIL_SMOOTHINGFILTER_H
18
20#include <agx/Math.h>
21#include <agx/Referenced.h>
22
23namespace agxUtil
24{
26 {
27 public:
29
36 virtual agx::Real update( agx::Real observation, agx::Real s ) const = 0;
37
38 protected:
39 virtual ~SmoothingFilter() {}
40 };
41
43
50 {
51 public:
56 VariableSmoothingFactorFilter( agx::Real maximumSmoothingFactor )
57 : m_maxSmoothingFactor( maximumSmoothingFactor ) {}
58
66 virtual agx::Real update( agx::Real observation, agx::Real s ) const;
67
72 {
73 return m_maxSmoothingFactor;
74 }
75
80 void setMaximumSmoothingFactor( agx::Real maxSmoothingFactor )
81 {
82 m_maxSmoothingFactor = maxSmoothingFactor;
83 }
84
85 protected:
87
88 protected:
90 };
91
93
94}
95#endif
#define AGXPHYSICS_EXPORT
virtual agx::Real update(agx::Real observation, agx::Real s) const =0
Update statistic variable s with current observation observation.
Variable Smooth Factor Exponential Moving Average filter.
void setMaximumSmoothingFactor(agx::Real maxSmoothingFactor)
Set the maximum smoothing factor for this filter.
VariableSmoothingFactorFilter(agx::Real maximumSmoothingFactor)
Construct given maximum smoothing factor.
virtual agx::Real update(agx::Real observation, agx::Real s) const
Update the current statistic variable s given a new observation.
Base class providing referencing counted objects.
Definition: Referenced.h:120
The agxUtil namespace contain classes and methods for utility functionality.
agx::ref_ptr< SmoothingFilter > SmoothingFilterRef
agx::ref_ptr< VariableSmoothingFactorFilter > VariableSmoothingFactorFilterRef
double Real
Definition: Real.h:42