Skip to content

v0.1.3

Choose a tag to compare

@IvanChernyshov IvanChernyshov released this 26 Jan 13:07
· 2 commits to main since this release
fdb5adf

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, plus in_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.
  • 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 clarified data_version semantics).
    • Edge key generation became deterministic and local to (u, v) pairs; explicit keys must be int (bool rejected).
    • PeriodicGraph.check_invariants() was added to validate undirected pairing invariants.
  • 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__ (and PBC_META_KEY internally). Code that previously read _pbc_* or orig_edges must now read __pbcgraph__.
  • Canonical lifts

    • Added canonical_lift(...) to select strand representatives (cosets in Z^d/L), with placements tree, best_anchor, and greedy_cut, and optional spanning-tree edge return.
    • Added read-only PeriodicComponent.snf and PeriodicComponent.tree_parent_map() and adjusted canonical lift internals to avoid touching private component caches.
  • Robustness and maintenance

    • Added scoped errors: CanonicalLiftError, LiftPatchError.
    • Removed SymPy by implementing exact inversion for unimodular matrices.
    • Refactoring work split pbcgraph.alg.lift into _lift_patch / _canonical_lift modules and simplified internal filtering/exports; lift_patch(...) for undirected containers avoids redundant incoming-edge traversal (no semantic change).