API Reference

The public API is divided by the role each component plays in a GerryChain workflow.

Core structures

Graphs

Geographic units and their adjacency relationships.

Graphs
Partitions

District assignments and plan statistics.

Partitions
Markov chains

Chain configuration, iteration, and state transitions.

Markov Chains

Building chains

Proposals and constraints

Candidate plans and the rules used to validate them.

Proposals and Constraints
Updaters and elections

Derived statistics, election results, and incremental updates.

Updaters and Elections

Utilities and analysis

Grids and spanning trees

Synthetic grids and tree-based partitioning tools.

Grids and Spanning Trees
Metrics and diversity

Compactness, partisan statistics, and ensemble diversity.

Metrics and Diversity