You are here: Start » AVL.NET » AVL.FitSegmentToPoints_TheilSen
Approximates points with a segment using TheilSen algorithm, optionally with Siegel's improvement.
| Namespace: | AvlNet |
|---|---|
| Assembly: | AVL.NET.dll |
Syntax
C++
C#
public static void FitSegmentToPoints_TheilSen ( IList<AvlNet.Point2D> inPoints, AvlNet.Range? inRange, AvlNet.TheilSenVariant inVariant, out AvlNet.Segment2D outSegment )
Parameters
| Name | Type | Range | Default | Description | |
|---|---|---|---|---|---|
![]() | inPoints | System.Collections.Generic.IList<AvlNet.Point2D> | Input points. | ||
![]() | inRange | AvlNet.Range? | Determines which array points take part in fitting process. Default value: atl::NIL. | ||
![]() | inVariant | AvlNet.TheilSenVariant | Switches between Theil-Sen and Siegel methods. | ||
![]() | outSegment | AvlNet.Segment2D | Fitted segment. |
Errors
List of possible exceptions:
| Error type | Description |
|---|---|
| DomainError | Empty array of points in FitSegmentToPoints_TheilSen. |
| DomainError | Range exceeds the input point array in FitSegmentToPoints_TheilSen. |


