robustdeterminate

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 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

Relicensed under EDL and EPL with Permission from Olivier Devillers 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