CVineStructure.from_trees

CVineStructure.from_trees(d: int, trees: collections.abc.Sequence[collections.abc.Sequence[tuple[int, int, collections.abc.Sequence[int]]]]) pyvinecopulib.core.RVineStructure

Assemble an RVineStructure from a list-of-trees decomposition.

This is the finalization step of Dissmann-style structure selection: given the edges chosen for each tree, it produces the corresponding R-vine matrix (variable order + structure array), reusing the same diagonal policy as select so the result matches the compiled selector.

Parameters:
dint

Dimension of the vine.

treeslist of list of tuple

Per-tree edge lists, indexed [tree][edge]. Each edge is a triple (a, b, conditioning) of 1-based variable labels, where a and b are the conditioned pair and conditioning is the (possibly empty) conditioning set. Tree t must contain exactly d - 1 - t edges. An empty list yields a fully truncated (independence) structure.

Returns:
RVineStructure

The assembled structure. Pair-copulas are not part of the input; callers fit them on the returned structure.