Skip to content

Binary

Binary

Bases: Term

Edge Term that represents the binary membership function.

Equation

\(\mu(x) = \begin{cases} h & \mbox{if } (d=\infty \wedge x \ge s) \vee (d=-\infty \wedge x \le s) \cr 0 & \mbox{otherwise} \end{cases}\)

where

  • \(h\): height of the Term
  • \(s\): start of the Binary
  • \(d\): direction of the Binary

Attributes

direction instance-attribute

direction = direction

start instance-attribute

start = start

Functions

__init__

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

Constructor.

Parameters:

Name Type Description Default
name str

name of the Term

''
start float

start of the Binary

nan
direction float

direction of the Binary (-inf, inf)

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 direction [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) = \begin{cases} h & \mbox{if } (d=\infty \wedge x \ge s) \vee (d=-\infty \wedge x \le s) \cr 0 & \mbox{otherwise} \end{cases}\)

parameters

parameters() -> str

Return the parameters of the term.

Returns:

Type Description
str

start direction [height].