Skip to content

Graph

matchbox.common.graph

Common data structures for resolution graphs.

Classes:

Attributes:

DEFAULT_RESOLUTION module-attribute

DEFAULT_RESOLUTION = '__DEFAULT__'

ResolutionNodeType

Bases: StrEnum

Types of nodes in a resolution.

Attributes:

DATASET class-attribute instance-attribute

DATASET = 'dataset'

MODEL class-attribute instance-attribute

MODEL = 'model'

HUMAN class-attribute instance-attribute

HUMAN = 'human'

ResolutionNode

Bases: BaseModel

A node in a resolution graph.

Attributes:

id instance-attribute

id: int

name instance-attribute

name: str

type instance-attribute

ResolutionEdge

Bases: BaseModel

An edge in a resolution graph.

Attributes:

parent instance-attribute

parent: int

child instance-attribute

child: int

ResolutionGraph

Bases: BaseModel

A directed graph of resolution nodes and edges.

Methods:

  • to_rx

    Convert the resolution graph to a rustworkx directed graph.

Attributes:

nodes instance-attribute

edges instance-attribute

to_rx

to_rx() -> PyDiGraph

Convert the resolution graph to a rustworkx directed graph.