pjrule / elbridge

A framework for I-cut-I-freeze redistricting
MIT License
1 stars 0 forks source link

VTD fusions #2

Closed pjrule closed 5 years ago

pjrule commented 5 years ago

We'd like to be able to reproducibly generate and apply fusions—constraints that force VTDs to always be allocated together. There are two current cases where this is useful:

Some fusion functions were previously implemented in elbridge.fusions. This PR adds elbridge.graph.FusionGraph, which generates a fusion graph from a list of callable fusions and provides a fuse() method to apply fusions to a list of VTDs.

codecov-io commented 5 years ago

Codecov Report

Merging #2 into ci-cd will increase coverage by 0.57%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##            ci-cd       #2      +/-   ##
==========================================
+ Coverage   93.09%   93.67%   +0.57%     
==========================================
  Files          10       10              
  Lines         739      790      +51     
==========================================
+ Hits          688      740      +52     
+ Misses         51       50       -1
Impacted Files Coverage Δ
elbridge/fusions.py 100% <100%> (ø) :arrow_up:
elbridge/__init__.py 100% <100%> (ø) :arrow_up:
elbridge/graph.py 96.34% <100%> (+1.3%) :arrow_up:
tests/test_graph.py 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 26c6b82...1ab3bd9. Read the comment docs.