Skip to content

SemiEllipse

SemiEllipse

Bases: Term

Basic term that represents the semi-ellipse membership function.

Equation

\(\mu(x) = h \dfrac{\sqrt{r^2- (x-c)^2}}{r}\)

where

  • \(h\): height of the Term
  • \(r\): radius of the SemiEllipse
  • \(c\): center of the SemiEllipse

Attributes

end instance-attribute

end = end

start instance-attribute

start = start

Functions

__init__

__init__(name: str = '', start: float = nan, end: float = nan, height: float = 1.0) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
start float

start of the SemiEllipse

nan
end float

end of the SemiEllipse

nan
height float

height of the Term.

1.0

configure

configure(parameters: str) -> None

Configure the term with the parameters.

Parameters:

Name Type Description Default
parameters str

start end [height]

required

membership

membership(x: Scalar) -> Scalar

Computes the membership function evaluated at \(x\).

Parameters:

Name Type Description Default
x Scalar

scalar

required

Returns:

Type Description
Scalar

\(\mu(x) = h \dfrac{\sqrt{r^2- (x-c)^2}}{r}\)

parameters

parameters() -> str

Return the parameters of the term.

Returns:

Type Description
str

start end [height]