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
-
ObjectBaseSerializableObjectBaseComplexFieldArray
- 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
lengthlongLength 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
lengthlongLength of the array
samplingVectorThe sampling of the member fields.
isComplexboolAre the member fields complex or not?
ComplexFieldArray(ComplexFieldArray)
Copy constructor.
public ComplexFieldArray(ComplexFieldArray array)
Parameters
arrayComplexFieldArrayComplexFieldArray to copy
ComplexFieldArray(params ComplexField[])
Constructor that gets an array of equally sized ComplexField objects.
public ComplexFieldArray(params ComplexField[] array)
Parameters
arrayComplexField[]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
this[long]
Indexer to get or set a contained ComplexField object.
public ComplexField this[long index] { get; set; }
Parameters
indexlongIndex to access
Property Value
- ComplexField
ComplexField at the given index
Length
Gets the length of the array.
public int Length { get; }
Property Value
SamplingPoints
Gets the number of SamplingPoints in x and y. Returns (0, 0) for an empty array.
public Vector SamplingPoints { get; }
Property Value
Methods
AddRange(ComplexFieldArray)
Adds a range of complex fields, provided by another ComplexFieldArray, to this.
public void AddRange(ComplexFieldArray arrayToAdd)
Parameters
arrayToAddComplexFieldArrayComplexFieldArray 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
otherObjectobjectThe object to compare with this instance.
equalityIntentEqualityIntentDefines what kind of equality you want to check when comparing two objects, for example all values or physical equality.
Returns
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
cloneFieldsboolIf 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
array1ComplexFieldArrayfirst array
array2ComplexFieldArraysecond array
Returns
- bool
trueif 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
array1ComplexFieldArrayfirst array
array2ComplexFieldArraysecond array
Returns
- bool
trueif the two arrays do not contain the same data.