Skip to content

compile_direct_nbc

from tensorsig.offset_coded_signatures.graph_queries import compile_direct_nbc

Compile the exact NBC family of a connected actual occurrence graph.

Source code in src/tensorsig/offset_coded_signatures/_graph/direct_nbc.py
def compile_direct_nbc(
    occurrence_channels: Sequence[int],
    graph: DependenceGraph,
    *,
    edge_order: Iterable[Sequence[int]] | None = None,
    reference_arrows: Iterable[Sequence[int]] | None = None,
) -> DirectNbcPlan:
    """Compile the exact NBC family of a connected actual occurrence graph."""
    plan = _compile_direct_nbc(
        occurrence_channels,
        graph,
        edge_order=edge_order,
        reference_arrows=reference_arrows,
    )
    if plan is None:
        raise ValueError("the occurrence dependence graph must be connected.")
    return plan