Objects/Documentation
cellule29.py
Two mass transfers and an optimal face · cellule29.py
Download ↓"""An exact two-parameter chamber where the optimal faithful decoders form a segment."""
from itertools import combinations,product
from fractions import Fraction as F
from faces25 import constraints,vertices,load,table
from deficience21 import solve_square
import json
def clip(poly,h):
out=[]
def value(p):return h[0]+h[1]*p[0]+h[2]*p[1]
for a,b in zip(poly,poly[1:]+poly[:1]):
x,y=value(a),value(b)
if x>=0:out.append(a)
if x*y<0:out.append(tuple(v+x*(w-v)/(x-y) for v,w in zip(a,b)))
return list(dict.fromkeys(out))
def study():
rows=table(load('raccord27')['laws'])