Releases: DeloneCommons/pbcgraph
Releases · DeloneCommons/pbcgraph
v0.1.3.post1 - Metadata fixes
Fixes metadata
v0.1.3
This release merges three versions (0.1.1 => 0.1.3) and is focused on making pbcgraph deterministic, safer to mutate, and more robust for lift-based workflows.
-
Deterministic, stable core iteration
- All public iteration APIs (
nodes,edges,neighbors,successors,predecessors, plusin_neighbors*) now yield results deterministically, with a stable fallback order when objects are not mutually comparable. - Iteration internals were further optimized in 0.1.3 to stream deterministically without materializing/sorting full edge lists.
- All public iteration APIs (
-
Safer attribute handling and edge-key semantics
- Node/edge data accessors now return read-only live views; attribute mutation is routed through
set_node_attrs()/set_edge_attrs()(with clarifieddata_versionsemantics). - Edge key generation became deterministic and local to
(u, v)pairs; explicit keys must beint(bool rejected). PeriodicGraph.check_invariants()was added to validate undirected pairing invariants.
- Node/edge data accessors now return read-only live views; attribute mutation is routed through
-
Finite lift patches and NetworkX export
- Introduced
lift_patch(...)to extract finite patches of the infinite lift around a seed instance (BFS radius and/or cell-index bounding boxes), storing snapshot edge attributes and deterministically deduplicating paired realizations for undirected containers. - Directed periodic containers now produce directed patches by default;
LiftPatch.to_networkx(as_undirected=True, ...)provides undirected views. - 0.1.3 change: NetworkX export metadata for undirected views is consolidated under a single reserved edge attribute
__pbcgraph__(andPBC_META_KEYinternally). Code that previously read_pbc_*ororig_edgesmust now read__pbcgraph__.
- Introduced
-
Canonical lifts
- Added
canonical_lift(...)to select strand representatives (cosets inZ^d/L), with placementstree,best_anchor, andgreedy_cut, and optional spanning-tree edge return. - Added read-only
PeriodicComponent.snfandPeriodicComponent.tree_parent_map()and adjusted canonical lift internals to avoid touching private component caches.
- Added
-
Robustness and maintenance
- Added scoped errors:
CanonicalLiftError,LiftPatchError. - Removed SymPy by implementing exact inversion for unimodular matrices.
- Refactoring work split
pbcgraph.alg.liftinto_lift_patch/_canonical_liftmodules and simplified internal filtering/exports;lift_patch(...)for undirected containers avoids redundant incoming-edge traversal (no semantic change).
- Added scoped errors:
v0.1.0 First version
Implements core functionality for periodic graphs on Zd:
PeriodicGraph(undirected) andPeriodicDiGraph(directed), enforcing one edge per(u, v, tvec).PeriodicMultiGraphandPeriodicMultiDiGraphwhen you really need parallel edges for the same(u, v, tvec).- A
PeriodicComponentview that exposes lattice invariants of the component translation subgroup:rank(periodic dimension of the component),torsion_invariants(torsion / interpenetration signature),- deterministic
inst_key(...)keys for lifted instances within a component.
same_fragment(...): exact "are these two lifted instances in the same connected fragment?" checks.shortest_path_quotient(...): fast BFS in the quotient withconnectivity='directed'|'weak'.