Skip to content

Constant

Constant

Bases: Term

Zero polynomial term \(k\) that represents a constant value.

Equation

\(\mu(x) = k\)

where

  • \(k\): value of the Constant

Attributes

value instance-attribute

value = value

Functions

__init__

__init__(name: str = '', value: float = nan) -> None

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
value float

value of the Constant

nan

__repr__

__repr__() -> str

Return the code to construct the term in Python.

Returns:

Type Description
str

code to construct the term in Python.

configure

configure(parameters: str) -> None

Configure the term with the parameters.

Parameters:

Name Type Description Default
parameters str

k

required

membership

membership(x: Scalar) -> Scalar

Compute the membership function value of \(x\).

Parameters:

Name Type Description Default
x Scalar

irrelevant

required

Returns:

Type Description
Scalar

\(\mu(x) = k\)

parameters

parameters() -> str

Return the space-separated parameters of the term.

Returns:

Type Description
str

k