You are here: Start » AVL.NET » AVL.FitLineToPoints_TheilSen Method

AVL.FitLineToPoints_TheilSen Method

Approximates points with a line using TheilSen algorithm, optionally with Siegel's improvement.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

public static void FitLineToPoints_TheilSen(
	AvlNet.Point2D[] inPoints,
	AvlNet.TheilSenVariant inVariant,
	out AvlNet.Line2D outLine
)

Parameters

Name Type Range Default Description
inPointsAvlNet.Point2DInput points.
inVariantAvlNet.TheilSenVariantSwitches between Theil-Sen and Siegel methods.
outLineAvlNet.Line2DFitted line.

Errors

Error type Description
DomainError Empty set of points in FitLineToPoints_TheilSen.

See also