ImportanceFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 // Base Class
4 #include "../Filter.h"
5 
6 #include <chrono>
7 
9 {
10 
14 };
15 
17 {
18 public:
19 
20  static const constexpr char* NAME = "SnapshotImportanceFilter";
21  static const constexpr char* PARAM_THRESHOLD = "Threshold";
22  static const constexpr char* PARAM_TYPE = "Type";
23 
24  SnapshotImportanceFilter() = default;
25 
26  virtual bool accept(const armem::wm::EntitySnapshot& e) override;
27  void configure(const nlohmann::json& json) override;
28 
30  std::string getName() override;
31 
32 private:
33  double threshold = 1.0;
34  FilterStatistics stats;
35  ImportanceType type;
36 
37  bool important(armem::wm::EntityInstance& i);
38 
39 };
40 
41 }
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::PARAM_THRESHOLD
static const constexpr char * PARAM_THRESHOLD
Definition: ImportanceFilter.h:21
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::SnapshotImportanceFilter
SnapshotImportanceFilter()=default
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::PARAM_TYPE
static const constexpr char * PARAM_TYPE
Definition: ImportanceFilter.h:22
armarx::armem::wm::EntityInstance
Client-side working entity instance.
Definition: memory_definitions.h:32
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::NAME
static const constexpr char * NAME
Definition: ImportanceFilter.h:20
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::accept
virtual bool accept(const armem::wm::EntitySnapshot &e) override
Definition: ImportanceFilter.cpp:7
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::getName
std::string getName() override
Definition: ImportanceFilter.cpp:61
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter
Definition: ImportanceFilter.h:16
armarx::armem::server::ltm::processor::filter::CONFIDENCE
@ CONFIDENCE
Definition: ImportanceFilter.h:12
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::getFilterStatistics
FilterStatistics getFilterStatistics() override
Definition: ImportanceFilter.cpp:56
armarx::armem::wm::EntitySnapshot
Client-side working memory entity snapshot.
Definition: memory_definitions.h:80
armarx::armem::server::ltm::processor::filter::ImportanceType
ImportanceType
Definition: ImportanceFilter.h:11
armarx::armem::server::ltm::processor::filter::ACCESSES
@ ACCESSES
Definition: ImportanceFilter.h:13
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::configure
void configure(const nlohmann::json &json) override
Definition: ImportanceFilter.cpp:31
armarx::armem::server::ltm::processor::filter
Definition: EqualityFilter.cpp:9
armarx::armem::server::ltm::processor::SnapshotFilter::FilterStatistics
Definition: Filter.h:35
armarx::armem::server::ltm::processor::SnapshotFilter
Definition: Filter.h:26