galactic.algebras.lattice.examples.color.renderer#
Defines a color renderer for visualizing colors in a lattice structure.
Classes
ColorRendererfor rendering colors
- class ColorRenderer#
Bases:
NodeRenderer[Color, Color]Renders Graphviz node and edge attributes for colors.
- attributes(elem, domain, co_domain, *, index=None, current=False, successors=None, predecessors=None)#
Produce a dictionary of Graphviz attributes for a node.
- Parameters:
elem (
Color) – The color to renderindex (
int|None, default:None) – The index of the elementcurrent (
bool, default:False) – Whether elem is the current elementdomain (
Collection[Color]) – The domain to renderco_domain (
Collection[Color]) – The co-domain to rendersuccessors (
Collection[Color] |None, default:None) – The successors of the elementpredecessors (
Collection[Color] |None, default:None) – The predecessors of the element
- Returns:
A dictionary of Graphviz attributes
- Return type: