C# Class MIConvexHull.ConvexHullInternal

Mostrar archivo Open project: gusmanb/MIConvexHull Class Usage Examples

Private Methods

Method Description
AddConvexVertex ( int i ) : void

Check if the vertex was already added and if not, add it.

CommitCone ( ) : void

Commits a cone and adds a vertex to the convex hull.

ConnectFace ( FaceConnector connector ) : void

Connect faces using a connector.

ConvexHullInternal ( IVertex vertices, bool lift, ConvexHullComputationConfig config ) : System

Wraps the vertices and determines the dimension if it's unknown.

CreateCone ( ) : bool

Removes the faces "covered" by the current vertex and adds the newly created ones.

CreateInitialHull ( ) : int[]

Create the first faces from (dimension + 1) vertices.

DetermineDimension ( ) : int

Check the dimensionality of the input data.

FindBeyondVertices ( ConvexFaceInternal face ) : void

Used in the "initialization" code.

FindBeyondVertices ( ConvexFaceInternal face, IndexBuffer beyond ) : void
FindBeyondVertices ( ConvexFaceInternal face, IndexBuffer beyond, IndexBuffer beyond1 ) : void

Used by update faces.

FindConvexHull ( ) : void

Fins the convex hull.

FindExtremes ( ) : List

Finds the extremes in all dimensions.

FindInitialPoints ( List extremes ) : List

Finds (dimension + 1) initial points.

GetCoordinate ( int v, int i ) : double

Get a vertex coordinate. Only used in the initialize functions, in other places it part v * Dimension + i is inlined.

GetSquaredDistanceSum ( int pivot, List initialPoints ) : double

Computes the sum of square distances to the initial points.

HandleSingular ( ) : void

Handles singular vertex.

InitConvexHull ( ) : void

Find the (dimension+1) initial points and create the simplexes.

InitSingle ( ) : void

Init the hull if Vertices.Length == Dimension.

InitSmall ( ) : void
InitializeData ( ConvexHullComputationConfig config ) : void

Initialize buffers and lists.

InitializePositions ( ConvexHullComputationConfig config ) : void

Initialize the vertex positions based on the translation type from config.

IsBeyond ( ConvexFaceInternal face, IndexBuffer beyondVertices, int v ) : void

Check whether the vertex v is beyond the given face. If so, add it to beyondVertices.

LexCompare ( int u, int v ) : int
MakeDeferredFace ( ConvexFaceInternal face, int faceIndex, ConvexFaceInternal pivot, int pivotIndex, ConvexFaceInternal oldFace ) : DeferredFace

Creates a new deferred face.

RollbackCenter ( ) : void

Removes the last vertex from the center.

TagAffectedFaces ( ConvexFaceInternal currentFace ) : void

Tags all faces seen from the current vertex with 1.

ThrowSingular ( ) : void

The exception thrown if singular input data detected.

TraverseAffectedFaces ( int currentFace ) : void

Recursively traverse all the relevant faces.

UpdateAdjacency ( ConvexFaceInternal l, ConvexFaceInternal r ) : void

Check if 2 faces are adjacent and if so, update their AdjacentFaces array.

UpdateCenter ( ) : void

Recalculates the centroid of the current hull.