Files
concrete/frontends/concrete-python/concrete/numpy/representation/operation.py
2023-03-08 11:23:21 +01:00

30 lines
515 B
Python

"""
Declaration of `Operation` enum.
"""
from enum import Enum
class Operation(Enum):
"""
Operation enum, to distinguish nodes within a computation graph.
"""
# pylint: disable=invalid-name
Constant = "constant"
Generic = "generic"
Input = "input"
# pylint: enable=invalid-name
# https://graphviz.org/doc/info/colors.html#svg
OPERATION_COLOR_MAPPING = {
Operation.Constant: "grey",
Operation.Generic: "black",
Operation.Input: "crimson",
"output": "gold",
}