class TVec : public TDenseMtxVec;
One dimensional array - vector.
Encapsulates routines for vector specific operations. This include 1D FFt's, autocorrelation, cross-correlation, convolution, sorting, discrete cosine and Hilbert transform's and many other utility funcitons.
Constructors
| Name | Description |
|---|---|
| TVec (2) |
Destructors
| Name | Description |
|---|---|
| ~TVec |
Properties
| Name | Type | Description |
|---|---|---|
| ActualSize | long long | For internal use only. Read to get the amount of memory allocated in number of doubles (8byte packs). |
| BlockEnd | bool | Returns true, if the currrent subrange of the vector was also the last subrange in the vector. |
| CacheIndex | int | For internal use only. Read to get the index of this object in object cache. |
| Capacity | long long | Sizing the object will not allocate less than Capacity. |
| CapacityInBytes | long long | Sizing the object will not allocate less than CapacityInBytes. |
| CapacityInElements | long long | Sizing the object will not allocate less than CapacityInElements. |
| CapacityStep | double | Specifies increment step for the Capacity property. |
| Caption | DewString | Caption. |
| Complex | bool | Defines if object values are complex. |
| ComplexValues | DewString | |
| ConditionCheck | bool | Enables/disable inline condition checking. |
| Dirty | bool | True after object property changes. |
| FFTOddLength | bool | Defines if FFT transform length is odd. |
| FFTScrambled | bool | Leave FFT scrambeled. |
| FFTStorageFormat | TFFTStorageFormat | The FFT storage format. |
| First | double | First element in object Values array. |
| Firstc | TCplx | First element in object CValues array. |
| FloatPrecision | TMtxFloatPrecision | Defines the precision (single, float) and type (real, complex) of the floating point operations. |
| FloatPrecisionLock | bool | |
| IsDouble | bool | Defines the precision (single or double) of the floating point operations. |
| IsSubRange | bool | Set to true after the SetSubIndex or SetSubRange call. |
| Last | double | Last element in object Values array. |
| Lastc | TCplx | Last complex element in object CValues array. |
| Length | int | Defines the length in number of samples. |
| MtxVecType | TMtxVecType | |
| OnSetSize | TMtxNotifyEvent | Called when object size changes. |
| PoolIndex | int | Internal. |
| Precision | TPrecision | Defines the precision used by streaming routines. |
| RealValues | DewString | |
| Rounding | TRounding | Defines the rounding used by streaming routines. |
| Tag | int | Stores an integer value as part of a TMtxVec object. |
| ZeroTolerance | double | The tolerance used by TVec::IsEqual. |
Methods
| Name | Description |
|---|---|
| Abs (4) | Absolute values. |
| Add (18) | Adds Value to object elements. |
| AddAndMul (50) | Compute (X + Y)*Z |
| AddProduct (2) | Add a product of two vectors. |
| AddRef | |
| AddScaled (25) | Add each of Vec elements to corresponding elements in the calling object. |
| AddScaledC (8) | Compute X + Y*yScale + zScalar |
| AddScaledSqr (8) | Compute sqr(X + Y*yScale) |
| AddTensorProd | Calculates the right tensor product between vector and matrix and adds the result to the calling vector. |
| Adopt | |
| AdoptSingle | |
| ArcCos (4) | The inverse cosine. |
| ArcCosh (4) | Inverse hyperbolic cosine. |
| ArcCot (4) | Inverse cotangens. |
| ArcCoth (4) | Inverse hyperbolic cotangens. |
| ArcCsc (4) | Inverse cosecant. |
| ArcCsch (4) | Inverse hyperbolic cosecant. |
| ArcSec (4) | Inverse secant. |
| ArcSech (4) | Inverse hyperbolic secant. |
| ArcSin (4) | The inverse sine. |
| ArcSinh (4) | Inverse hyperbolic sine. |
| ArcTan (4) | Inverse tangens. |
| ArcTan2 (2) | Inverse tangens of Y/X. |
| ArcTanh (4) | Inverse hyperbolic tangens. |
| Assign | |
| AutoCorrBiased | Biased auto-correlation. |
| AutoCorrNormal | Normal auto-corellation. |
| AutoCorrUnBiased | Unbiased auto-correlation. |
| BinarySearch (8) | Finds a match for X in sorted object values using binary search. |
| BlockFinish | Deinitializes block processing before the final block is processed. |
| BlockInit (4) | Initializes block processing. |
| BlockNext | Obtains the next subrange of the data. |
| BlockSubRangeLevel | Returns the current subrange stack level used by block processing functions. |
| CartToPolar (2) | Converts elements from cartesian to polar coordinate form. |
| Cbrt (4) | The cube root. |
| CDataIndex | Returns an index pointing to element at Index for TCplx data. |
| Ceil (4) | Rounds towards positive infinity. |
| Clear | |
| Concat (2) | Concatenates an array of TVec objects. |
| CondDisable | Saves the current value of ConditionCheck property and sets it to false. |
| CondEnable | Sets the ConditionCheck property to whatever it was before the CondDisable was used. |
| Conj (4) | Conjugate. |
| ConjMul (4) | Conjugate and multiply. |
| Convolve | Single-rate finite, linear convolution of two sequences. |
| Copy (7) | Copy object values. |
| CopyFromArray (14) | Copies values from an array. |
| CopyMtx (2) | Copy values from matrix. |
| CopyTo (5) | Copy and convert values to TVecInt. |
| CopyToArray (14) | Copy values to an array. |
| CopyToComplex (2) | |
| Cos (4) | Cosine. |
| Cosh (4) | Hyperbolic cosine. |
| Cot (4) | Cotangens. |
| Coth (4) | Hyperbolic cotangens. |
| CplxToReal (2) | Split complex calling object in real and imaginary part. |
| CreateCached | |
| CreateFromCache | Obtains a pointer to a precreated object from cache. |
| CrossCorr | The cross-correlation of two vectors. |
| Csc (4) | Cosecant. |
| Csch (4) | Hyperbolic cosecant. |
| CumProduct (4) | Calculate the cumulative product for all Vec elements. |
| CumSum (4) | Cumulative sum. |
| CValues | |
| CValues1D | |
| DCT (3) | The forward discrete cosine transform (DCT). |
| DegToRad (4) | DegToRad converts degrees to radians. |
| Diag | Copies the k-th diagonal from the TMtx object. |
| Difference (3) | Difference. |
| DisableSelect | Prevents calls to TVec::Select. |
| DisableSubrange | Prevents calls to TVec::SetSubRange. |
| Disown (3) | Disowns a values pointer. |
| DivAndAdd (22) | Compute X/Y + Z |
| DivAndSub (22) | Compute X/Y - Z |
| Divide (14) | Compute X / (Y*Z) |
| DivideBy (8) | Divide Value with elements of the calling object and store the result in the calling object. |
| DivideC (4) | Compute X / (Y*zScale) |
| DivideVec (3) | Same as the TVec::Divide method. |
| DotProd (2) | Scalar product of two real arrays. |
| DotProdc (5) | Scalar product of two complex arrays. |
| DownSample (2) | Downsamples object values. |
| EnableSelect | Enables calls to TVec::Select. |
| EnableSubrange | Enables calls to TVec::SetSubRange. |
| Equal (2) | Compares vector elements and returns true if vectors are equal. |
| Erf (4) | Error functon of values. |
| Erfc (4) | Complementary error functon of values. |
| ErfcInv (4) | Calculates the inverse complementary error function for all calling object elements in-place. |
| ErfInv (4) | Inverse error functon of values. |
| Exp (4) | Exponent (e^). |
| Exp10 (4) | Exponent base 10 (10^). |
| Exp2 (4) | Exponent base 2 (2^). |
| Expj (3) | A complex exponential e^(j*Omega)). |
| ExtendToComplex (3) | Extends a real object to a complex object. |
| FFT (3) | Fast Furier Transformation (FFT) from complex to complex or from real to complex. |
| FFTFromReal (3) | The forward Fast Fourier Transformation (FFT) from real to complex. |
| Find (2) | Finds a match for X in object values. |
| FindAndGather (3) | Finds and gathers vector elements. |
| FixAngle (4) | Sets angle in [-2PI,2PI]. |
| Flip (4) | Flips the real and imaginary part of complex numbers. |
| FlipConj (4) | Flips the real and imaginary part of complex numbers and conjugates the complex numbers. |
| Floor (4) | Rounds towards negative infinity. |
| Frac (4) | Fractional part of values. |
| FreeCached | |
| FreeToCache | Releases this object back to cache. |
| Gather | Gather vector elements. |
| GatherByIncr | |
| GatherByIndex | |
| GatherByMask | |
| GatherSplit | Gather a vector, split to two vectors. |
| get_CValues | |
| get_CValues1D | |
| get_SCValues | |
| get_SCValues1D | |
| get_SValues | |
| get_SValues1D | |
| get_Values | |
| get_Values1D | |
| GetCapacity | |
| GetCapacityInElements | |
| GetCol (3) | Copies a column from matrix. |
| GetComplexValues | |
| GetObjectToByteArray | Copies object to an array of bytes. |
| GetRealValues | |
| GetRow (3) | Copies a row from matrix. |
| GroupSum | Sums items from Data with matching corresponding indexes from Bins and places result in self. |
| GroupSumIteration | Sums items from Data with matching corresponding indexes from Bins and places result in self. |
| Hilbert | The fast hilbert transform (FFT based). |
| IDCT (3) | The inverse discrete cosine transform (DCT). |
| IFFT (3) | The inverse FFT from complex to complex. |
| IFFTToReal (3) | The inverse FFT from complex to real. |
| ImagPart (2) | Gets the imaginary part of a complex object. |
| Integrate (2) | Integrate calling vector values. |
| IntPower (2) | Power (integer exponent). |
| Inv (8) | Inverse elements. |
| InvCbrt (4) | The inverse of cube root 1/(v)^1/3. |
| InvSqrt (4) | The inverse of square root 1/(v)^1/2. |
| IsComplex | |
| IsEqual (8) | Compares two objects. |
| Kron | The Kronecker product between two vectors. |
| Kurtosis (3) | The Kurtosis (fourth central momentum). |
| Ln (4) | Natural logarithm. |
| LoadFromFile | Reads the header information and the values array content from the file. |
| LoadFromStream | Save component to the .NET framework Stream. |
| Log10 (4) | Log base 10. |
| Log2 (4) | Log base 2. |
| LogN (4) | Log base N. |
| Mag (4) | Magnitude. |
| Mask (3) | Copies those values from MaskVec, at which aMask is different from 0. |
| MaskNot (3) | Copies those values from MaskVecNot, at which aMask is equal to 0. |
| Max (6) | Maximum value. |
| Maxc (3) | Maximum value. |
| MaxEvery (4) | Vectorised maximum. |
| MaxMin (4) | Maximum and minimum value in a single pass. |
| Mean (5) | Mean value. |
| MeanAndStdDev (2) | Returns the standard deviation of all calling object elements. |
| Meanc (4) | Mean value. |
| Median (2) | Median. |
| Min (6) | Minimum value. |
| Minc (3) | Minimum value. |
| MinEvery (4) | Vectorised minimum. |
| Mul (18) | Multiply object elements with Value. |
| MulAndAdd (26) | Compute X*Y + Z |
| MulAndDiv (10) | Compute X * Y / Z |
| MulAndSub (26) | Compute X*Y - Z |
| MulI (4) | Multiply elements by imaginary unit I. |
| Norm | The norm of a vector. |
| Normalize (12) | Normalize data. |
| NormC (4) | The C-norm. |
| NormL1 (4) | The L1-norm. |
| NormL2 (4) | The L2-norm. |
| Offset (4) | Add/Subtract a value. |
| Parse | Parses string content as vector. |
| PCValues1D | Obtaines a pointer to the complex value of the vector at Index. |
| PhaseSpectrum (2) | The phase angles (spectrum) of object elements. |
| PixelDownSample (2) | Downsamples (reduces) the number of vector elements. |
| PixelDownSampleHigh (2) | Downsample the vectors Y and (optionaly) X starting at position Index and for Len samples. |
| PixelDownSampleLow (2) | Downsample the vectors Y and (optionaly) X starting at position Index and for Len samples. |
| PolarToCart (2) | Converts the polar magnitude/phase pairs to cartesian pairs. |
| Power (7) | Raises base object elements to any power. |
| PowerSpectrum (2) | The power spectrum from object complex values. |
| PowerVec | Raises Base object elements to Exponent object elements power. |
| PrecisionEPS | Returns machine constant depending on value of FloatPrecision property. |
| PrecisionMaxValue | Returns maximum floating point number depending on the value of FloatPrecision property. |
| PrecisionMinValue | Minimum floating point number. |
| PrecisionSqrtEPS | Sqrt(EPS) machine constant depending on value of FloatPrecision property. |
| PrimeNumbers | Fills vector with prime numbers, starting from 2 up to the value of n. |
| Product (6) | Elements product. |
| Productc (2) | Elements product. |
| PSCValues1D | Obtaines a pointer to the complex value of the vector at Index. |
| PSValues1D | Obtains a pointer to the real value of the vector at Index. |
| PValues1D | Obtains a pointer to the real value of the vector at Index. |
| RadToDeg (4) | RadToDeg converts radians to degrees. |
| Ramp (7) | Fills the calling vector with a series following linear rule. |
| RandGauss (3) | The pseudo random sample generator with Gaussian distribution. |
| RandomShuffle | Randomly shuffles the content of the vector. |
| RandUniform (3) | The pseudo random sample generator with continuous uniform distribution. |
| Range (3) | Calculate the range from all calling object elements. |
| RangeCheck | |
| RangeCheckComplex | |
| ReadHeader | Reads the header information from a stream to object. |
| ReadValues | Read values content from stream to object. |
| RealPart (2) | Gets real part of complex object values. |
| RealToCplx (2) | Constructs a complex object from two real objects. |
| Release | |
| Rem (4) | The Reminder after division X/Y. |
| Replace (8) | Search and replace a value. |
| ReplaceNAN (2) | Replaces all NAN values with Value. |
| Reset | |
| Resize (2) | Resizes vector size while preserving values. |
| Reverse (4) | Reverse vector elements. |
| RMS (2) | Root mean square (RMS). |
| Rotate (4) | A cyclic shift on vector elements in range. |
| Round (5) | Elements rounded to the nearest whole number. |
| SaveToFile | Write object header and values to a file. |
| SaveToStream | Load the component from the .NET framework Stream. |
| Scale (4) | Multiply object elements with Value. |
| Scatter | Scatter object elements. |
| ScatterByIncr | Scatters Src elements starting at Offset and with Increment to the calling object. |
| ScatterByIndexes | Scatters Src elements defined with indices stored in Indexes to the calling object. |
| ScatterByMask | Scatters Src elements defined with the Mask to the calling object. |
| SCValues | |
| SCValues1D | |
| SDataIndex | Returns an index pointing to element at Index for double data. |
| Sec (4) | Secant. |
| Sech (4) | Hyperbolic secant. |
| Select (2) | Selects a set of elements from the vector. |
| SelectAll | Resets any defined selection. |
| set_CValues | |
| set_CValues1D | |
| set_SCValues | |
| set_SCValues1D | |
| set_SValues | |
| set_SValues1D | |
| set_Values | |
| set_Values1D | |
| SetCapacity | |
| SetCapacityInElements | |
| SetCplx (2) | Sets object complex values. |
| SetDouble (3) | Sets object values (double). |
| SetFullRange | Resets subrange defined with SetSubRange. |
| SetFullRangeLevel | Pops the current subrange stack one level up. |
| SetInteger (3) | Sets object values (integer). |
| SetIsDouble | |
| SetIt (4) | Sets object values. |
| SetLength | |
| SetObjectFromByteArray | Reads the properties of the object from the array of bytes. |
| SetSingle (3) | Sets object values (single). |
| SetSubIndex (2) | Defines a sub-vector. |
| SetSubRange (4) | Defines the calling vector to have the view of the same memory as Src. |
| SetSubRangeLevel (2) | Defines a sub vector/matrix and pushes any previous subranges on to a stack. |
| SetVal (4) | Initialize elements to Value. |
| SetZero (2) | Initializes object elements to zero. |
| Sgn (4) | Computes signum function of calling object elements. |
| SgnMul | Signum. |
| Shift (4) | Shift vector elements in range. |
| Sign (4) | Changes elements sign. |
| Sin (4) | Sine function. |
| SinCos (2) | Sine and cosine. |
| Sinh (4) | Hyperbolic sine. |
| SinhCosh (2) | Hyperbolic sine and cosine. |
| Size (8) | Size the object. |
| SizeFromArray (7) | Sets the size of the vector to match an array. |
| SizeToArray (8) | Sizes the array. |
| Skewness (3) | Skewness (third central momentum). |
| SortAscend (4) | Sorts vector elements in ascending order. |
| SortDescend (4) | Sorts vector elements in descending order. |
| Split (3) | Splits the calling vector to an array of TVec objects. |
| Sqr (4) | Square. |
| SqrAddScaled (8) | Compute sqr(X) + sqr(Y)*yScale |
| Sqrt (4) | Square root. |
| StdDev (6) | Standard deviation. |
| StringsToValues (4) | Convert strings in aList to double or TCplx. |
| StripNanAndInf (4) | Copies only those values from Src, which are not NAN or INF. |
| Sub (18) | Compute X - Y - Z |
| SubAndMul (50) | Compute (X - Y)*Z |
| SubFrom (8) | Subtraction from value. |
| SubRangeLevel | Returns the current subrange stack level. |
| SubScaled (12) | Compute X - Y*yScale - Z*zScale |
| SubScaledC (8) | Compute X - Y*yScale - zScalar |
| Sum (5) | Sums vector values. |
| Sumc (2) | Sum (complex value). |
| SumOfSquares (2) | Calculate the Sum of squares of the calling vector. |
| SValues | |
| SValues1D | |
| Tan (4) | Tangens. |
| Tanh (4) | Hyperbolic tangens. |
| TensorProd (2) | Tensor product between vector and matrix. |
| ThreshAbsGT (4) | Threshold top and bottom centered around zero. |
| ThreshAbsLT (4) | Threshold top and bottom centered around zero. |
| ThreshBottom (4) | Threshold bottom operation. |
| ThresholdGT (8) | Threshold greater than operation. |
| ThresholdGT_LT (4) | Threshold greater than and less than operation. |
| ThresholdLT (8) | Threshold less than operation. |
| ThreshTop (4) | Threshold top operation. |
| ToolTip | |
| ToString | Returns content as a string. |
| Trunc (5) | Rounds a real number towards zero. |
| TruncAndFrac (2) | Rounds a real number towards zero and returns the fractional part. |
| UpSample (2) | Inserts zeroes between consecutive array values. |
| ValidateCplxArrayIndexes | |
| ValidateParams (4) | |
| ValidateParams2 | |
| ValidateParamsPrecision (3) | |
| ValidateRealArrayIndexes | |
| Values | |
| Values1D | |
| ValuesToStrings (4) | Converts the content of the Values array of the calling vector to a list of strings. |
| ValuesToText (2) | Convert all vector elements to text. |
| WriteHeader (2) | Writes the header information for the calling vector to a stream. |
| WriteValues (2) | Writes the header information for the calling vector to a stream. |
| ZScore (2) | Transforms vector into vector of standardized data. |
Operators
| Name | Description |
|---|---|
| operator!= (6) | Returns true, if Left and Right do not have equal Length and Values. |
| operator* (4) | Multiply all elements in Left with corresponding elements in Right. |
| operator+ (4) | Add coresponding elements in Left and Right. |
| operator- (6) | Subtract coresponding elements in Right from Left. |
| operator/ (4) | Divide all elements in Left with coresponding elements in Right. |
| operator== (6) | Returns true, if Left and Right are of equal Length and Values. |
| operator[] |
Fields
| Name | Type | Description |
|---|---|---|
| Alfa | TCplx | Additional parameter for certain Lapack methods. |
| Beta | TCplx | Additional parameter for certain Lapack methods. |
| CData | DewArray<double> | |
| fRefCount | int | |
| SCData | DewArray<float> | |
| SData | DewArray<double> | |
| SSData | DewArray<float> | |
| ThreadID | long long |