Table of Contents

Class DataArray1D

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

Class for objects that store data in C^N which are equidistantly or non-equidistantly distributed in R^1.

[Serializable]
public class DataArray1D : DataArrayGridded, ISerializable, IDeserializationCallback, IDocument, IEquatable<IObjectBase>, ICloneable, IDisposable
Inheritance
ObjectBase
SerializableObjectBase
ManualSerialization
DocumentBase
DataArray1D
Implements
IEquatable<IObjectBase>
Inherited Members
Extension Methods

Constructors

DataArray1D(double[,], PhysicalProperty, string, PhysicalProperty, string, double, ExtrapolationInfo, InterpolationMethodForNonequidistantData)

Special constructor for non-equidistant data, that are stored in a double[,] array. Only one subset is used, i.e. N = 1.

public DataArray1D(double[,] coordinatesAndData, PhysicalProperty physicalPropertyOfData, string commentOfData, PhysicalProperty physicalPropertyOfCoordinates, string commentOfCoordinates, double coordinateOfLastIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolation = InterpolationMethodForNonequidistantData.ConstantInterval)

Parameters

coordinatesAndData double[,]

The coordinates and the real valued data. The method determines automatically whether the array is organized as [2,n] or [n,2], with n = number of data points. The coordinates have to be stored in [0,n] or [n,0] and the data have to be stored in [1,n] or [n,1].

physicalPropertyOfData PhysicalProperty

Physical properties of each data subset.

commentOfData string

Comments for each data subset.

physicalPropertyOfCoordinates PhysicalProperty

Physical property for the coordinates

commentOfCoordinates string

Comment for the coordinates

coordinateOfLastIntervalsUpperLimit double

Coordinate of the last interval's upper limit.

extrapolation ExtrapolationInfo

Optional information about how extrapolation of the data shall be done. By default border value continuation is done.

interpolation InterpolationMethodForNonequidistantData

The interpolation method to be used.

DataArray1D(double[], PhysicalProperty, string, double, double, PhysicalProperty, string, ExtrapolationInfo, InterpolationMethod)

Special constructor for equidistant data, that are stored in a double[] array. Only one subset is used, i.e. N = 1.

public DataArray1D(double[] data, PhysicalProperty physicalPropertyOfData, string commentOfData, double samplingDistance, double coordinateOfFirstDataPoint, PhysicalProperty physicalPropertyOfCoordinates, string commentOfCoordinates, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolation = InterpolationMethod.Nearest)

Parameters

data double[]

The data in C^1. The double values will be filled into one real valued subset.

physicalPropertyOfData PhysicalProperty

Physical properties of each data subset.

commentOfData string

Comments for each data subset.

samplingDistance double

Sampling distance for (and only for) equidistantly sampled data.

coordinateOfFirstDataPoint double

Coordinate of the first data point Data[0] for (and only for) equidistantly sampled data.

physicalPropertyOfCoordinates PhysicalProperty

Physical property for the coordinates

commentOfCoordinates string

Comment for the coordinates

extrapolation ExtrapolationInfo

Optional information about how extrapolation of the data shall be done. By default border value continuation is done.

interpolation InterpolationMethod

The interpolation method to be used.

DataArray1D(ComplexField1DArray, MeasuredQuantity[], string[], double, double, MeasuredQuantity, string, ExtrapolationInfo, InterpolationMethod)

Constructor for equidistant data.

public DataArray1D(ComplexField1DArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, double samplingDistance, double coordinateOfFirstDataPoint, MeasuredQuantity measuredQuantityOfCoordinates, string commentOfCoordinates, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolation = InterpolationMethod.Nearest)

Parameters

data ComplexField1DArray

The data in C^N. Each single 1D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).

measuredQuantitiesOfData MeasuredQuantity[]

Measured quantities of each data subset.

commentsOfData string[]

Comments for each data subset.

samplingDistance double

Sampling distance for (and only for) equidistantly sampled data.

coordinateOfFirstDataPoint double

Coordinate of the first data point Data[0] for (and only for) equidistantly sampled data.

measuredQuantityOfCoordinates MeasuredQuantity

Measured quantity for the coordinates

commentOfCoordinates string

Comment for the coordinates

extrapolation ExtrapolationInfo

Optional information about how extrapolation of the data shall be done. By default border value continuation is done.

interpolation InterpolationMethod

The interpolation method to be used.

Exceptions

ArgumentException

Empty data. or Sampling Distance has to be greater than zero.

DataArray1D(ComplexField1DArray, MeasuredQuantity[], string[], CFieldDerivative1DReal, MeasuredQuantity, string, double, ExtrapolationInfo, InterpolationMethodForNonequidistantData)

Constructor for non-equidistant data.

public DataArray1D(ComplexField1DArray data, MeasuredQuantity[] measuredQuantitiesOfData, string[] commentsOfData, CFieldDerivative1DReal coordinates, MeasuredQuantity measuredQuantityOfCoordinates, string commentOfCoordinates, double coordinateOfLastIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolation = InterpolationMethodForNonequidistantData.ConstantInterval)

Parameters

data ComplexField1DArray

The data in C^N. Each single 1D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).

measuredQuantitiesOfData MeasuredQuantity[]

Measured quantities of each data subset.

commentsOfData string[]

Comments for each data subset.

coordinates CFieldDerivative1DReal

Non-equidistant coordinates for the data in R^1.

measuredQuantityOfCoordinates MeasuredQuantity

Measured quantity for the coordinates

commentOfCoordinates string

Comment for the coordinates

coordinateOfLastIntervalsUpperLimit double

Coordinate of the last interval's upper limit.

extrapolation ExtrapolationInfo

Optional information about how extrapolation of the data shall be done. By default border value continuation is done.

interpolation InterpolationMethodForNonequidistantData

The interpolation method to be used.

DataArray1D(ComplexField1DArray, PhysicalProperty[], string[], double, double, PhysicalProperty, string, ExtrapolationInfo, InterpolationMethod)

Constructor for equidistant data

public DataArray1D(ComplexField1DArray data, PhysicalProperty[] physicalPropertiesOfData, string[] commentsOfData, double samplingDistance, double coordinateOfFirstDataPoint, PhysicalProperty physicalPropertyOfCoordinates, string commentOfCoordinates, ExtrapolationInfo extrapolation = null, InterpolationMethod interpolation = InterpolationMethod.Nearest)

Parameters

data ComplexField1DArray

The data in C^N. Each single 1D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).

physicalPropertiesOfData PhysicalProperty[]

Physical properties of each data subset.

commentsOfData string[]

Comments for each data subset.

samplingDistance double

Sampling distance for (and only for) equidistantly sampled data.

coordinateOfFirstDataPoint double

Coordinate of the first data point Data[0] for (and only for) equidistantly sampled data.

physicalPropertyOfCoordinates PhysicalProperty

Physical property for the coordinates

commentOfCoordinates string

Comment for the coordinates

extrapolation ExtrapolationInfo

Optional information about how extrapolation of the data shall be done. By default border value continuation is done.

interpolation InterpolationMethod

The interpolation method to be used.

Exceptions

ArgumentException

Empty data. or Sampling Distance has to be greater than zero.

DataArray1D(ComplexField1DArray, PhysicalProperty[], string[], CFieldDerivative1DReal, PhysicalProperty, string, double, ExtrapolationInfo, InterpolationMethodForNonequidistantData)

Constructor for non-equidistant data.

public DataArray1D(ComplexField1DArray data, PhysicalProperty[] physicalPropertiesOfData, string[] commentsOfData, CFieldDerivative1DReal coordinates, PhysicalProperty physicalPropertyOfCoordinates, string commentOfCoordinates, double coordinateOfLastIntervalsUpperLimit, ExtrapolationInfo extrapolation = null, InterpolationMethodForNonequidistantData interpolation = InterpolationMethodForNonequidistantData.ConstantInterval)

Parameters

data ComplexField1DArray

The data in C^N. Each single 1D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).

physicalPropertiesOfData PhysicalProperty[]

Physical properties of each data subset.

commentsOfData string[]

Comments for each data subset.

coordinates CFieldDerivative1DReal

Non-equidistant coordinates for the data in R^1.

physicalPropertyOfCoordinates PhysicalProperty

Physical property for the coordinates

commentOfCoordinates string

Comment for the coordinates

coordinateOfLastIntervalsUpperLimit double

Coordinate of the last interval's upper limit.

extrapolation ExtrapolationInfo

Optional information about how extrapolation of the data shall be done. By default border value continuation is done.

interpolation InterpolationMethodForNonequidistantData

The interpolation method to be used.

DataArray1D(DataArray1D)

Copy constructor.

public DataArray1D(DataArray1D dataArray)

Parameters

dataArray DataArray1D

Data array to copy

Fields

_measuredQuantityOfCoordinates

protected MeasuredQuantity _measuredQuantityOfCoordinates

Field Value

MeasuredQuantity

Properties

BiggestCoordinateStep

Gets the biggest occurring distance between two neighbored coordinates. (So in the equidistant case, this is identical to SamplingDistance.)

public double BiggestCoordinateStep { get; }

Property Value

double

CommentOfCoordinates

Gets and sets the comment for the coordinates.

public virtual string CommentOfCoordinates { get; set; }

Property Value

string

CommentsOfDataEntries

Gets and sets the comments for each data subset.

public override string[] CommentsOfDataEntries { get; set; }

Property Value

string[]

CoordinateOfFirstDataPoint

Gets and sets the coordinate of the first data point.

public virtual double CoordinateOfFirstDataPoint { get; set; }

Property Value

double

CoordinateOfLastDataPoint

Gets the coordinate of the last data point.

public double CoordinateOfLastDataPoint { get; }

Property Value

double

CoordinateOfLastIntervalsUpperLimit

Gets and sets the coordinate of the last interval's upper limit. This is needed if non equidistantly sampled data shall be interpolated with the method 'ConstantInterval'. For this method the data are assumed to be constant in each interval which is given by [coordinate(i), coordinate(i+1)[, where i is the data point index. So the width of the last interval has to be defined separately by [coordinate(NoOfDataPoints-1), CoordinateOfLastIntervalsUpperLimit[.

public double CoordinateOfLastIntervalsUpperLimit { get; set; }

Property Value

double

Data

Gets and sets the data in C^N. Each single 1D ComplexField in this array holds one data subset, i.e. the complete set of data for one data dimension \(i\) (\(1 \leq i \leq N\)).

public ComplexField1DArray Data { get; set; }

Property Value

ComplexField1DArray

DataArrayType

Gets the data array type of the current data array.

public override DataArrayType DataArrayType { get; }

Property Value

DataArrayType

DimensionalityOfCoordinates

Dimensionality M of the space of independent variables R^M, which is always 1 for DataArray1D.

public override int DimensionalityOfCoordinates { get; }

Property Value

int

DimensionalityOfData

Dimensionality of the space of data values C^N, i.e. the number of subsets N.

public override int DimensionalityOfData { get; }

Property Value

int

ExtrapolationHandling

The extrapolation handling.

public override ExtrapolationInfo ExtrapolationHandling { get; set; }

Property Value

ExtrapolationInfo

InterpolationMethodForEquidistantSampling

Gets and sets the method used for interpolation in case of equidistant sampling.

public virtual InterpolationMethod InterpolationMethodForEquidistantSampling { get; set; }

Property Value

InterpolationMethod

InterpolationMethodForNonequidistantSampling

Gets and sets the method used for interpolation in case of non-equidistant sampling. For the method 'ConstantInterval' the data are assumed to be constant in each interval which is given by [coordinate(i), coordinate(i+1)[, where i is the data point index. So the width of the last interval has to be defined separately by [coordinate(NoOfDataPoints-1), CoordinateOfLastIntervalsUpperLimit[.

public InterpolationMethodForNonequidistantData InterpolationMethodForNonequidistantSampling { get; set; }

Property Value

InterpolationMethodForNonequidistantData

IsComplex

Are the values defined in C^N (true) or in the subset of real numbers R^N (false)? Returns true if any of the data entries is complex.

public override bool IsComplex { get; }

Property Value

bool

IsEquidistant

Gets and sets whether the data are sampled equidistantly.

public virtual bool IsEquidistant { get; set; }

Property Value

bool

MeasuredQuantityOfCoordinates

Gets and sets the measured quantity of the coordinates.

public virtual MeasuredQuantity MeasuredQuantityOfCoordinates { get; set; }

Property Value

MeasuredQuantity

NoOfDataPoints

Gets the number of data values stored.

public int NoOfDataPoints { get; }

Property Value

int

NoSmoothingInterpolationMethod

Gets a flag indicating whether or not the interpolation method isn't smoothing (like nearest neighbor or constant interval; true) or if it does (like all other methods; false).

public override bool NoSmoothingInterpolationMethod { get; }

Property Value

bool

NonequidistantCoordinates

Get and set the coordinates for the data in R^1. IMPORTANT: This property applies for non equidistant data only! If you need to get the coordinate for one index for equidistant as well as for non equidistant data, use the method CoordinateOfDataPointIndex(long index) instead! For setting pay attention to the following restrictions: value must not be complex and value.SamplingPointsOneD has to be equal to NoOfDataPoints.

public CFieldDerivative1DReal NonequidistantCoordinates { get; set; }

Property Value

CFieldDerivative1DReal

PhysicalPropertyOfCoordinates

Gets the physical property for the coordinates.

public PhysicalProperty PhysicalPropertyOfCoordinates { get; set; }

Property Value

PhysicalProperty

SamplingDistance

Gets and sets the sampling distance for (and only for) equidistantly sampled data.

public virtual double SamplingDistance { get; set; }

Property Value

double

SmallestCoordinateStep

Gets the smallest occurring distance between two neighbored coordinates. (So in the equidistant case, this is identical to SamplingDistance.)

public double SmallestCoordinateStep { get; }

Property Value

double

SuffixForPhysicalMeaning

Property which gives the suffix which is used in FormPhysicalObjectBase.SetTypeOfPhysicalObject.

public override string SuffixForPhysicalMeaning { get; }

Property Value

string

Methods

AppendDataArray1D(DataArray1D, bool)

Appends a given data array to this.

public void AppendDataArray1D(DataArray1D arrayToAppend, bool coordinateOfLastIntervalsUpperLimitDeterminesPosition)

Parameters

arrayToAppend DataArray1D

Array to append to this one.

coordinateOfLastIntervalsUpperLimitDeterminesPosition bool

Shall this.CoordinateOfLastIntervalsUpperLimit determine the position of the appended data array?

Clone()

Deep copy

public override object Clone()

Returns

object

Copy of data array.

CoordinateOfDataPointIndex(long)

Gives the coordinate of a certain data point as double.

public double CoordinateOfDataPointIndex(long index)

Parameters

index long

Index of the data point to get the coordinate for.

Returns

double

Coordinate of the data point as double

CoordinateOfDataPointIndex_asPValue(long)

Gives the coordinate of a certain data point as PhysicalValue.

public PhysicalValue CoordinateOfDataPointIndex_asPValue(long index)

Parameters

index long

Index of the data point to get the coordinate for.

Returns

PhysicalValue

Coordinate of the data point as PhysicalValue

CreateDataArray1D_fromComplexArray(Complex[,], bool, bool, MeasuredQuantity[], string[], MeasuredQuantity, string, ExtrapolationInfo, ref (double samplingDistance, double startCoordinate, InterpolationMethod interpolation)?, (double coordOfLastIntUpperLimit, InterpolationMethodForNonequidistantData nonEquidistantInterpolation)?)

Method which converts complex data (double precision, usually read from a text file) into a 1D data array.

public static DataArray1D CreateDataArray1D_fromComplexArray(Complex[,] dataMatrix, bool createRealValuedResult, bool dataInColumns, MeasuredQuantity[] quantitiesOfData, string[] commentsOfData, MeasuredQuantity quantityOfCoordinates, string commentOfCoordinates, ExtrapolationInfo extrapolation, ref (double samplingDistance, double startCoordinate, InterpolationMethod interpolation)? sampling_equidist, (double coordOfLastIntUpperLimit, InterpolationMethodForNonequidistantData nonEquidistantInterpolation)? sampling_nonEquidist)

Parameters

dataMatrix Complex[,]

An array of data which holds the raw values, usually read from a text file.

createRealValuedResult bool

If true, the result will be real-valued, no matter if there are imaginary parts given or not.

dataInColumns bool

If true, the columns (first running index in dataMatrix) will be interpreted as subsets (and coordinate column if no samplingDistance given). Otherwise, the rows (second running index in dataMatrix) will be interpreted the same way.

quantitiesOfData MeasuredQuantity[]

The measured quantities to be set to the subsets which are read from the file.

commentsOfData string[]

The comments to be set to the subsets which are read from the file.

quantityOfCoordinates MeasuredQuantity

The measured quantity to be set to the coordinates.

commentOfCoordinates string

The comment to be set to the coordinates.

extrapolation ExtrapolationInfo

The extrapolation info.

sampling_equidist (double samplingDistance, double startCoordinate, InterpolationMethod interpolation)?

If not null, an equidistantly sampled data array will be created with the given sampling distance and start coordinate. If null, a non-equidistantly sampled data array will be created. The coordinates will be read from first row or column (depending on dataInColumns parameter), then.

sampling_nonEquidist (double coordOfLastIntUpperLimit, InterpolationMethodForNonequidistantData nonEquidistantInterpolation)?

In case no sampling_equidist parameter is given, this parameter is needed for specific settings of a non-equidistant data array.

Returns

DataArray1D

A 1D data array, created from an array of double values.

EmbedExtract(int)

Method to embed or extract a given data point range from this.

public DataArray1D EmbedExtract(int numberOfDataPoints)

Parameters

numberOfDataPoints int

The number of the data points to be used for the embed/extract operation. If it is greater than NoOfDataPoints, the data array will be embedded, otherwise the given number of data points will be extracted.

Returns

DataArray1D

The modified Data Array

Exceptions

ArgumentException

Embed Extract is only available for equidistant data arrays. or The extraction size has to be larger than zero.

EmbedExtract(int, int)

Method to embed or extract a given data point range from this.

public DataArray1D EmbedExtract(int startPoint, int extractSize)

Parameters

startPoint int

Data point index to start the extraction with (zero based!).

extractSize int

Number of data point to be extracted.

Returns

DataArray1D

A data array with the extracted data.

Exceptions

Exception

Embed Extract is only available for equidistant data arrays.

ArgumentException

Embed Extract is only available for equidistant data arrays. or The extraction size has to be larger than zero.

Equals(object?, EqualityIntent)

Checks whether two DataArray1D objects are equal.

public override bool Equals(object? obj, EqualityIntent equalityIntent)

Parameters

obj 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.

EquidistantToNonEquidistant(bool)

If this data array is equidistant, this conversion method makes it non-equidistant. This is done by calculating the member NonequidistantCoordinates from CoordinateOfFirstDataPoint, SamplingDistance and the respective index.

public virtual void EquidistantToNonEquidistant(bool forNN_convertCenterCoordinateInsteadOfIntervalBorder)

Parameters

forNN_convertCenterCoordinateInsteadOfIntervalBorder bool

In case an equidistant data array is given, it is to be converted into a non-equidistant one. This will take the interpolation method into account, which means that for Nearest-Neighbor interpolation the interval boundaries are converted instead of the original coordinates. This flag will prevent this if set to true and will ensure that the original coordinates are converted. This is usually needed for subsequent coordinate transformations only.

GetArraySize()

Method which calculates the array size. Definition: "Coordinate Extent" is the range within which interpolation is possible. It may be different from "Array Size" which is the distance between first and last data point.

public double GetArraySize()

Returns

double

The array size, i.e. the distance between last and first coordinate.

GetCoordinateExtent()

Method which calculates the coordinate extent. Definition: "Coordinate Extent" is the range within which interpolation is possible. It may be different from "Array Size" which is the distance between first and last data point.

public double GetCoordinateExtent()

Returns

double

The Coordinate Extent which is the range within which interpolation is possible.

GetCoordinateRange(bool)

Gets the whole range of coordinates, either coordinate extent or array size. Definition: "Coordinate Extent" is the range within which interpolation is possible. It is different from "Array Size" which is the range between first and last data point.

public PhysicalValueRange GetCoordinateRange(bool extentInsteadOfArraySize)

Parameters

extentInsteadOfArraySize bool

If set, the method returns the coordinate extent instead of the array size.

Returns

PhysicalValueRange

The coordinate range.

GetDataForSubset(int)

Gets the data for the given subset index.

public override ComplexField GetDataForSubset(int subsetIndex)

Parameters

subsetIndex int

The index of the subset.

Returns

ComplexField

The ComplexField with the data for the given subset.

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

HeaderInformation(int, TextExportImportSettings, FieldQuantity?)

Public method to get the export header (data meaning and sampling parameters) for a specific data array.

public override string HeaderInformation(int subSetID, TextExportImportSettings exportSettings, FieldQuantity? quantityForInformation = null)

Parameters

subSetID int

The ID of the subset for which the header information shall be extracted.

exportSettings TextExportImportSettings

The text export settings (header indicator, decimal separator and so on).

quantityForInformation FieldQuantity?

Optional FieldQuantity for which the header information shall be generated.

Returns

string

The export header string for the subset within the DataArray which has the subSetID.

IndexOfDataPointAtCoordinate(double, bool, out bool)

Method to get the index of that data point which corresponds to a given coordinate.

public long IndexOfDataPointAtCoordinate(double coord, bool enforceSteppedInterpolation, out bool coordinatesOutsideGivenIndexRange)

Parameters

coord double

coordinate to get the corresponding data point's index for

enforceSteppedInterpolation bool

If true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is. Important: This flag does not affect the returned index but only the out flag which indicates whether or not the given coordinate is outside the valid coordinate range!

coordinatesOutsideGivenIndexRange bool

flag indicating whether the given coordinate lies outside the valid range (defined by the number of data points)

Returns

long

the index of that data point which corresponds to the given coordinate

IndexOfDataPointAtCoordinate(double, long, long, bool, out bool)

Method to get the index of that data point which corresponds to a given coordinate.

public long IndexOfDataPointAtCoordinate(double coord, long startIndex, long endIndex, bool enforceSteppedInterpolation, out bool coordinatesOutsideGivenIndexRange)

Parameters

coord double

coordinate to get the corresponding data point's index for

startIndex long

index to begin the search at

endIndex long

index to stop the search at

enforceSteppedInterpolation bool

If true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is. Important: This flag does not affect the returned index but only the out flag which indicates whether or not the given coordinate is outside the valid coordinate range!

coordinatesOutsideGivenIndexRange bool

flag indicating whether the given coordinate lies outside the valid range (defined by startIndex and endIndex)

Returns

long

the index of that data point which corresponds to the given coordinate

Load(string)

Loads the specified file name. Works independently from whether the document has been saved without view settings (as prior to VirtualLab 6.0) or with view settings.

public static DataArray1D Load(string fileName)

Parameters

fileName string

Name of the file.

Returns

DataArray1D

The specified document.

MultiplyFactorOnData(double)

Public method to multiply a factor onto all data subsets.

public void MultiplyFactorOnData(double factor)

Parameters

factor double

The factor which shall be used for multiplication

PointInterpolation(double, bool, long, long, out long, out bool)

Gives the interpolated complex value for a given coordinate.

public virtual Complex[] PointInterpolation(double coord, bool enforceSteppedInterpolation, long startIndex, long endIndex, out long correspondingDataPointIndex, out bool coordinateOutsideCoordinateRange)

Parameters

coord double

coordinate to interpolate the value for

enforceSteppedInterpolation bool

If true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is.

startIndex long

Start index for search

endIndex long

End index for search

correspondingDataPointIndex long

Gives the index of the corresponding data point.

coordinateOutsideCoordinateRange bool

Flag indicating whether or not the given coordinate lies outside the coordinate range of this data array.

Returns

Complex[]

interpolated complex value for the given coordinate

PointInterpolation(double, bool, out long, out bool)

Gives the interpolated complex value for a given coordinate.

public virtual Complex[] PointInterpolation(double coord, bool enforceSteppedInterpolation, out long correspondingDataPointIndex, out bool coordinateOutsideCoordinateRange)

Parameters

coord double

coordinate to interpolate the value for

enforceSteppedInterpolation bool

If true, a stepped interpolation (i.e. Nearest Neighbor or Constant Interval) will be used, no matter what the DataArrays own interpolation method is.

correspondingDataPointIndex long

Gives the index of the corresponding data point.

coordinateOutsideCoordinateRange bool

Flag indicating whether or not the given coordinate lies outside the coordinate range of this data array.

Returns

Complex[]

interpolated complex value for the given coordinate

SetDataWithPropertiesAndCommentsAtOnce(ComplexField1DArray, MeasuredQuantity[], string[], string[])

Sets the members Data, PhysicalPropertiesOfDataEntries and CommentsOfDataEntries at once to ensure consistency.

public void SetDataWithPropertiesAndCommentsAtOnce(ComplexField1DArray data, MeasuredQuantity[] properties, string[] comments, string[] dataPointLabels)

Parameters

data ComplexField1DArray

Data to set.

properties MeasuredQuantity[]

PhysicalPropertiesOfDataEntries to set.

comments string[]

CommentsOfDataEntries to set.

dataPointLabels string[]

Data point labels. May be null.

SetDataWithPropertiesAndCommentsAtOnce(ComplexField[], MeasuredQuantity[], string[])

Sets the members Data, MeasuredQuantitiesOfDataEntries and CommentsOfDataEntries at once to ensure consistency.

public override void SetDataWithPropertiesAndCommentsAtOnce(ComplexField[] data, MeasuredQuantity[] measuredQuantitiesOfDataEntries, string[] commentsOfDataEntries)

Parameters

data ComplexField[]

Data to set.

measuredQuantitiesOfDataEntries MeasuredQuantity[]

MeasuredQuantitiesOfDataEntries to set.

commentsOfDataEntries string[]

CommentsOfDataEntries to set.

ShiftCoordinates(double)

Public method to perform a shift on the coordinates of the data array.

public virtual void ShiftCoordinates(double coordinateShift)

Parameters

coordinateShift double

The value of the shift to be performed.

Operators

operator +(DataArray1D, DataArray1D)

Implements the operator + for addition of two one-dimensional data arrays.

public static DataArray1D operator +(DataArray1D dataArray1, DataArray1D dataArray2)

Parameters

dataArray1 DataArray1D

The first summand.

dataArray2 DataArray1D

The second summand.

Returns

DataArray1D

The result of the addition.

operator /(DataArray1D, DataArray1D)

Implements the operator / for division of two one-dimensional data arrays.

public static DataArray1D operator /(DataArray1D dataArray1, DataArray1D dataArray2)

Parameters

dataArray1 DataArray1D

The dividend.

dataArray2 DataArray1D

The divisor.

Returns

DataArray1D

The result of the division.

operator ==(DataArray1D, DataArray1D)

Checks whether two DataArray1D objects are equal.

public static bool operator ==(DataArray1D da1, DataArray1D da2)

Parameters

da1 DataArray1D

The first data array.

da2 DataArray1D

The second data array.

Returns

bool

True if the two data arrays represent exactly the same data.

operator !=(DataArray1D, DataArray1D)

Checks whether two DataArray1D objects are unequal.

public static bool operator !=(DataArray1D da1, DataArray1D da2)

Parameters

da1 DataArray1D

The first data array.

da2 DataArray1D

The second data array.

Returns

bool

True if the two data arrays differ in at least one property or variable.

operator *(DataArray1D, DataArray1D)

Implements the operator * for multiplication of two one-dimensional data arrays.

public static DataArray1D operator *(DataArray1D dataArray1, DataArray1D dataArray2)

Parameters

dataArray1 DataArray1D

The first factor.

dataArray2 DataArray1D

The second factor.

Returns

DataArray1D

The result of the multiplication.

operator -(DataArray1D, DataArray1D)

Implements the operator - for subtraction of two one-dimensional data arrays.

public static DataArray1D operator -(DataArray1D dataArray1, DataArray1D dataArray2)

Parameters

dataArray1 DataArray1D

The minuend.

dataArray2 DataArray1D

The subtrahend.

Returns

DataArray1D

The result of the subtraction.