Photon Quantum 3.0.0

Static Public Member Functions | List of all members
Quantum.Collections.QCollectionsUtils Class Reference

Helper class with utility methods used by QCollections. More...

Static Public Member Functions

static int GetNextPrime (int value)
 Finds the next prime number based on an integer value. Uses a lookup table. More...
 
static uint GetNextPrime (uint value)
 Finds the next prime number based on an unsigned integer value. Uses a lookup table. More...
 
static int GetNextPrimeGreaterThanOrEqual (int value)
 Finds a prime number which is either equal or greater than an integer value. Uses a lookup table. More...
 
static uint GetNextPrimeGreaterThanOrEqual (uint value)
 Finds a prime number which is either equal or greater than an unsigned integer value. Uses a lookup table. More...
 
static bool IsPrimeFromList (int value)
 Checks if an integer number is prime based on a lookup table. More...
 
static bool IsPrimeFromList (uint value)
 Checks if an unsigned integer number is prime based on a lookup table. More...
 
static unsafe void PrintSimple< T > (void *ptr, FramePrinter printer)
 Prints the value contained in a memory location referenced by a pointer More...
 

Detailed Description

Helper class with utility methods used by QCollections.

Member Function Documentation

◆ IsPrimeFromList() [1/2]

static bool Quantum.Collections.QCollectionsUtils.IsPrimeFromList ( uint  value)
inlinestatic

Checks if an unsigned integer number is prime based on a lookup table.

Parameters
valueThe value to be checked.
Returns
true if the value is a prime number.

◆ IsPrimeFromList() [2/2]

static bool Quantum.Collections.QCollectionsUtils.IsPrimeFromList ( int  value)
inlinestatic

Checks if an integer number is prime based on a lookup table.

Parameters
valueThe value to be checked.
Returns
true if the value is a prime number.

◆ GetNextPrime() [1/2]

static int Quantum.Collections.QCollectionsUtils.GetNextPrime ( int  value)
inlinestatic

Finds the next prime number based on an integer value. Uses a lookup table.

Parameters
valueThe base value.
Returns
The next prime number.

◆ GetNextPrime() [2/2]

static uint Quantum.Collections.QCollectionsUtils.GetNextPrime ( uint  value)
inlinestatic

Finds the next prime number based on an unsigned integer value. Uses a lookup table.

Parameters
valueThe base value.
Returns
The next prime number.

◆ GetNextPrimeGreaterThanOrEqual() [1/2]

static int Quantum.Collections.QCollectionsUtils.GetNextPrimeGreaterThanOrEqual ( int  value)
inlinestatic

Finds a prime number which is either equal or greater than an integer value. Uses a lookup table.

Parameters
valueThe base value.
Returns
The prime number.

◆ GetNextPrimeGreaterThanOrEqual() [2/2]

static uint Quantum.Collections.QCollectionsUtils.GetNextPrimeGreaterThanOrEqual ( uint  value)
inlinestatic

Finds a prime number which is either equal or greater than an unsigned integer value. Uses a lookup table.

Parameters
valueThe base value.
Returns
The prime number.

◆ PrintSimple< T >()

static unsafe void Quantum.Collections.QCollectionsUtils.PrintSimple< T > ( void *  ptr,
FramePrinter  printer 
)
inlinestatic

Prints the value contained in a memory location referenced by a pointer

Type Constraints
T :unmanaged