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
samplingPointsintNumber 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
samplingPointsintNumber of values.
valuedoubleReal number with which the field is to be initialized.
CFieldDerivative1DReal(CFieldDerivative1DReal)
Copy constructor.
public CFieldDerivative1DReal(CFieldDerivative1DReal cfd)
Parameters
cfdCFieldDerivative1DRealField to copy.
CFieldDerivative1DReal(ComplexField)
Constructor that uses an object of type ComplexField.
public CFieldDerivative1DReal(ComplexField cf)
Parameters
cfComplexFieldComplexField 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
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
xlongIndex for x-coordinate
Property Value
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
xlongIndex 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
valuedoublevalue to search the nearest neighbor for
otherIndexlongIf 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
valuedoubleValue 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
valuedoubleValue to search for.
startIndexlongStart index of search range.
endIndexlongEnd index of search range.
Returns
- long
The nearest smaller index.