Skip to content

get_link_combinations

Return a list of link combinations between the classes in classes.

Parameters:

Name Type Description Default
classes Tuple[str, ...]

A list/tuple containing the classes of your dataset.

required
Source code in cellseg_gsontools/links.py
def get_link_combinations(classes: Tuple[str, ...]) -> List[str]:
    """Return a list of link combinations between the classes in `classes`.

    Parameters:
        classes (Tuple[str, ...]):
            A list/tuple containing the classes of your dataset.
    """
    combos = ["-".join(t) for t in list(combinations_with_replacement(classes, 2))]

    return combos