Tags: VEZY/MultiScaleTreeGraph.jl
Tags
[Diff since v0.15.1](v0.15.1...v0.15.2) * Optimize sub-tree reparenting by @VEZY in #92 When we reparent a sub-tree, we recomputed the whole column store. This is not optimal when we have constant attributes, and only need to add new rows to the columns, in e.g. a simulation setup. This happened for example, in VPalm, when constructing the leaflet with its components first, and then attaching it to its rachis node. This patch fixes this issue and reduces computation time by ~18x in such cases. **Full Changelog**: v0.15.1...v0.15.2 **Merged pull requests:** - Optimize sub-tree reparenting (#92) (@VEZY)
[Diff since v0.15.0](v0.15.0...v0.15.1) * Fix: issue when updating node id or merging trees by @VEZY in #91 This issue was caught in PlantGeom: when reading an OPS file with repeated OPF files, we read only one and make copies. The copies are then updated with their node_id, which silently invalidates the attributes table. This is now fixed with this release by forcing a table update when branching a tree into another one, and better handling this potential error in `descendants`. **Full Changelog**: v0.15.0...v0.15.1 **Merged pull requests:** - Fix: issue when updating node id or merging trees (#91) (@VEZY) **Closed issues:** - Issue when updating node id or merging trees (#90)
[Diff since v0.14.4](v0.14.4...v0.15.0) - `symbol` and `link` are now represented as `Symbol` internally and in accessors. - Code that compared against strings must be updated (example: `"Leaf"` -> `:Leaf`). - `read_mtg` now always uses the typed columnar attribute backend (`ColumnarAttrs`). - The old “choose any attribute container backend at read time” workflow is removed. - Table output was streamlined: - `to_table` is now the main public table entrypoint. - Root metadata fields `:description`, `:symbols`, `:scales` are no longer regular columns in `to_table(...)` output. - If you relied on those columns, migrate to root attributes/metadata access. - `type=` in `descendants` / `descendants!` / `ancestors` / `ancestors!` is deprecated (not removed yet). - `insert_node!` is deprecated in favor of `insert_parent!`. - Symbol/link comparisons and filters: ```julia symbol(node) == "Leaf" descendants(mtg, :Length, symbol="Leaf", link="<") symbol(node) == :Leaf descendants(mtg, :Length, symbol=:Leaf, link=:<) ``` - Attribute access/update: ```julia node_attributes(node)[:Width] node_attributes(node)[:Width] = 1.0 node[:Width] node[:Width] = 1.0 attribute(node, :Width) attribute!(node, :Width, 1.0) attributes(node, format=:dict) attribute_names(node) ``` - Traversal return typing: ```julia descendants(mtg, :Length, type=Union{Nothing, Float64}) descendants(mtg, :Length) # type inferred automatically ``` - Table conversion: ```julia tbl = to_table(mtg) # unified leaf_tbl = to_table(mtg, symbol=:Leaf) # per-symbol small_tbl = to_table(mtg, vars=[:Length]) # selected vars ``` - If you use DataFrames: ```julia using DataFrames df = DataFrame(mtg) # via Tables.jl interface df2 = to_table(mtg, sink=DataFrame) # explicit sink ``` - Major tree traversal/query optimization work. - Improved descendants/ancestors performance and type stability. - Hybrid descendants strategy support (`descendants_strategy`, `descendants_strategy!`) for growth-heavy vs query-heavy workflows. - PR: [#80](#80) - PR: [#88](#88) - `symbol` and `link` moved to Symbol-based representation for faster comparisons and lower allocation pressure. - PR: [#81](#81) - Attributes moved to typed table-backed storage (columnar, per symbol). - New/expanded attribute APIs: - `attribute`, `attribute!`, `attributes`, `attribute_names` - `add_column!`, `drop_column!`, `rename_column!` - PR: [#82](#82) - MTG now cleanly exposes `Tables.jl` interface. - `to_table` is the public generic entrypoint with optional `symbol`, `vars`, and `sink`. - DataFrames is no longer a hard dependency of the package; `DataFrame(mtg)` still works when DataFrames is loaded. - Table pretty-printing improved. - Metadata (`symbols`, `scales`) displayed as metadata/headers, not as regular data columns. - Benchmark suite cleanup and simplification after API consolidation. - PR: [#89](#89) - GitHub Actions dependency updates: - `julia-actions/cache` v1 -> v2 ([#83](#83)) - `actions/checkout` v4 -> v6 ([#84](#84)) - `codecov/codecov-action` v4 -> v5 ([#85](#85)) - `julia-actions/setup-julia` v1 -> v2 ([#86](#86)) - MetaGraphsNext compat extended to include `0.8` ([#87](#87)) - @dependabot[bot] in [#83](#83) - v0.14.4...v0.15.0 **Merged pull requests:** - Optimization of tree traversal (#80) (@VEZY) - Use symbols for mtg link and symbol (#81) (@VEZY) - Attributes as table (#82) (@VEZY) - Bump julia-actions/cache from 1 to 2 (#83) (@dependabot[bot]) - Bump actions/checkout from 4 to 6 (#84) (@dependabot[bot]) - Bump codecov/codecov-action from 4 to 5 (#85) (@dependabot[bot]) - Bump julia-actions/setup-julia from 1 to 2 (#86) (@dependabot[bot]) - Update MetaGraphsNext requirement from 0.5, 0.6, 0.7 to 0.5, 0.6, 0.7, 0.8 (#87) (@dependabot[bot]) - Optimize traversal and queries (#88) (@VEZY) - Update benchmarks.jl -> remove dead code (#89) (@VEZY) **Closed issues:** - Use `traversal_cache` for `descendants` (#42) - Ensure type stability in the MTG traversal (#51) - Add Tables.jl interface instead of DataFrame (#65) - Use symbols for MTG description (#74) - Add doc on traversal (#75) - `MultiScaleTreeGraph.traverse` too slow (#78) - Non-recursive traversal (#79)
[Diff since v0.13.2](v0.13.2...v0.14.0) **Merged pull requests:** - Fixed error on deleting multiple root nodes (#71) (@bspanoghe) - insert_generation! does not update parent (#73) (@VEZY) **Closed issues:** - delete_nodes! gives unexpected results when deleting multiple nodes at the root (#70) - insert_generation! does not update parent (#72)
[Diff since v0.13.1](v0.13.1...v0.13.2) **Merged pull requests:** - Fixed error on deleting root nodes (#69) (@bspanoghe) **Closed issues:** - delete_node! errors on root nodes (#68)
PreviousNext