/* * File: DiscreteTerm.h * Author: jcrada * * Created on May 9, 2010, 8:17 PM */ #ifndef FL_DISCRETETERM_H #define FL_DISCRETETERM_H #include "LinguisticTerm.h" namespace fl { class DiscreteTerm : public LinguisticTerm { private: std::vector _x; std::vector _y; public: DiscreteTerm(); DiscreteTerm(const std::string& name, const std::vector& x = std::vector(), const std::vector& y = std::vector()); DiscreteTerm(const FuzzyOperator& fuzzy_op, const std::string& name, const std::vector& x = std::vector(), const std::vector& y = std::vector()); virtual ~DiscreteTerm(); virtual void setXY(int index, flScalar x, flScalar y); virtual void setXY(const std::vector&x, const std::vector&y); virtual void addXY(flScalar x, flScalar y); virtual void remove(int index); virtual void clear(); virtual int numberOfCoords() const; virtual flScalar minimum() const; virtual flScalar maximum() const; virtual DiscreteTerm* clone() const; virtual flScalar membership(flScalar crisp) const; virtual eMembershipFunction type() const; virtual std::string toString() const; }; } #endif /* FL_DISCRETETERM_H */