Programming Reference for VirtualLab Fusion  2022.1
Public Member Functions | Static Public Member Functions | Properties | List of all members
SamplingParameters Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class contains parameters for proper sampling of a complex field. More...

Public Member Functions

override bool Equals (object obj)
 just override More...
 
override int GetHashCode ()
 Returns a hash code for this instance. More...
 
 SamplingParameters ()
 Default Constructor. Create a SamplingParameters with the default number of sampling points and the default sampling distance.
 
 SamplingParameters (SamplingParameters samplingParameters)
 Copy Constructor. More...
 
 SamplingParameters (Vector SamplingPoints, VectorD SamplingDistance)
 Creates SamplingParameters using given sampling points and distance. More...
 
override string ToString ()
 Converts a SamplingParameters object into a string. More...
 
string ToString (PhysicalProperty physicalProperty)
 Converts a SamplingParameters object into a string using information about the physical property of sampling distance and diameter. More...
 

Static Public Member Functions

static bool operator!= (SamplingParameters a, SamplingParameters b)
 Compares two SamplingParameters objects for inequality More...
 
static bool operator== (SamplingParameters a, SamplingParameters b)
 Compares two SamplingParameters objects for equality More...
 

Properties

VectorD Diameter [get]
 Calculates the diameter of the sampled area described by the sampling parameters. This is SamplingPoints * SamplingDistance. More...
 
FieldDimensions Dimensionality [get]
 Gets the dimensionality (one- or two-dimensional) of the sampling parameters. More...
 
long NumberOfSamplingPoints [get]
 Gets the number of sampling points. More...
 
VectorD SamplingDistance [get, set]
 Sampling distance for x- and y-axis
 
double SamplingDistanceX [get, set]
 Sampling distance for x-axis. If the sampling distance less or equal zero, then the sampling distance is set to Double.Epsilon.
 
double SamplingDistanceY [get, set]
 Sampling distance for y-axis. If the sampling distance less or equal zero, then the sampling distance is set to Double.Epsilon.
 
Vector SamplingPoints [get, set]
 Number of sampling points in x- and y-axis.
 
int SamplingPointsX [get, set]
 Number of sampling points in x-axis. If the number of sampling points is below 1, then 1 sampling point is assumed.
 
int SamplingPointsY [get, set]
 Number of sampling points in y-axis. If the number of sampling points is below 1, then 1 sampling point is assumed.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
This class contains parameters for proper sampling of a complex field.

Constructor & Destructor Documentation

◆ SamplingParameters() [1/2]

SamplingParameters ( Vector  SamplingPoints,
VectorD  SamplingDistance 
)

Creates SamplingParameters using given sampling points and distance.

Parameters
SamplingPointsNumber of sampling points.
SamplingDistanceSampling distance.

◆ SamplingParameters() [2/2]

SamplingParameters ( SamplingParameters  samplingParameters)

Copy Constructor.

Parameters
samplingParametersSamplingParameters to copy

Member Function Documentation

◆ Equals()

override bool Equals ( object  obj)

just override

Parameters
objThe System.Object to compare with this instance.
Returns
true if the specified System.Object is equal to this instance; otherwise, false.

◆ GetHashCode()

override int GetHashCode ( )

Returns a hash code for this instance.

Returns
A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

◆ operator!=()

static bool operator!= ( SamplingParameters  a,
SamplingParameters  b 
)
static

Compares two SamplingParameters objects for inequality

Parameters
afirst vector
bsecond vector
Returns
.

◆ operator==()

static bool operator== ( SamplingParameters  a,
SamplingParameters  b 
)
static

Compares two SamplingParameters objects for equality

Parameters
afirst sampling parameters
bsecond sampling parameters
Returns
.

◆ ToString() [1/2]

override string ToString ( )

Converts a SamplingParameters object into a string.

Returns
String containing the SamplingParameters information.

◆ ToString() [2/2]

string ToString ( PhysicalProperty  physicalProperty)

Converts a SamplingParameters object into a string using information about the physical property of sampling distance and diameter.

Parameters
physicalPropertyPhysical property of sampling distance and diameter.
Returns
String containing the SamplingParameters information.

Property Documentation

◆ Diameter

VectorD Diameter
get

Calculates the diameter of the sampled area described by the sampling parameters. This is SamplingPoints * SamplingDistance.

◆ Dimensionality

FieldDimensions Dimensionality
get

Gets the dimensionality (one- or two-dimensional) of the sampling parameters.


◆ NumberOfSamplingPoints

long NumberOfSamplingPoints
get

Gets the number of sampling points.