Programming Reference for VirtualLab Fusion  2025.1
Loading...
Searching...
No Matches
ComplexFieldArray Class Reference

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class to encapsulate an array of objects of type ComplexField. More...

Inheritance diagram for ComplexFieldArray:

Public Member Functions

void AddRange (ComplexFieldArray arrayToAdd)
 Adds a range of complex fields, provided by another ComplexFieldArray, to this.
 
 ComplexFieldArray ()
 Default constructor. Creates an empty array of length 1.
 
 ComplexFieldArray (ComplexField[] array)
 Constructor that gets an array of equally sized ComplexField objects.
 
 ComplexFieldArray (ComplexFieldArray array)
 Copy constructor.
 
 ComplexFieldArray (long length)
 Constructor that creates an empty array of a given length.
 
 ComplexFieldArray (long length, Vector sampling, bool isComplex, PrecisionMode precision=PrecisionMode.Double)
 Constructor that creates an empty array of a given length where all member fields have the given sampling.
 
ComplexField[] ToArray (bool cloneFields=true)
 Returns this class as array of ComplexField.
 

Properties

int Length [get]
 Gets the length of the array.
 
Vector SamplingPoints [get]
 Gets the number of SamplingPoints in x and y. Returns (0,0) for an empty array.
 
ComplexField this[long index] [get, set]
 Indexer to get or set a contained ComplexField object.
 

Detailed Description

This class is subject to change. Programs using this class may require changes with a new version of VirtualLab.
Class to encapsulate an array of objects of type ComplexField.

Constructor & Destructor Documentation

◆ ComplexFieldArray() [1/4]

Constructor that gets an array of equally sized ComplexField objects.

Parameters
arrayOne or more ComplexField objects or an array of ComplexField objects. The fields are cloned.

◆ ComplexFieldArray() [2/4]

Copy constructor.

Parameters
arrayComplexFieldArray to copy

◆ ComplexFieldArray() [3/4]

ComplexFieldArray ( long  length)

Constructor that creates an empty array of a given length.

Parameters
lengthLength of the array to create.

◆ ComplexFieldArray() [4/4]

ComplexFieldArray ( long  length,
Vector  sampling,
bool  isComplex,
PrecisionMode  precision = PrecisionMode::Double 
)

Constructor that creates an empty array of a given length where all member fields have the given sampling.

Parameters
lengthLength of the array
samplingThe sampling of the member fields.
isComplexAre the member fields complex or not?
precisionOptional precision of the new complex fields. (Double precision by default.)

Member Function Documentation

◆ AddRange()

void AddRange ( ComplexFieldArray  arrayToAdd)

Adds a range of complex fields, provided by another ComplexFieldArray, to this.

Parameters
arrayToAddComplexFieldArray to get the complex fields to add from

◆ ToArray()

ComplexField[] ToArray ( bool  cloneFields = true)

Returns this class as array of ComplexField.

Parameters
cloneFieldsIf this optional parameter is set to false, references to the original fields are returned instead of copies.
Returns
An array of ComplexField.

Property Documentation

◆ this[long index]

ComplexField this[long index]
getset

Indexer to get or set a contained ComplexField object.

Parameters
indexIndex to access
Returns
ComplexField at the given index