Function Repository Resource:

ButcherTreeQ

Source Notebook

Determine if a Butcher tree is in valid functional syntax

Contributed by: Wolfram Research

ResourceFunction["ButcherTreeQ"][tree]

gives True if tree is a valid Butcher tree, and False otherwise.

Examples

Basic Examples (1) 

Test the validity of a tree:

In[1]:=
ResourceFunction[
 "ButcherTreeQ"][\[FormalF][\[FormalF][\[FormalF][\[FormalF]] \[FormalF]^2]]]
Out[1]=

Scope (1) 

Use the list operator to compare the validity in a list:

In[2]:=
ResourceFunction[
 "ButcherTreeQ"] /@ {\[FormalF][\[FormalF][\[FormalF][\[FormalF]] \[FormalF]^2]], \[FormalF][\[FormalF] \[FormalF][\[FormalF] + \[FormalF]]]}
Out[2]=

Properties and Relations (1) 

The resource function ButcherTrees generates only valid Butcher trees, which can be checked with ButcherTreeQ:

In[3]:=
trees = ButcherTrees[4]
Out[3]=
In[4]:=
ResourceFunction["ButcherTreeQ"] /@ trees
Out[4]=

Version History

  • 1.0.0 – 28 August 2019

Related Resources

License Information