Table of Contents

Class ComplexField1DArray

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

Class to encapsulate an array of objects of type ComplexFieldDerivative1D. It also ensures that all entries are either complex or real valued.

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

Constructors

ComplexField1DArray()

Default constructor. Creates an empty array of length 1.

public ComplexField1DArray()

ComplexField1DArray(long)

Constructor that creates an empty array of a given length.

public ComplexField1DArray(long length)

Parameters

length long

Length of the array to create.

ComplexField1DArray(long, long, bool)

Initializes a new instance of the ComplexField1DArray class.

public ComplexField1DArray(long length, long lengthOfComplexFields, bool isComplex)

Parameters

length long

The number of entries in the array.

lengthOfComplexFields long

The number of sampling points in one member field.

isComplex bool

if set to true the member fields are used to store complex numbers.

ComplexField1DArray(ComplexField1DArray)

Copy constructor.

public ComplexField1DArray(ComplexField1DArray array)

Parameters

array ComplexField1DArray

ComplexField1DArray to copy

ComplexField1DArray(params ComplexFieldDerivative1D[])

Constructor that gets an array of equally sized ComplexFieldDerivative1D objects

public ComplexField1DArray(params ComplexFieldDerivative1D[] array)

Parameters

array ComplexFieldDerivative1D[]

One or more ComplexFieldDerivative1D objects or an array of ComplexFieldDerivative1D objects.

ComplexField1DArray(params ComplexField[])

Constructor that gets an array of equally sized ComplexFieldDerivative1D objects.

public ComplexField1DArray(params ComplexField[] array)

Parameters

array ComplexField[]

One or more ComplexField objects or an array of ComplexField objects.

Properties

ArrayOfComplexFields

Gets the array of complex fields.

protected override ComplexFieldDerivative1D[] ArrayOfComplexFields { get; }

Property Value

ComplexFieldDerivative1D[]

this[long]

Indexer to get or set a contained ComplexFieldDerivative1D object.

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

Parameters

index long

Index to access

Property Value

ComplexFieldDerivative1D

ComplexFieldDerivative1D at given index.

Length

Gets the length of the array

public int Length { get; }

Property Value

int

SamplingPoints

Gets the number of SamplingPoints. Returns “0” for an empty array.

public int SamplingPoints { get; }

Property Value

int

Methods

AddRange(ComplexField1DArray)

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

public void AddRange(ComplexField1DArray arrayToAdd)

Parameters

arrayToAdd ComplexField1DArray

ComplexField1DArray to get the complex fields to add from.

Clone()

Creates a deep copy of this ComplexField1DArray 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 ComplexFieldDerivative1D.

public ComplexFieldDerivative1D[] 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

ComplexFieldDerivative1D[]

An array of ComplexFieldDerivative1D.

Operators

operator ==(ComplexField1DArray, ComplexField1DArray)

Checks whether two ComplexField1DArray objects are equal.

public static bool operator ==(ComplexField1DArray cf1, ComplexField1DArray cf2)

Parameters

cf1 ComplexField1DArray

The first ComplexField1DArray.

cf2 ComplexField1DArray

The second ComplexField1DArray.

Returns

bool

The result of the operator.

operator !=(ComplexField1DArray, ComplexField1DArray)

Checks whether two ComplexField1DArray objects are unequal.

public static bool operator !=(ComplexField1DArray cf1, ComplexField1DArray cf2)

Parameters

cf1 ComplexField1DArray

The first ComplexField1DArray.

cf2 ComplexField1DArray

The second ComplexField1DArray.

Returns

bool

The result of the operator.