Table of Contents

Class CFieldDerivative1DReal

Namespace
VirtualLabAPI.Core.Numerics
Assembly
VirtualLabAPI.dll

Class derived from ComplexField, designed especially for one-dimensional, real valued data.

[Serializable]
public class CFieldDerivative1DReal : ComplexFieldDerivative1D, ILargeArray<Complex>, ICloneable, IDisposable
Inheritance
CFieldDerivative1DReal
Implements
Inherited Members

Constructors

CFieldDerivative1DReal(int)

Creates a CFieldDerivative1DReal with the given number of sampling points.

public CFieldDerivative1DReal(int samplingPoints)

Parameters

samplingPoints int

Number of points.

CFieldDerivative1DReal(int, double)

Creates a CFieldDerivative1DReal with the given number of sampling points. The field will be filled with a given constant value.

public CFieldDerivative1DReal(int samplingPoints, double value)

Parameters

samplingPoints int

Number of values.

value double

Real number with which the field is to be initialized.

CFieldDerivative1DReal(CFieldDerivative1DReal)

Copy constructor.

public CFieldDerivative1DReal(CFieldDerivative1DReal cfd)

Parameters

cfd CFieldDerivative1DReal

Field to copy.

CFieldDerivative1DReal(ComplexField)

Constructor that uses an object of type ComplexField.

public CFieldDerivative1DReal(ComplexField cf)

Parameters

cf ComplexField

ComplexField to be converted.

Properties

IsComplex

Overrides a property in base class ComplexField. This will return always false for objects of type CFieldDerivative1DReal.

public override bool IsComplex { get; set; }

Property Value

bool

this[long]

Indexer to access values of a CFieldDerivative1DReal. Property performs a range checking before every access. If you try to read a value and index is out of range 0 is returned. If you try to set a value and index is out of range nothing will happen.

public double this[long x] { get; set; }

Parameters

x long

Index for x-coordinate

Property Value

double

Methods

Clone()

Clones this CFieldDerivative1DReal.

public override object Clone()

Returns

object

A deep copy of this field.

GetCenterOfRightInterval(long)

Gets the linearly interpolated center between value x and value x+1.

public double GetCenterOfRightInterval(long x)

Parameters

x long

Index of the data point to get the center of the nearest interval at th right.

Returns

double

Linearly interpolated center between value x and value x+1.

GetNearestNeighborIndex(double, out long)

Gets the index of the nearest neighbor to a given value.

public long GetNearestNeighborIndex(double value, out long otherIndex)

Parameters

value double

value to search the nearest neighbor for

otherIndex long

If the value lies on the boundary between two adjacent coordinates, this is the other index candidate. (The method's return value is the lower index, the out value is the higher index.) This is usually needed only for snapping of ranges or rectangles.

Returns

long

The nearest neighbor to value.

GetNearestSmallerIndex(double)

Searches for the nearest smaller index (to a given value) via interval bisection.

public long GetNearestSmallerIndex(double value)

Parameters

value double

Value to search for.

Returns

long

The nearest smaller index.

GetNearestSmallerIndex(double, long, long)

Searches for the nearest smaller index (to a given value) via interval bisection.

public long GetNearestSmallerIndex(double value, long startIndex, long endIndex)

Parameters

value double

Value to search for.

startIndex long

Start index of search range.

endIndex long

End index of search range.

Returns

long

The nearest smaller index.