Go to the previous, next section.

CNFSetArray -- Fuzzy set based on array with membership values

SYNOPSIS

#include <CNCL/FSetArray.h>

TYPE

CN_FSETARRAY

BASE CLASSES

CNFSet

DERIVED CLASSES

None

RELATED CLASSES

None

DESCRIPTION

This class realizes a fuzzy set as an array. The array is containing the membership values and the index is its corrosponding x-value. Thus membership values of non-integers are interpolated.

Constructors:

CNFSetArray();
CNFSetArray(CNParam *param);
CNFSetArray(size_t sz, double min, double max);
Initializes CNFSetArray.

In addition to the member functions required by CNCL, CNFSetArray provides:

virtual double get_membership(double x)const;
Gets membership value for x.

virtual double center_of_gravity(double min, double max)const;
Computes the center of gravity.

double get(int i) const;
Gets the value from the array.

void put(int i, double x);
Puts value x into array at position i.

double &operator [] (int i);
Provides the direct access to the internal array.

int get_n() const;
Returns the size of the array.

Go to the previous, next section.