pub fn corner_mix(
corners: &[Point],
shares: &[(String, Vec<f64>)],
) -> Result<Placement, GeometryError>Available on crate feature
geometry only.Expand description
Places each item at the mix of corners given by its row of shares.
Each row holds one item’s shares over the corners; a row need not sum to one. A row of zeros leaves the item in
unplaced. Placed items and unplaced items both keep the input’s order.
§Errors
NonFinitePosition (item #<k>) for a corner that is not finite, CountMismatch (item: the row’s id) for a row
whose length is not the count of corners, BadWeight (item: the row’s id) for a share that is negative or not
finite. A row whose sums overflow gives NonFinitePosition (item: the row’s id).