robustdeterminate

package
v0.0.0-...-bc4a3b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2016 License: BSD-2-Clause Imports: 1 Imported by: 0

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

const (
	// Negative indicates a negative determinate
	Negative Sign = iota - 1
	// Zero indicates the determinate is 0
	Zero
	// Positive indicates a positive determinate
	Positive
)

func SignOfDet2x2

func SignOfDet2x2(x1, y1, x2, y2 float64) Sign

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL