RootedTrees

A collection of functionality around rooted trees to generate order conditions for Runge-Kutta methods in Julia for differential equations and scientific machine learning (SciML)

https://github.com/sciml/rootedtrees.jl

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 12 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

differential-equations hacktoberfest julia rooted-trees runge-kutta scientific-machine-learning sciml

Keywords from Contributors

matrix-exponential ode bridge primitives arrays base composibility interface julialang exponential
Last synced: 6 months ago · JSON representation ·

Repository

A collection of functionality around rooted trees to generate order conditions for Runge-Kutta methods in Julia for differential equations and scientific machine learning (SciML)

Basic Info
Statistics
  • Stars: 37
  • Watchers: 3
  • Forks: 17
  • Open Issues: 13
  • Releases: 62
Topics
differential-equations hacktoberfest julia rooted-trees runge-kutta scientific-machine-learning sciml
Created almost 7 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License Citation Zenodo

README.md

RootedTrees

Docs-stable Docs-dev Build Status Coverage Status codecov License: MIT DOI <!-- Downloads -->

A collection of functionality around rooted trees to generate order conditions for Runge-Kutta methods in Julia. This package also provides basic functionality for BSeries.jl.

API Documentation

The API of RootedTrees.jl is documented in the following. Additional information on each function is available in their docstrings and in the online documentation.

Construction

RootedTrees are represented using level sequences, i.e., AbstractVectors containing the distances of the nodes from the root, see

  • Beyer, Terry, and Sandra Mitchell Hedetniemi. "Constant time generation of rooted trees". SIAM Journal on Computing 9.4 (1980): 706-712. DOI: 10.1137/0209055

RootedTrees can be constructed from their level sequence using julia julia> t = rootedtree([1, 2, 3, 2]) RootedTree{Int64}: [1, 2, 3, 2] In the notation of Butcher (Numerical Methods for ODEs, 2016), this tree can be written as [[τ] τ] or (τ ∘ τ) ∘ (τ ∘ τ), where is the non-associative Butcher product of RootedTrees, which is also implemented.

To get the representation of a RootedTree introduced by Butcher, use butcher_representation: ```julia julia> t = rootedtree([1, 2, 3, 4, 3, 3, 2, 2, 2, 2, 2]) RootedTree{Int64}: [1, 2, 3, 4, 3, 3, 2, 2, 2, 2, 2]

julia> butcher_representation(t) "[[[τ]τ²]τ⁵]" ```

There are also some simple plot recipes for Plots.jl. Thus, you can visualize a rooted tree t using plot(t) when using Plots.

Additionally, there is an un-exported function RootedTrees.latexify that can generate LaTeX code for a rooted tree t based on the LaTeX package forest. The relevant code that needs to be included in the preamble can be obtained from the docstring of RootedTrees.latexify (type ? and RootedTrees.latexify in the Julia REPL). The same format is used when you are using Latexify and their function latexify, see Latexify.jl.

Iteration over RootedTrees

A RootedTreeIterator(order::Integer) can be used to iterate efficiently over all RootedTrees of a given order.

Be careful that the iterator is stateful for efficiency reasons, so you might need to use copy appropriately, e.g., ```julia julia> map(identity, RootedTreeIterator(4)) 4-element Array{RootedTrees.RootedTree{Int64,Array{Int64,1}},1}: RootedTree{Int64}: [1, 2, 2, 2] RootedTree{Int64}: [1, 2, 2, 2] RootedTree{Int64}: [1, 2, 2, 2] RootedTree{Int64}: [1, 2, 2, 2]

julia> map(copy, RootedTreeIterator(4)) 4-element Array{RootedTrees.RootedTree{Int64,Array{Int64,1}},1}: RootedTree{Int64}: [1, 2, 3, 4] RootedTree{Int64}: [1, 2, 3, 3] RootedTree{Int64}: [1, 2, 3, 2] RootedTree{Int64}: [1, 2, 2, 2] ```

Functions on Trees

The usual functions on RootedTrees are implemented, cf. Butcher (Numerical Methods for ODEs, 2016). - order(t::RootedTree): The order of a RootedTree, i.e., the length of its level sequence. - σ(t::RootedTree) or symmetry(t): The symmetry σ of a rooted tree, i.e., the order of the group of automorphisms on a particular labelling (of the vertices) of t. - γ(t::RootedTree) or density(t): The density γ(t) of a rooted tree, i.e., the product over all vertices of t of the order of the subtree rooted at that vertex. - α(t::RootedTree): The number of monotonic labelings of t not equivalent under the symmetry group. - β(t::RootedTree): The total number of labelings of t not equivalent under the symmetry group.

Additionally, functions on trees connected to Runge-Kutta methods are implemented. - elementary_weight(t, A, b, c): Compute the elementary weight Φ(t) of t::RootedTree for the Butcher coefficients A, b, c of a Runge-Kutta method. - derivative_weight(t, A, b, c): Compute the derivative weight (ΦᵢD)(t) of t for the Butcher coefficients A, b, c of a Runge-Kutta method. - residual_order_condition(t, A, b, c): The residual of the order condition (Φ(t) - 1/γ(t)) / σ(t) with elementary weight Φ(t), density γ(t), and symmetry σ(t) of the rooted tree t for the Runge-Kutta method with Butcher coefficients A, b, c.

Brief Changelog

  • v2.16: The LaTeX printing of rooted trees changed to allow representing colored rooted trees. Please update your LaTeX preamble as described in the docstring of RootedTrees.latexify.
  • v2.0: Rooted trees are considered up to isomorphisms introduced by shifting each coefficient of their level sequence by the same number.

Referencing

If you use RootedTrees.jl for your research, please cite the paper bibtex @article{ketcheson2023computing, title={Computing with {B}-series}, author={Ketcheson, David I and Ranocha, Hendrik}, journal={ACM Transactions on Mathematical Software}, volume={49}, number={2}, year={2023}, month={06}, doi={10.1145/3573384}, eprint={2111.11680}, eprinttype={arXiv}, eprintclass={math.NA} } In addition, you can also refer to RootedTrees.jl directly as bibtex @misc{ranocha2019rootedtrees, title={{RootedTrees.jl}: {A} collection of functionality around rooted trees to generate order conditions for {R}unge-{K}utta methods in {J}ulia for differential equations and scientific machine learning ({SciM}L)}, author={Ranocha, Hendrik and contributors}, year={2019}, month={05}, howpublished={\url{https://github.com/SciML/RootedTrees.jl}}, doi={10.5281/zenodo.5534590} }

Owner

  • Name: SciML Open Source Scientific Machine Learning
  • Login: SciML
  • Kind: organization
  • Email: contact@chrisrackauckas.com

Open source software for scientific machine learning

Citation (CITATION.bib)

@article{ketcheson2023computing,
  title={Computing with {B}-series},
  author={Ketcheson, David I and Ranocha, Hendrik},
  journal={ACM Transactions on Mathematical Software},
  volume={49},
  number={2},
  year={2023},
  month={06},
  doi={10.1145/3573384},
  eprint={2111.11680},
  eprinttype={arXiv},
  eprintclass={math.NA}
}

@misc{ranocha2019rootedtrees,
  title={{RootedTrees.jl}: {A} collection of functionality around rooted trees
         to generate order conditions for {R}unge-{K}utta methods in {J}ulia
         for differential equations and scientific machine learning ({SciM}L)},
  author={Ranocha, Hendrik and contributors},
  year={2019},
  month={05},
  howpublished={\url{https://github.com/SciML/RootedTrees.jl}},
  doi={10.5281/zenodo.5534590}
}

GitHub Events

Total
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 22
  • Pull request review event: 5
  • Pull request review comment event: 7
  • Pull request event: 13
  • Fork event: 5
  • Create event: 2
Last Year
  • Delete event: 2
  • Issue comment event: 4
  • Push event: 22
  • Pull request review event: 5
  • Pull request review comment event: 7
  • Pull request event: 13
  • Fork event: 5
  • Create event: 2

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 278
  • Total Committers: 12
  • Avg Commits per committer: 23.167
  • Development Distribution Score (DDS): 0.306
Past Year
  • Commits: 38
  • Committers: 7
  • Avg Commits per committer: 5.429
  • Development Distribution Score (DDS): 0.447
Top Committers
Name Email Commits
Hendrik Ranocha m****l@r****e 193
dependabot[bot] 4****] 49
Christopher Rackauckas C****t@C****m 11
github-actions[bot] 4****] 7
Yingbo Ma m****5@g****m 5
Anant Thazhemadam 4****m 5
Philipp 1****f 2
Chris de Graaf me@c****v 2
maja.k.gwozdz@gmail.com m****z@g****m 1
Qingyu Qu 5****Y 1
Julia TagBot 5****t 1
Arno Strouwen a****n@t****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 16
  • Total pull requests: 163
  • Average time to close issues: 29 days
  • Average time to close pull requests: 4 days
  • Total issue authors: 3
  • Total pull request authors: 11
  • Average comments per issue: 4.69
  • Average comments per pull request: 0.16
  • Merged pull requests: 150
  • Bot issues: 0
  • Bot pull requests: 60
Past Year
  • Issues: 0
  • Pull requests: 9
  • Average time to close issues: N/A
  • Average time to close pull requests: 2 days
  • Issue authors: 0
  • Pull request authors: 5
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • ranocha (14)
  • ketch (1)
  • thazhemadam (1)
  • JuliaTagBot (1)
Pull Request Authors
  • ranocha (87)
  • dependabot[bot] (71)
  • ChrisRackauckas (7)
  • github-actions[bot] (7)
  • thazhemadam (7)
  • pw0lf (3)
  • ArnoStrouwen (3)
  • btranmath (2)
  • christopher-dG (2)
  • YingboMa (2)
  • ErikQQY (1)
Top Labels
Issue Labels
enhancement (9) bug (1)
Pull Request Labels
dependencies (71) enhancement (1) bug (1) github_actions (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 67 total
  • Total dependent packages: 2
  • Total dependent repositories: 0
  • Total versions: 62
juliahub.com: RootedTrees

A collection of functionality around rooted trees to generate order conditions for Runge-Kutta methods in Julia for differential equations and scientific machine learning (SciML)

  • Versions: 62
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Downloads: 67 Total
Rankings
Stargazers count: 18.8%
Average: 20.6%
Forks count: 22.3%
Last synced: 7 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/upload-artifact v2 composite
  • codecov/codecov-action v1 composite
  • coverallsapp/github-action master composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-processcoverage v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
  • julia-actions/setup-julia latest composite
.github/workflows/DocPreviewCleanup.yml actions
  • actions/checkout v2 composite
.github/workflows/Documenter.yml actions
  • actions/checkout v2 composite
  • julia-actions/cache v1 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/FormatCheck.yml actions
  • actions/checkout v1 composite
  • julia-actions/setup-julia latest composite
.github/workflows/Invalidations.yml actions
  • actions/checkout v3 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-invalidations v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite
.github/workflows/SpellCheck.yml actions
  • actions/checkout v4 composite
  • crate-ci/typos v1.16.13 composite