• Add function to compute the line graph of a graph line_graph() #239

  • Add function to extract a subtree from a tree sub_tree() #238

  • Add new fast lowest common ancestor algorithm lowest_common_ancestor_preprocess() with \(O(n)\) time preprocessing and average \(O(1)\) time query (based on sparse table with blocks). The expected speedup is comprised between 1.2 and 1.8 compared to the previous method (parse table without block wich is still available). #237

  • Add options to set a global thread number limit set_num_threads() #234


  • Add support for Python 3.9, remove support of Python 3.5` #233


Breaking changes

  • C++ only: the children relation of trees is not computed automatically anymore, a call to the member function compute_children is required before accessing to any children information of a tree, see documentation Children relation #228

Other changes

  • Function bpt_canonical() can now process a graph given as a edge list (arrays of source and target vertices) #230

  • Add functions sources() and targets() to the classes UndirectedGraph and Tree which will returns views whenever possible #230

  • Add options for memory pre-allocation in UndirectedGraph constructor #232

  • Improve performance of regular grid graphs #231

  • Improve memory usage of marginal accumulators #228

  • Remove the need of the children relation anymore of trees in several functions #228

  • Bugfix: Regular grid graph will now always fulfils the CptGridGraph concept #229


Breaking changes

Other changes

  • Major Python classes (Trees, graphs, …) are now pickable #212 and #214

  • Python classes now support dynamic attributes and higra attributes are now stored directly in the objects dictionaries with a direct access as class members. #209 and #210

  • Function bpt_canonical() now supports: construction of the tree based on an arbitrary given ordering, avoid the explicit computation of the minimum spanning tree, multidimentional edge weights (with lexicographic sorting). The documentation has also been improved. #222

  • Fast lowest ancestor computation is now better integrated to the Tree class. Calling lowest_common_ancestor_preprocess() will now make any call to lowest_common_ancestor() to use the pre-processing #216

  • Add parallel sorting functions sort() and arg_sort() (also support lexicographic ordering). #219

  • Add function subgraph() to extract the subgraph induced by a set of edges from an undirected graph 4cfa9ac

  • Functions for watershed hierarchies in Python can now return the non canonized tree (option canonize_tree=False) #220

  • Function canonize_hierarchy() can now return the node_map which associates any node of the canonized tree to a node of the original tree. 5701d29

  • Fix bug in filter_small_nodes_from_tree() when the base graph is a region adjacency graph #215




  • Decrease ABI compatibility of linux wheels to 8 (G++ 4.9) #177


Breaking change

  • Removed overload of function weight_graph() taking a custom weighting function. An equivalent, and much efficient, behavior can be achieved be applying a vectorized function on the edge list (see edge_list()) 5914574

  • Removed support for Python 3.4 #174

Other changes




Breaking change

Other changes



Breaking change

  • Refactor attributes related to perimeter: there is now a single homogeneous function attribute_contour_length() that replaces attribute_perimeter_length, attribute_perimeter_length_component_tree, and attribute_perimeter_length_partition_tree #121 and #124

  • Add decorator auto_cache() for auto-caching of function results which replaces the decorator data_provider. #122 and #127

Other changes





Breaking change

Other changes






Breaking change

  • Refactor Python concepts #88

Other changes