Skip to content

Commit

Permalink
change discretizer class name
Browse files Browse the repository at this point in the history
  • Loading branch information
edumeneses committed Feb 26, 2025
1 parent 8c948cd commit 89a336c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/puara/utils/discretizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ namespace puara_gestures::utils
{

template <typename T>
class ValueMonitor {
class Discretizer {
private:
T latestValue;
bool firstValue; // Flag to track if it's the first value

public:
// Constructor
ValueMonitor() : firstValue(true) {
Discretizer() : firstValue(true) {
// Initialize latestValue to a default value. Important to avoid
// undefined behavior on the first comparison. Using the minimum
// value for numeric types is usually a good choice.
latestValue = std::numeric_limits<T>::min();
}

// Method to update the value and check for difference
bool updateAndCheck(const T& newValue) {
bool isNew(const T& newValue) {
if (firstValue) {
latestValue = newValue;
firstValue = false;
Expand Down

0 comments on commit 89a336c

Please sign in to comment.