NetTopologySuite
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
NetTopologySuite.Precision.CommonBits Class Reference

Determines the maximum number of common most-significant bits in the mantissa of one or numbers. Can be used to compute the double-precision number which is represented by the common bits. If there are no common bits, the number computed is 0.0. More...

Public Member Functions

void Add (double num)
 
string ToString (long bits)
 A representation of the Double bits formatted for easy readability More...
 

Static Public Member Functions

static long SignExpBits (long num)
 Computes the bit pattern for the sign and exponent of a double-precision number. More...
 
static int NumCommonMostSigMantissaBits (long num1, long num2)
 This computes the number of common most-significant bits in the mantissas of two double-precision numbers. It does not count the hidden bit, which is always 1. It does not determine whether the numbers have the same exponent - if they do not, the value computed by this function is meaningless. More...
 
static long ZeroLowerBits (long bits, int nBits)
 Zeroes the lower n bits of a bitstring. More...
 
static int GetBit (long bits, int i)
 Extracts the i'th bit of a bitstring. More...
 

Properties

double Common [get]
 

Detailed Description

Determines the maximum number of common most-significant bits in the mantissa of one or numbers. Can be used to compute the double-precision number which is represented by the common bits. If there are no common bits, the number computed is 0.0.

Member Function Documentation

void NetTopologySuite.Precision.CommonBits.Add ( double  num)

Parameters
num
static int NetTopologySuite.Precision.CommonBits.GetBit ( long  bits,
int  i 
)
static

Extracts the i'th bit of a bitstring.

Parameters
bitsThe bitstring to extract from.
iThe bit to extract.
Returns
The value of the extracted bit.
static int NetTopologySuite.Precision.CommonBits.NumCommonMostSigMantissaBits ( long  num1,
long  num2 
)
static

This computes the number of common most-significant bits in the mantissas of two double-precision numbers. It does not count the hidden bit, which is always 1. It does not determine whether the numbers have the same exponent - if they do not, the value computed by this function is meaningless.

Parameters
num1

///

Parameters
num2
Returns
The number of common most-significant mantissa bits.
static long NetTopologySuite.Precision.CommonBits.SignExpBits ( long  num)
static

Computes the bit pattern for the sign and exponent of a double-precision number.

Parameters
num
Returns
The bit pattern for the sign and exponent.
string NetTopologySuite.Precision.CommonBits.ToString ( long  bits)

A representation of the Double bits formatted for easy readability

Parameters
bits
Returns
static long NetTopologySuite.Precision.CommonBits.ZeroLowerBits ( long  bits,
int  nBits 
)
static

Zeroes the lower n bits of a bitstring.

Parameters
bitsThe bitstring to alter.
nBitsthe number of bits to zero.
Returns
The zeroed bitstring.

Property Documentation

double NetTopologySuite.Precision.CommonBits.Common
get


The documentation for this class was generated from the following file: