Search Results for

    Show / Hide Table of Contents

    Class RobustDeterminant

    Implements an algorithm to compute the sign of a 2x2 determinant for double precision values robustly. It is a direct translation of code developed by Olivier Devillers.

    The original code carries the following copyright notice:


    Author : Olivier Devillers Olivier.Devillers@sophia.inria.fr http:/www.inria.fr:/prisme/personnel/devillers/anglais/determinant.html

    Olivier Devillers has allowed the code to be distributed under the LGPL (2012-02-16) saying "It is ok for LGPL distribution."



    Copyright (c) 1995 by INRIA Prisme Project BP 93 06902 Sophia Antipolis Cedex, France. All rights reserved


    Inheritance
    object
    RobustDeterminant
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: NetTopologySuite.Algorithm
    Assembly: NetTopologySuite.dll
    Syntax
    public class RobustDeterminant

    Methods

    | Edit this page View Source

    OrientationIndex(Coordinate, Coordinate, Coordinate)

    Returns the index of the direction of the point q relative to a vector specified by p1-p2.

    Declaration
    public static int OrientationIndex(Coordinate p1, Coordinate p2, Coordinate q)
    Parameters
    Type Name Description
    Coordinate p1

    The origin point of the vector

    Coordinate p2

    The final point of the vector

    Coordinate q

    the point to compute the direction to

    Returns
    Type Description
    int
    • 1 if q is counter-clockwise (left) from p1-p2
    • -1 if q is clockwise (right) from p1-p2
    • 0 if q is collinear with p1-p2
    | Edit this page View Source

    SignOfDet2x2(double, double, double, double)

    Computes the sign of the determinant of the 2x2 matrix with the given entries, in a robust way.

    Declaration
    public static int SignOfDet2x2(double x1, double y1, double x2, double y2)
    Parameters
    Type Name Description
    double x1
    double y1
    double x2
    double y2
    Returns
    Type Description
    int
    • -1 if the determinant is negative,
    • 1 if the determinant is positive,
    • 0 if the determinant is null.
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX