operators ¶
Classes:
-
BaseOperator
– -
BinaryBaseOperator
– -
BinaryBoolOperator
– -
BinaryMathOperator
– -
BinaryOperator
– -
ExprOperators
– -
TernaryBaseOperator
– -
TernaryCompOperator
– -
TernaryIfOperator
– -
TernaryOperator
– -
TernaryPixelAccessOperator
– -
UnaryBaseOperator
– -
UnaryBoolOperator
– -
UnaryMathOperator
– -
UnaryOperator
–
BinaryBaseOperator dataclass
¶
BinaryBaseOperator(rpn_name: ExprOp)
Bases: BaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT) -> ComputedVar
Source code
68 69 70 |
|
BinaryBoolOperator dataclass
¶
Bases: BinaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT) -> ComputedVar
Source code
68 69 70 |
|
BinaryMathOperator dataclass
¶
Bases: Generic[T, R]
, BinaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT) -> ComputedVar
Source code
68 69 70 |
|
BinaryOperator dataclass
¶
Bases: Generic[T, R]
, BinaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT) -> ComputedVar
Source code
68 69 70 |
|
ExprOperators ¶
Methods:
-
as_var
–
Attributes:
-
ABS
– -
ABS_PIX
– -
ADD
– -
AND
– -
CLAMP
– -
COS
– -
DIV
– -
DUP
– -
DUPN
– -
EQ
– -
EXP
– -
FLOOR
– -
GT
– -
GTE
– -
IF
– -
LOG
– -
LT
– -
LTE
– -
MAX
– -
MIN
– -
MOD
– -
MUL
– -
NOT
– -
OR
– -
POW
– -
REL_PIX
– -
ROUND
– -
SIN
– -
SQRT
– -
SUB
– -
SWAP
– -
SWAPN
– -
TERN
– -
TRUNC
– -
XOR
–
ABS class-attribute
instance-attribute
¶
ABS = UnaryMathOperator[SupportsAbs[SupportsIndex], SupportsIndex](ABS, abs)
ABS_PIX class-attribute
instance-attribute
¶
ABS_PIX = TernaryPixelAccessOperator[Union[int, 'ExprVar']](ABS_PIX)
CLAMP class-attribute
instance-attribute
¶
CLAMP = TernaryCompOperator(CLAMP, lambda x, y, z: max(y, min(x, z)))
FLOOR class-attribute
instance-attribute
¶
FLOOR = UnaryMathOperator[SupportsFloatOrIndex, int](FLOOR, floor)
ROUND class-attribute
instance-attribute
¶
ROUND = UnaryMathOperator[SupportsRound[int], int](ROUND, lambda x: round(x))
TERN class-attribute
instance-attribute
¶
TERN = TernaryIfOperator(TERN, lambda x, y, z: x if z else y)
TRUNC class-attribute
instance-attribute
¶
TRUNC = UnaryMathOperator[SupportsTrunc, int](TRUNC, trunc)
as_var classmethod
¶
as_var(arg0: ExprOtherT) -> ComputedVar
as_var(arg0: Sequence[ExprOtherT]) -> list[ComputedVar]
as_var(
arg0: ExprOtherT | Sequence[ExprOtherT],
) -> ComputedVar | list[ComputedVar]
Source code
235 236 237 238 239 240 |
|
TernaryBaseOperator dataclass
¶
TernaryBaseOperator(rpn_name: ExprOp)
Bases: BaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT, arg2: ExprOtherT) -> ComputedVar
Source code
74 75 76 |
|
TernaryCompOperator dataclass
¶
Bases: TernaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT, arg2: ExprOtherT) -> ComputedVar
Source code
74 75 76 |
|
TernaryIfOperator dataclass
¶
Bases: TernaryOperator[ExprOtherT, ExprOtherT]
Methods:
Attributes:
__call__ ¶
__call__(
cond: ExprOtherT, if_true: ExprOtherT, if_false: ExprOtherT
) -> ComputedVar
Source code
115 116 |
|
TernaryOperator dataclass
¶
Bases: Generic[T, R]
, TernaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT, arg1: ExprOtherT, arg2: ExprOtherT) -> ComputedVar
Source code
74 75 76 |
|
TernaryPixelAccessOperator dataclass
¶
TernaryPixelAccessOperator(rpn_name: ExprOp)
Bases: Generic[T]
, TernaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(char: str, x: T, y: T) -> ComputedVar
Source code
129 130 131 132 |
|
UnaryBaseOperator dataclass
¶
UnaryBaseOperator(rpn_name: ExprOp)
Bases: BaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT) -> ComputedVar
Source code
62 63 64 |
|
UnaryBoolOperator dataclass
¶
Bases: UnaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT) -> ComputedVar
Source code
62 63 64 |
|
UnaryMathOperator dataclass
¶
Bases: Generic[T, R]
, UnaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT) -> ComputedVar
Source code
62 63 64 |
|
UnaryOperator dataclass
¶
Bases: Generic[T]
, UnaryBaseOperator
Methods:
Attributes:
__call__ ¶
__call__(arg0: ExprOtherT) -> ComputedVar
Source code
62 63 64 |
|