Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
FSobol Class Reference

#include <Sobol.h>

Static Public Member Functions

static float Evaluate (int32 Index, int32 Dim, int32 Seed=0)
 
static float Next (int32 Index, int32 Dim, float Value)
 
static FVector2D Evaluate (int32 Index, int32 CellBits, FIntPoint Cell, FIntPoint Seed)
 
static FVector2D Next (int32 Index, int32 CellBits, FVector2D Value)
 
static FVector Evaluate (int32 Index, int32 CellBits, FIntVector Cell, FIntVector Seed)
 
static FVector Next (int32 Index, int32 CellBits, FVector Value)
 
static uint16 ComputeGPUSpatialSeed (int32 x, int32 y, int32 Index)
 

Static Public Attributes

static constexpr int32 MaxDimension = 15
 
static constexpr int32 MaxCell2DBits = 15
 
static constexpr int32 MaxCell3DBits = 10
 

Static Private Attributes

static const int32 DirectionNumbers [MaxDimension+1][32]
 
static const int32 GrayNumbers [MaxDimension+1][32]
 
static const int32 Cell2DDirectionNumbers [MaxCell2DBits+1][32][2]
 
static const int32 Cell2DGrayNumbers [MaxCell2DBits+1][32][2]
 
static const int32 Cell3DDirectionNumbers [MaxCell3DBits+1][32][3]
 
static const int32 Cell3DGrayNumbers [MaxCell3DBits+1][32][3]
 

Detailed Description

Support for Sobol quasi-random numbers

Definition at line 13 of file Sobol.h.

Member Function Documentation

◆ ComputeGPUSpatialSeed()

static uint16 FSobol::ComputeGPUSpatialSeed ( int32 x,
int32 y,
int32 Index )
static

◆ Evaluate() [1/3]

static FVector2D FSobol::Evaluate ( int32 Index,
int32 CellBits,
FIntPoint Cell,
FIntPoint Seed )
static

Evaluate Sobol number from within a 2D cell at given index

Parameters
Index- The index to evaluate.
Cell- Integer cell coordinates.
CellBits- Number of bits in cell coordinates.
Seed- A 24-bit per component 2D seed for shuffling values
Returns
The 2D Sobol result in the range 0-1 given Index

◆ Evaluate() [2/3]

static FVector FSobol::Evaluate ( int32 Index,
int32 CellBits,
FIntVector Cell,
FIntVector Seed )
static

Evaluate Sobol number from within a 3D cell at given index

Parameters
Index- The index to evaluate.
Cell- Integer cell coordinates.
CellBits- Number of bits in cell coordinates.
Seed- A seed for shuffling values (0-1)
Returns
The Sobol result given Index

◆ Evaluate() [3/3]

static float FSobol::Evaluate ( int32 Index,
int32 Dim,
int32 Seed = 0 )
static

Evaluate Sobol number from one of the traditional Sobol dimensions at the given index

Parameters
Index- The index to evaluate.
Dim- The Sobol dimension to use (0-15).
Seed- A 24-bit random seed when reusing the same dimension
Returns
The Sobol result at the given Index

◆ Next() [1/3]

static FVector FSobol::Next ( int32 Index,
int32 CellBits,
FVector Value )
static

Evaluate next Sobol number from within a 3D cell

Parameters
Index- The index for the Sobol number to generate.
CellBits- Number of bits in cell coordinates.
Value- The value for the Sobol number at Index-1.
Returns
The Sobol result at given Index

◆ Next() [2/3]

static FVector2D FSobol::Next ( int32 Index,
int32 CellBits,
FVector2D Value )
static

Evaluate next Sobol number from within a 2D cell

Parameters
Index- The index for the Sobol number to generate.
CellBits- Number of bits in cell coordinates.
Value- The value for the Sobol number at Index-1.
Returns
The 2D Sobol result in the range 0-1 given Index

◆ Next() [3/3]

static float FSobol::Next ( int32 Index,
int32 Dim,
float Value )
static

Evaluate next Sobol number from one of the traditional Sobol dimensions

Parameters
Index- The index for the Sobol number to generate.
Dim- The Sobol dimension to use (0-15)
Value- The value for the Sobol number at Index-1.
Returns
The Sobol result at the given Index

Member Data Documentation

◆ Cell2DDirectionNumbers

const int32 FSobol::Cell2DDirectionNumbers[MaxCell2DBits+1][32][2]
staticprivate

Definition at line 35 of file Sobol.h.

◆ Cell2DGrayNumbers

const int32 FSobol::Cell2DGrayNumbers[MaxCell2DBits+1][32][2]
staticprivate

Definition at line 38 of file Sobol.h.

◆ Cell3DDirectionNumbers

const int32 FSobol::Cell3DDirectionNumbers[MaxCell3DBits+1][32][3]
staticprivate

Definition at line 41 of file Sobol.h.

◆ Cell3DGrayNumbers

const int32 FSobol::Cell3DGrayNumbers[MaxCell3DBits+1][32][3]
staticprivate

Definition at line 44 of file Sobol.h.

◆ DirectionNumbers

const int32 FSobol::DirectionNumbers[MaxDimension+1][32]
staticprivate

Definition at line 29 of file Sobol.h.

◆ GrayNumbers

const int32 FSobol::GrayNumbers[MaxDimension+1][32]
staticprivate

Definition at line 32 of file Sobol.h.

◆ MaxCell2DBits

constexpr int32 FSobol::MaxCell2DBits = 15
staticconstexpr

Definition at line 21 of file Sobol.h.

◆ MaxCell3DBits

constexpr int32 FSobol::MaxCell3DBits = 10
staticconstexpr

Definition at line 25 of file Sobol.h.

◆ MaxDimension

constexpr int32 FSobol::MaxDimension = 15
staticconstexpr

Definition at line 17 of file Sobol.h.


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