C# 클래스 RobustArithmetic.Test.Util.ExpansionExtensions

Various checks and conditions related for arbitrary-precision double expansions, implementing the various conditions from Shewchuk's paper.
파일 보기 프로젝트 열기: govert/RobustGeometry.NET

공개 메소드들

메소드 설명
AreAdjacent ( double x, double y ) : bool

Shewchuk p. 3 "Two floating-point values x and y are adjacent if they overlap, if x overlaps 2y, or if 2x overlaps y."

AreNonAdjacent ( double x, double y ) : bool
AreNonOverlapping ( double x, double y ) : bool

"Two floating-point values x and y are nonoverlapping if there exist integers r and s such that x = r.2^s and |y| < 2^s, OR y = r.2^s and |x| < 2^s."

AreOverlapping ( double x, double y ) : bool
IsNonAdjacent ( this doubles ) : bool

S.p3 "An expansion is nonadjacent if no two of its components are adjacent."

IsNonOverlapping ( this doubles ) : bool

S.p3 "An expansion is nonoverlapping if all its components are mutually nonoverlapping."

IsSorted ( this doubles ) : bool

Checks that the components are "sorted in order of increasing magnitude, except that any of the components may be zero". This is a condition used in Shewchuk Theorem 10, p. 10.

IsStronglyNonOverlapping ( this doubles ) : bool

S.p12 "An expansion is strongly nonoverlapping if no two of its components are overlapping, no component is adjacent to two other components, and any pair of adjacent components have the property that both components can be expressed with a one-bit significand (that is, both are powers of two)."

IsZeroElim ( this doubles ) : bool

Checks whether an expansion has been zero-eliminated. Either the expansion must have exactly one element, which is 0.0, or the expansion must have no 0.0 elements.

Print ( this e, int elen, double scale ) : void

비공개 메소드들

메소드 설명
ArePowersOfTwo ( double>.this doubles ) : bool
GetAdjacent ( IEnumerable doubles ) : double>>.IEnumerable

Returns The order of adjacency is not important, so the order of entries in the returned tuple is not significant.

NonOverlaps ( this x, double y ) : bool

메소드 상세

AreAdjacent() 공개 정적인 메소드

Shewchuk p. 3 "Two floating-point values x and y are adjacent if they overlap, if x overlaps 2y, or if 2x overlaps y."
public static AreAdjacent ( double x, double y ) : bool
x double
y double
리턴 bool

AreNonAdjacent() 공개 정적인 메소드

public static AreNonAdjacent ( double x, double y ) : bool
x double
y double
리턴 bool

AreNonOverlapping() 공개 정적인 메소드

"Two floating-point values x and y are nonoverlapping if there exist integers r and s such that x = r.2^s and |y| < 2^s, OR y = r.2^s and |x| < 2^s."
public static AreNonOverlapping ( double x, double y ) : bool
x double
y double
리턴 bool

AreOverlapping() 공개 정적인 메소드

public static AreOverlapping ( double x, double y ) : bool
x double
y double
리턴 bool

IsNonAdjacent() 공개 정적인 메소드

S.p3 "An expansion is nonadjacent if no two of its components are adjacent."
public static IsNonAdjacent ( this doubles ) : bool
doubles this
리턴 bool

IsNonOverlapping() 공개 정적인 메소드

S.p3 "An expansion is nonoverlapping if all its components are mutually nonoverlapping."
public static IsNonOverlapping ( this doubles ) : bool
doubles this
리턴 bool

IsSorted() 공개 정적인 메소드

Checks that the components are "sorted in order of increasing magnitude, except that any of the components may be zero". This is a condition used in Shewchuk Theorem 10, p. 10.
public static IsSorted ( this doubles ) : bool
doubles this
리턴 bool

IsStronglyNonOverlapping() 공개 정적인 메소드

S.p12 "An expansion is strongly nonoverlapping if no two of its components are overlapping, no component is adjacent to two other components, and any pair of adjacent components have the property that both components can be expressed with a one-bit significand (that is, both are powers of two)."
public static IsStronglyNonOverlapping ( this doubles ) : bool
doubles this
리턴 bool

IsZeroElim() 공개 정적인 메소드

Checks whether an expansion has been zero-eliminated. Either the expansion must have exactly one element, which is 0.0, or the expansion must have no 0.0 elements.
public static IsZeroElim ( this doubles ) : bool
doubles this
리턴 bool

Print() 공개 정적인 메소드

public static Print ( this e, int elen, double scale ) : void
e this
elen int
scale double
리턴 void