Skip to content

FunctionFactory

FunctionFactory

Bases: CloningFactory[Element]

Factory of operators and functions used by the Function term.

related

Functions

__init__

__init__() -> None

Constructor.

_create_functions

_create_functions() -> list[Element]

Return the list of functions.

Returns:

Type Description
list[Element]

list of functions

_create_operators

_create_operators() -> list[Element]

Return the list of function operators.

Returns:

Type Description
list[Element]

list of function operators

_precedence

_precedence(importance: int) -> int

Inverts the priority of precedence of operations, mapping 0-10 in ascending order to 100-0 in descending order.

Parameters:

Name Type Description Default
importance int

value between 0 and 10, where 0 is the most important

required

Returns:

Type Description
int

precedence between 100 and 0, where 100 is the most important

functions

functions() -> dict[str, Element]

Return a dictionary of the functions available.

Returns:

Type Description
dict[str, Element]

dictionary of the functions available.

operators

operators() -> dict[str, Element]

Return a dictionary of the operators available.

Returns:

Type Description
dict[str, Element]

dictionary of the operators available.