Documentation ¶
Overview ¶
Package robustdeterminate 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
/////////////////////////////////////////////////////////////////////////
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sign ¶
type Sign int
Sign enumerates the different possible signs
func SignOfDet2x2 ¶
SignOfDet2x2 computes the sign of the determinant of the 2x2 matrix with the given entries, in a robust way.
return -1 if the determinant is negative,
return 1 if the determinant is positive,
return 0 if the determinant is 0.