You are here: Start » AVL.NET » Function Reference » Geometry 2D » Geometry 2D Fitting » AVL.FitLineToPoints_TheilSen
Approximates points with a line using TheilSen algorithm, optionally with Siegel's improvement.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void FitLineToPoints_TheilSen ( IList<AvlNet.Point2D> inPoints, AvlNet.TheilSenVariant inVariant, out AvlNet.Line2D outLine )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<AvlNet.Point2D> | Input points. | ||
![]() | inVariant | AvlNet.TheilSenVariant | Switches between Theil-Sen and Siegel methods. | ||
![]() | outLine | AvlNet.Line2D | Fitted line. |
Errors
List of possible exceptions:
| Error type | Description |
|---|---|
| DomainError | Empty array of points in FitLineToPoints_TheilSen. |
| DomainError | Range exceeds the input point array in FitLineToPoints_TheilSen. |
Function Overrides
- FitLineToPoints_TheilSen(IList<Point2D>, Nullable<Range>, TheilSenVariant, Nullable<Int32>, Nullable<Single>, Line2D)
- FitLineToPoints_TheilSen(IList<Point2D>, Nullable<Range>, TheilSenVariant, Nullable<Int32>, Nullable<Single>, Line2D, IList<Single>)


