Table of Contents

Class ComplexFieldArray

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

Class to encapsulate an array of objects of type ComplexField.

[Serializable]
public class ComplexFieldArray : ComplexFieldArrayBase<ComplexField>, IEquatable<IObjectBase>, ICloneable, IDisposable
Inheritance
ObjectBase
SerializableObjectBase
ComplexFieldArray
Implements
IEquatable<IObjectBase>
Inherited Members

Constructors

ComplexFieldArray()

Default constructor. Creates an empty array of length 1.

public ComplexFieldArray()

ComplexFieldArray(long)

Constructor that creates an empty array of a given length.

public ComplexFieldArray(long length)

Parameters

length long

Length of the array to create.

ComplexFieldArray(long, Vector, bool)

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

public ComplexFieldArray(long length, Vector sampling, bool isComplex)

Parameters

length long

Length of the array

sampling Vector

The sampling of the member fields.

isComplex bool

Are the member fields complex or not?

ComplexFieldArray(ComplexFieldArray)

Copy constructor.

public ComplexFieldArray(ComplexFieldArray array)

Parameters

array ComplexFieldArray

ComplexFieldArray to copy

ComplexFieldArray(params ComplexField[])

Constructor that gets an array of equally sized ComplexField objects.

public ComplexFieldArray(params ComplexField[] array)

Parameters

array ComplexField[]

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

Properties

ArrayOfComplexFields

Gets the array of complex fields.

protected override ComplexField[] ArrayOfComplexFields { get; }

Property Value

ComplexField[]

this[long]

Indexer to get or set a contained ComplexField object.

public ComplexField this[long index] { get; set; }

Parameters

index long

Index to access

Property Value

ComplexField

ComplexField at the given index

Length

Gets the length of the array.

public int Length { get; }

Property Value

int

SamplingPoints

Gets the number of SamplingPoints in x and y. Returns (0, 0) for an empty array.

public Vector SamplingPoints { get; }

Property Value

Vector

Methods

AddRange(ComplexFieldArray)

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

public void AddRange(ComplexFieldArray arrayToAdd)

Parameters

arrayToAdd ComplexFieldArray

ComplexFieldArray to get the complex fields to add from.

Clone()

Creates a deep copy of this ComplexFieldArray object.

public override object Clone()

Returns

object

Deep copy of this

Equals(object, EqualityIntent)

Determines whether the specified object is equal to this instance.

public override bool Equals(object otherObject, EqualityIntent equalityIntent)

Parameters

otherObject object

The object to compare with this instance.

equalityIntent EqualityIntent

Defines what kind of equality you want to check when comparing two objects, for example all values or physical equality.

Returns

bool

true if the specified object is equal to this instance; otherwise, false.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToArray(bool)

Returns this class as array of ComplexField.

public ComplexField[] ToArray(bool cloneFields = true)

Parameters

cloneFields bool

If this optional parameter is set to false, references to the original fields are returned instead of copies.

Returns

ComplexField[]

An array of ComplexField.

Operators

operator ==(ComplexFieldArray, ComplexFieldArray)

Compares two complex field arrays for equality.

public static bool operator ==(ComplexFieldArray array1, ComplexFieldArray array2)

Parameters

array1 ComplexFieldArray

first array

array2 ComplexFieldArray

second array

Returns

bool

true if the two arrays contain the same data.

operator !=(ComplexFieldArray, ComplexFieldArray)

Compares two complex field arrays for inequality.

public static bool operator !=(ComplexFieldArray array1, ComplexFieldArray array2)

Parameters

array1 ComplexFieldArray

first array

array2 ComplexFieldArray

second array

Returns

bool

true if the two arrays do not contain the same data.