Compute the unique weighted least-squares fit on a captured rooted tree: minimiz...
https://datenvertrag.halowerk.com/v1/tree-isotonic-regressionOverview
Compute the unique weighted least-squares fit on a captured rooted tree: minimize sum weights[i]*(fit[i]-values[i])^2 subject to fit[parent[i]] <= fit[i]. Return the entire fit and objective as reduced numerator/denominator strings, maximal connected equal-value blocks, and exact nonnegative KKT edge multipliers for the unhalved objective. Multipliers are indexed by child; root entry is zero. Nodes are numbered in ancestor-first order: parents[0]=-1 and 0<=parents[i]<i.