AutoPas  3.0.0
Loading...
Searching...
No Matches
LinguisticVariable.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <memory>
10#include <vector>
11
12#include "CrispSet.h"
13#include "FuzzySet.h"
14
15namespace autopas::FuzzyLogic {
16
22 public:
28 explicit LinguisticVariable(const std::string &name, std::pair<double, double> range);
29
35 void addLinguisticTerm(const std::shared_ptr<FuzzySet> &linguisticTerm);
36
44 std::shared_ptr<FuzzySet> operator==(const std::string &linguisticTerm) const;
45
50 [[nodiscard]] const std::string &getName() const;
51
55 explicit operator std::string() const;
56
57 private:
61 std::string _name;
62
66 std::shared_ptr<CrispSet> _crispSet;
67
71 std::map<std::string, std::shared_ptr<FuzzySet>> _linguisticTerms;
72};
73} // namespace autopas::FuzzyLogic
A class representing a LinguisticVariable.
Definition: LinguisticVariable.h:21
std::shared_ptr< FuzzySet > operator==(const std::string &linguisticTerm) const
Overload of the operator== where the left-hand side is a linguistic variable, and the right-hand side...
Definition: LinguisticVariable.cpp:25
const std::string & getName() const
Getter for the name of the LinguisticVariable.
Definition: LinguisticVariable.cpp:34
void addLinguisticTerm(const std::shared_ptr< FuzzySet > &linguisticTerm)
Adds a new linguistic term to the LinguisticVariable.
Definition: LinguisticVariable.cpp:20
Namespace that contains the fuzzy logic framework used by the FuzzyTuning-strategy.
Definition: namespaces.h:112