ImportanceFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 // Base Class
4 #include <chrono>
5 
6 #include "../Filter.h"
7 
9 {
10 
12  {
15  };
16 
18  {
19  public:
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, bool simulatedVersion) 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 } // namespace armarx::armem::server::ltm::processor::filter
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::getName
std::string getName() override
Definition: ImportanceFilter.cpp:75
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter
Definition: ImportanceFilter.h:17
armarx::armem::server::ltm::processor::filter::CONFIDENCE
@ CONFIDENCE
Definition: ImportanceFilter.h:13
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::getFilterStatistics
FilterStatistics getFilterStatistics() override
Definition: ImportanceFilter.cpp:69
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:14
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::configure
void configure(const nlohmann::json &json) override
Definition: ImportanceFilter.cpp:38
armarx::armem::server::ltm::processor::filter
Definition: EqualityFilter.cpp:10
armarx::armem::server::ltm::processor::filter::SnapshotImportanceFilter::accept
virtual bool accept(const armem::wm::EntitySnapshot &e, bool simulatedVersion) override
Definition: ImportanceFilter.cpp:7
armarx::armem::server::ltm::processor::SnapshotFilter::FilterStatistics
Definition: Filter.h:35
armarx::armem::server::ltm::processor::SnapshotFilter
Definition: Filter.h:26