The Spike class is an extended Term that represents the spike membership function.
More...
#include <Spike.h>
The Spike class is an extended Term that represents the spike membership function.
- Author
- Juan Rada-Vilela, Ph.D.
- See also
- Term
-
Variable
- Since
- 5.0
Definition at line 35 of file Spike.h.
◆ Spike()
fl::Spike::Spike |
( |
const std::string & |
name = "" , |
|
|
scalar |
center = fl::nan , |
|
|
scalar |
width = fl::nan , |
|
|
scalar |
height = 1.0 |
|
) |
| |
|
explicit |
◆ ~Spike()
virtual fl::Spike::~Spike |
( |
| ) |
|
|
virtual |
◆ className()
virtual std::string fl::Spike::className |
( |
| ) |
const |
|
virtual |
Returns the name of the class of the term.
- Returns
- the name of the class of the term
Implements fl::Term.
◆ clone()
virtual Spike* fl::Spike::clone |
( |
| ) |
const |
|
virtual |
Creates a clone of the term.
- Returns
- a clone of the term
Implements fl::Term.
◆ complexity()
virtual Complexity fl::Spike::complexity |
( |
| ) |
const |
|
virtual |
Computes the estimated complexity of evaluating the membership function.
- Returns
- the estimated complexity of evaluating the membership function
Implements fl::Term.
◆ configure()
virtual void fl::Spike::configure |
( |
const std::string & |
parameters | ) |
|
|
virtual |
Configures the term with the parameters.
- Parameters
-
parameters | as "center width [height]" |
Implements fl::Term.
◆ constructor()
static Term* fl::Spike::constructor |
( |
| ) |
|
|
static |
◆ getCenter()
virtual scalar fl::Spike::getCenter |
( |
| ) |
const |
|
virtual |
Gets the center of the spike.
- Returns
- the center of the spike
◆ getWidth()
virtual scalar fl::Spike::getWidth |
( |
| ) |
const |
|
virtual |
Gets the width of the spike.
- Returns
- the width of the spike
◆ membership()
Computes the membership function evaluated at \(x\).
- Parameters
-
- Returns
- \(h \times \exp(-|10 / w (x - c)|)\)
where \(h\) is the height of the Term, \(w\) is the width of the Spike, \(c\) is the center of the Spike
Implements fl::Term.
◆ parameters()
virtual std::string fl::Spike::parameters |
( |
| ) |
const |
|
virtual |
Returns the parameters of the term.
- Returns
"center width [height]"
Implements fl::Term.
◆ setCenter()
virtual void fl::Spike::setCenter |
( |
scalar |
center | ) |
|
|
virtual |
Sets the center of the spike.
- Parameters
-
center | is the center of the spike |
◆ setWidth()
virtual void fl::Spike::setWidth |
( |
scalar |
width | ) |
|
|
virtual |
Sets the width of the spike.
- Parameters
-
width | is the width of the spike |
The documentation for this class was generated from the following file: