pysiglib.trees_of_order#
- trees_of_order(dimension, order, *, planar=False)[source]#
Returns all basis elements with exactly
ordernodes.For
planar=Falsethese are non-planar decorated rooted trees. Forplanar=Truethese are ordered forests of decorated planar rooted trees, withorderequal to the total number of nodes in the forest. The order matches the native pySigLib coefficient layout.- Parameters:
dimension (int) – Path dimension (alphabet size).
order (int) – Exact number of nodes.
planar (bool) – If True, enumerate ordered forests of planar rooted trees.
- Returns:
Tuple of basis elements as tuples in native pySigLib convention.
- Return type:
tuple[tuple]
Example:#
import pysiglib # All single-node trees over dimension 2 t = pysiglib.trees_of_order(2, 1) print(t) # ((0,), (1,))
Citation#
If you found this library useful in your research, please consider citing the paper:
@article{shmelev2025pysiglib,
title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
author={Shmelev, Daniil and Salvi, Cristopher},
journal={arXiv preprint arXiv:2509.10613},
year={2025}
}