Skip to content

Tessero\Cluster\Hierarchy\Trees

← All classes

AI assistant

Build this with Claude Code, Cursor or Copilot

Copy a Tessero-tuned prompt for Tessero\Cluster\Hierarchy\Trees, grounded in 3 real API signatures , into your IDE's AI. No chatbot, just exact context.

toTree static
toTree(mixed $Z, bool $rd = false): Tessero\Cluster\Hierarchy\ClusterNode|array

Build the binary ClusterNode tree from a linkage matrix Z (scipy.cluster.hierarchy.to_tree). With $rd = false returns the root node; with $rd = true returns [root, nodes] where nodes[i] is the ClusterNode with id i (0..2n-2).

setLinkColorPalette static
setLinkColorPalette(?array $palette): void

Set (or reset, with null) the module link-colour palette. scipy set_link_color_palette.

dendrogram static
dendrogram(mixed $Z): array

The deterministic data payload of scipy.cluster.hierarchy.dendrogram(Z, no_plot=True) with default ordering (no count_sort / distance_sort), default colour_threshold = 0.7 * max(Z[:,2]) and above_threshold_color = 'C0'. Returns the dict keys icoord, dcoord, ivl, leaves, color_list, leaves_color_list.