EqualityFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <vector>
5 
6 // Base Class
7 #include "../Filter.h"
8 
9 // Aron
13 
14 #include <chrono>
15 
17 {
19  {
20  public:
21  static const constexpr char* NAME = "SnapshotSimilarityFilter";
22  static const constexpr char* PARAM_THRESHOLD = "Threshold";
23  static const constexpr char* PARAM_SIM_MEASURE = "SimilarityMeasure";
24  static const constexpr char* PARAM_MAX_OBJECTS = "NumberOfObjectsToCompare";
25 
26  SnapshotSimilarityFilter() = default;
27 
28  virtual bool accept(const armem::wm::EntitySnapshot& e) override;
29  void configure(const nlohmann::json& json) override;
30 
32  std::string getName() override;
33 
34  private:
35  //std::map<MemoryID, std::vector<aron::data::DictPtr>> dataLastCommit;
36  std::deque<std::vector<armarx::aron::data::NDArrayPtr>> images;
37  std::deque<std::vector<armarx::aron::data::FloatPtr>> floats;
38  std::map<MemoryID, long> timestampLastCommitInMs;
39  std::double_t threshold;
40  FilterStatistics stats;
41  std::size_t max_images = 2;
43  aron::similarity::FloatSimilarity::Type float_similarity_type;
44 
45  };
46 } // namespace armarx::armem::server::ltm::processor::filter
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::NAME
static const constexpr char * NAME
Definition: EqualityFilter.h:21
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::getFilterStatistics
FilterStatistics getFilterStatistics() override
Definition: EqualityFilter.cpp:173
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::PARAM_THRESHOLD
static const constexpr char * PARAM_THRESHOLD
Definition: EqualityFilter.h:22
FloatSimilarity.h
Dict.h
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::SnapshotSimilarityFilter
SnapshotSimilarityFilter()=default
armarx::aron::similarity::FloatSimilarity::Type
Type
The Type enum.
Definition: FloatSimilarity.h:8
armarx::armem::wm::EntitySnapshot
Client-side working memory entity snapshot.
Definition: memory_definitions.h:80
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::getName
std::string getName() override
Definition: EqualityFilter.cpp:178
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::configure
void configure(const nlohmann::json &json) override
Definition: EqualityFilter.cpp:130
armarx::armem::server::ltm::processor::filter
Definition: EqualityFilter.cpp:9
NDArraySimilarity.h
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter
Definition: EqualityFilter.h:18
armarx::armem::server::ltm::processor::SnapshotFilter::FilterStatistics
Definition: Filter.h:35
armarx::armem::server::ltm::processor::SnapshotFilter
Definition: Filter.h:26
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::accept
virtual bool accept(const armem::wm::EntitySnapshot &e) override
Definition: EqualityFilter.cpp:12
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::PARAM_SIM_MEASURE
static const constexpr char * PARAM_SIM_MEASURE
Definition: EqualityFilter.h:23
armarx::aron::similarity::NDArraySimilarity::Type
Type
Definition: NDArraySimilarity.h:8
armarx::armem::server::ltm::processor::filter::SnapshotSimilarityFilter::PARAM_MAX_OBJECTS
static const constexpr char * PARAM_MAX_OBJECTS
Definition: EqualityFilter.h:24