Changelog
View SourceAll notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.3.0] - 2026-06-14
Added
- Added
weakly_connected_components/1toZog.Connectivityandweakly_connected_components/2toZog.ResourceGraph. - Added
anf/2(Approximate Neighborhood Function) toZog.MetricsandZog.ResourceGraphto compute neighborhood sizes and estimate the 90-percentile effective diameter. - Added
kinoas an optional dependency to support future integration. - Added
bipartite_check/1andbipartite_partition/1toZog.Connectivityfor native 2-colorability testing and bipartite partition extraction. - Added
bipartite_check/2andbipartite_partition/2toZog.ResourceGraphfor the same operations on native resource-backed graphs. - Added
maximum_bipartite_matching/1toZog.Connectivityandmaximum_bipartite_matching/2toZog.ResourceGraph, implementing Hopcroft-Karp for maximum cardinality bipartite matching. - Added
ego_graph/3toZog.Transform(delegated viaZog.ego_graph/3) for extracting neighbourhood-induced ego graphs fromSoAbuilders. - Added
ego_graph/3toZog.ResourceGraphfor extracting ego graphs with native resource backing. - Added
transitive_closure/1,transitive_reduction/1, andcontract/3toZog.Transform(delegated viaZog.transitive_closure/1, etc.) for reachability graphs, minimal equivalent DAGs, and node contraction. - Added
transitive_closure/2,transitive_reduction/2, andcontract/4toZog.ResourceGraphfor the same transformations with native resource backing. - Added
subgraph/2toZog.Transform(delegated viaZog.subgraph/2) andsubgraph/3toZog.ResourceGraph(with native Zig NIF backing) for induced subgraph extraction.- Accepts both list and
MapSetinputs for node labels. - Both
SoAbuilder andResourceGraphpaths are covered with unit tests.
- Accepts both list and
Changed
- Replaced the recursive Tarjan SCC implementation with a highly optimized iterative Tarjan implementation, eliminating stack-overflow risk on deep graphs and achieving up to 8-9x speedup over pure Elixir while preserving the same public API and component groupings.
- Optimized
averageClusteringCoefficienton native resource graphs using a degree-ordered forward-triangle based algorithm, achieving optimal O(E^1.5) complexity and avoiding redundant O(sum d(u)^2) neighborhood scans. - Optimized native graph
triangle_countandaverage_clustering_coefficientCSR builders to perform direct SoA/flat slice lookups forArrayGraphand direct list fetches forGraphMap, avoiding hot successors iterator allocation and.next()function call overhead. Halved the cache footprint for clustering coefficient by storingtriangles_per_nodeusingu32instead ofusize. - Optimized
nif_subgraphandnif_node_degreesto use direct SoA/adjacency slice lookups instead of allocating successors iterators, achieving up to 4x speedups on large-scale subgraph extraction. - Optimized undirected edge loading in
nif_read_edgelistby replacing thestd.AutoHashMapbased edge deduplication with an in-place sort and single contiguous scan, reducing load times for the 69M edge LiveJournal graph from 115s to under 12s.
Fixed
- Fixed
Zog.Transform.subgraph/2incorrectly hard-codinginteger_labels: falseon the outputSoA, which causedSoA.all_labels/1andSoA.label_to_id/2to use the wrong code path for integer-labelled graphs (e.g. those loaded viaread_edgelistwith numeric node IDs). - Fixed
Zog.Transform.subgraph/2callingMapSet.new/1even when the caller already passed aMapSet, producing a redundant allocation. - Fixed
ResourceGraph.subgraph/3performing duplicate label-filtering work: thekept_idslist for the NIF is now derived directly from the already-computedsub_builder, eliminating a second full label traversal and guaranteeing the Elixir and native representations stay in sync. - Fixed
ResourceGraph.subgraph/3andResourceGraph.ego_graph/3failing to resolvekept_idscorrectly wheninteger_labelswas enabled, which had caused it to pass contiguous placeholder indices (0..next_id-1) to the NIF instead of the original node IDs. - Fixed
directed: falseloading over-symmetrizing files that already specify symmetric/bidirectional directed lines explicitly (e.g. SNAP undirected files). Dedupes edges by canonical(min, max)pair on loading, avoiding duplicate and redundant edge/self-loop allocations.
Removed
- Removed the deprecated
add_simple_edge/3function (useadd_unweighted_edge/3instead).
[0.2.0] - 2026-06-14
Added
- Added
ALGORITHMS.mdcompatibility matrix comparing Zog implementation status with YogEx. - Added
ROADMAP.mddetailing release milestones up to v0.5.0. - Included small sample of Wiki-Vote graph as a local test fixture (
test/fixtures/wiki_vote.txt) to replace hard-coded machine paths. - Proper docs groupings configuration for all entry points, generators, and algorithm helper modules in
mix.exs.
Changed
- Promoted
ziglerto a required dependency inmix.exs. - Bulk-updated stale
ziglerrecommended versions in NIF error fallback messages from~> 0.15.2to~> 0.16.0. - Renamed all public
is_reachable/3-4functions to follow Elixir idiomatic naming conventions:reachable?/3-4. - Replaced non-portable libc
clock_gettimewith Zig 0.16.0's cross-platformstd.Io.ClockAPI.
Fixed
- Fixed Zig native test suite compilation errors and invalid stack array frees in Tarjan connectivity tests.
- Resolved Dialyzer type-spec failures caused by referencing non-existent
Model.t()type instead ofSoA.t(). - Fixed memory leaks in
UnionFindinitialization on allocation failures in Kruskal's algorithm. - Fixed
ArrayGraph.transposestate corruption where tombstoned nodes inflated thelive_nodescount. - Fixed
edgeCountForNodeinArrayGraphto correctly ignore deleted edges. - Fixed latent
PriorityQueueAPI usage in native pathfinding modules (pq.add->pq.push). - Fixed a Use-After-Free thread safety issue: Thread spawn failures are now handled cleanly by joining already-running threads on error instead of detaching them.
- Fully resolved all
credostyle, alias ordering, and variable rebinding warnings. - Unified repository licenses by copying root Apache-2.0 to
priv/zog/LICENSE. - Fixed missing paths reference to
README.mdinpriv/zog/build.zig.zon.
[0.1.0] - 2026-06-11
Added
- Initial standalone extraction of native Zig NIF-based graph processing layer (
Zog). - Support for
ResourceGraphpattern avoiding copy-in/copy-out NIF serialization overhead. - Direct file parsing (
read_edgelist,read_adjlist,read_tgf) directly to native memory resources. - Bridging functions to/from
Yog(from_graph/1,to_graph/1). - Ported centrality, community, connectivity, flow, metrics, pathfinding, and properties modules.
- Verification and PBT test suite covering all modules.