Atelier des rouesLab FR
Objects/Documentation

stables18.py

Require a vertex · Reproducible Python implementation.

Download ↓
"""Conditional independence polynomial of the unweighted 34-vertex karate graph."""
import csv
import json
from functools import lru_cache
from pathlib import Path
from itertools import combinations


@lru_cache(maxsize=1)
def graph():
    n=34
    adj=[0]*n
    with Path(__file__).with_name("karate.csv").open() as stream:
        for line in csv.DictReader(stream):
            a,b=int(line["u"]),int(line["v"])
            adj[a]|=1<<b

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.