AutoPas  3.0.0
Loading...
Searching...
No Matches
FuzzyRule.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <memory>
10#include <vector>
11
12#include "FuzzySet.h"
13
14namespace autopas::FuzzyLogic {
15
20class FuzzyRule {
21 public:
27 FuzzyRule(const std::shared_ptr<FuzzySet> &antecedent, const std::shared_ptr<FuzzySet> &consequent);
28
34 [[nodiscard]] std::shared_ptr<FuzzySet> apply(const FuzzySet::Data &data) const;
35
40 [[nodiscard]] const std::shared_ptr<FuzzySet> &getAntecedent() const;
41
46 [[nodiscard]] const std::shared_ptr<FuzzySet> &getConsequent() const;
47
51 explicit operator std::string() const;
52
53 private:
57 const std::shared_ptr<FuzzySet> _antecedent;
58
62 const std::shared_ptr<FuzzySet> _consequent;
63};
64
65} // namespace autopas::FuzzyLogic
Used to represent a Fuzzy Rule.
Definition: FuzzyRule.h:20
const std::shared_ptr< FuzzySet > & getAntecedent() const
Returns the antecedent of the FuzzyRule.
Definition: FuzzyRule.cpp:28
const std::shared_ptr< FuzzySet > & getConsequent() const
Returns the consequent of the FuzzyRule.
Definition: FuzzyRule.cpp:30
std::shared_ptr< FuzzySet > apply(const FuzzySet::Data &data) const
Applies the FuzzyRule using the given data.
Definition: FuzzyRule.cpp:14
std::map< std::string, double > Data
A map of the form {dimension_name: value}.
Definition: FuzzySet.h:81
Namespace that contains the fuzzy logic framework used by the FuzzyTuning-strategy.
Definition: namespaces.h:112