Unit
AbstractMtxVec
Hierarchy
TMtxVec
Direct subclasses
TDenseMtxVec, TSparseMtx
This is the basic vector/matrix object. It handles memory allocation and basic vector arithmetics.
It works with memory obtained directly from the operating system. The object bypasses the default Delphi memory manager and frees it from the load for which it is not very well suited. Memory allocation is cached via an "object cache" mechanism.
NET specifics:
Under .NET TMtxVec allocates unmanaged memory. This removes the need to copy or pin down the memory when it is passed to unmanaged code. Since TMtxVec allocates unmanaged resource (memory) the garbage collector can not be efficient in automatically freeing the object once it is no longer needed. Therefore, all descendants from TMtxVec must be explicitly freed once they are no longer needed. If the object is not freed explicitly a memory leak will not occur, but the system could be using much more memory than actually needed. This in turn could result in slow, sluggish performance and heavy disk swapping.
Error checking
All methods and properties of TMtxVec descendants are explicitly "range checked". Range checking ensures that the user can not read or write values past the size of the allocated memory. Once the code is compiled without assertations, range checking is disabled and higher performance can be achieved in some cases. Every effort has been made to prevent the user of the library to make an error that would result in memory overwrite. (Writing or reading to parts of the memory which were not allocated before and thus overwriting data of another part of the application.)
| Name | Summary |
|---|---|
| BlockEnd | Returns true, if the currrent subrange of the vector was also the last subrange in the vector. |
| Caption | Caption. |
| Complex | Defines if object values are complex. |
| ConditionCheck | Enables/disable inline condition checking. |
| CValues | Allows setting/getting the complex value at position Indx. |
| CValues1D | Access elements of the vector or matrix. |
| Dirty | True after object property changes. |
| IsInteger | Defines if all vector values are integers. |
| IsSubRange | Set to true after the SetSubIndex or SetSubRange call. |
| IValues | Allows setting/getting the integer value at position Indx. |
| Length | Defines the length in number of samples. |
| Precision | Defines the precision used by streaming routines. |
| Rounding | Defines the rounding used by streaming routines. |
| Tag | Stores an integer value as part of a TMtxVec object. |
| Values | Allows setting/getting the real value at position Indx. |
| Values1D | Access elements of the vector or matrix. |
| ZeroTolerance | The tolerance used by IsEqual. |
| Name | Summary |
|---|---|
| Abs | Absolute values. |
| ArcCos | The inverse cosine. |
| ArcCosh | Inverse hyperbolic cosine. |
| ArcCot | Inverse cotangens. |
| ArcCoth | Inverse hyperbolic cotangens. |
| ArcCsc | Inverse cosecant. |
| ArcCsch | Inverse hyperbolic cosecant. |
| ArcSec | Inverse secant. |
| ArcSech | Inverse hyperbolic secant. |
| ArcSin | The inverse sine. |
| ArcSinh | Inverse hyperbolic sine. |
| ArcTan | Inverse tangens. |
| ArcTan2 | Inverse tangens of Y/X. |
| ArcTanh | Inverse hyperbolic tangens. |
| BlockInit | Initializes block processing. |
| BlockNext | Obtains the next subrange of the data. |
| CartToPolar | Converts elements from cartesian to polar coordinate form. |
| Cbrt | The cube root. |
| Ceil | Rounds all Src object elements towards positive infinity and stores the result in the calling object. |
| Clear | Sets vector size to zero. |
| 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 | Conjugate. |
| Copy | Copy object values. |
| CopyBinaryFromArray | |
| CopyFromArray | Copies values from an array. |
| CopyToArray | Copies the calling object data to an array of single precision floating point data. |
| Cos | Cosine. |
| Cosh | Hyperbolic cosine. |
| Cot | Cotangens. |
| Coth | Hyperbolic cotangens. |
| CplxToReal | Split complex calling object in real and imaginary part. |
| Csc | Cosecant. |
| Csch | Hyperbolic cosecant. |
| DisableSelect | Prevents calls to Select. |
| DisableSubrange | Prevents calls to SetSubRange. |
| EnableSelect | Enables calls to Select. |
| EnableSubrange | Enables calls to SetSubRange. |
| Erf | Error functon of values. |
| Erfc | Complementary error functon of values. |
| ErfInv | Inverse error functon of values. |
| Exp | Exponent (e^). |
| Exp10 | Exponent base 10 (10^). |
| Exp2 | Exponent base 2 (2^). |
| Expj | A complex exponential e^(j*W). |
| ExtendToComplex | Extends a real object to a complex object. |
| Find | Finds a match for X in object values. |
| First | First element in object Values array. |
| Firstc | First element in object CValues array. |
| FixAngle | Sets angle in [-2p,2p]. |
| Flip | Flips the real and imaginary part of complex numbers. |
| FlipConj | Flips the real and imaginary part of complex numbers and conjugates the complex numbers. |
| FloatToInt | Converts object values from float to integer. |
| Floor | Rounds all Src object elements towards negative infinity and stores the result in the calling object. |
| Frac | Fractional part of values. |
| FreeToCache | Frees the object. |
| GetBlockEnd | |
| GetObjectToByteArray | |
| ImagPart | Gets the imaginary part of a complex object. |
| IntPower | Power (integer exponent). |
| IntToFloat | Converts object values from integer to float. |
| Inv | Inverse elements. |
| InvCbrt | The inverse of cube root 1/(v)^1/3. |
| InvSqrt | The inverse of square root 1/(v)^1/2. |
| IsEqual | Compares two objects and returns True, if they are equal. |
| Last | Last element in object Values array. |
| Lastc | Last complex element in object CValues array. |
| Ln | Natural logarithm. |
| LoadFromFile | Reads the header information and the values array content from the file. |
| LoadFromStream | Reads the header information and the values array content from a stream. |
| Log10 | Log base 10. |
| Log2 | Log base 2. |
| LogN | Log base N. |
| Mag | Magnitude. |
| Mul | Multiply object elements with Value. |
| MulI | Multiply elements by imaginary unit. |
| Normalize | Normalize object. |
| PCValues1D | Obtaines a pointer to the complex value of the vector at Index. |
| PhaseSpectrum | The phase angles (spectrum) of object elements. |
| PIValues1D | Obtaines a pointer to the real value of the vector at Index. |
| PolarToCart | Converts the polar magnitude/phase pairs to cartesian pairs. |
| Power | Raises base object elements to any power. |
| PowerSpectrum | The power spectrum from object complex values. |
| PowerVec | Raises Base object elements to Exponent object elements power. |
| Product | Elements product. |
| Productc | Elements product. |
| PValues1D | Obtaines a pointer to the real value of the vector at Index. |
| RandGauss | The pseudo random sample generator with Gaussian distribution. |
| RandUniform | The pseudo random sample generator with continuous uniform distribution. |
| ReadHeader | Reads the header information from a stream to object. |
| ReadValues | Read values content from stream to object. |
| RealPart | Gets real part of complex object values. |
| RealToCplx | Constructs a complex object from two real objects. |
| Rem | The Reminder after division X/Y. |
| Replace | Search and replace a value. |
| Reset | Resets object properties to default values. |
| RMS | Root mean square (RMS). |
| Round | Elements rounded to the nearest whole number. |
| SaveToFile | Write object header and values to a file. |
| SaveToStream | Writes the header information and the Values content to a stream. |
| Scale | Multiply object elements with Value. |
| Scatter | Scatter object elements. |
| ScatterByIncr | |
| ScatterByIndexes | |
| ScatterByMask | |
| Sec | Secant. |
| Sech | Hyperbolic secant. |
| Select | Selects a set of elements from the vector. |
| SelectAll | Resets any defined selection. |
| setCacheIndex | |
| setCaption | |
| setComplex | |
| setConditionCheck | |
| SetCplx | Sets object complex values. |
| setDirty | |
| SetDouble | Sets object values (double). |
| SetFullRange | Resets any defined subrange. |
| SetInteger | Sets object values (integer). |
| setIsInteger | |
| SetIt | Sets object values. |
| SetObjectFromByteArray | |
| setOnSetSize | |
| setPrecision | |
| setRounding | |
| SetSingle | Sets object values (single). |
| SetSubIndex | Defines a subarray. |
| SetSubRange | Defines a sub vector/matrix. |
| setTag | |
| SetVal | Initialize elements to Value. |
| SetZero | Initializes object elements to zero. |
| setZeroTolerance | |
| Sgn | |
| SgnMul | Signum. |
| Sign | Changes elements sign. |
| Sin | Sine. |
| SinCos | Sine and cosine. |
| Sinh | Hyperbolic sine. |
| SinhCosh | Hyperbolic sine and cosine. |
| Size | Size the object. |
| SizeToArray | Sizes the array. |
| Sqr | Square. |
| Sqrt | Square toot. |
| StdDev | Standard deviation. |
| Sum | Sums vector values. |
| Sumc | Sum (complex value). |
| Tan | Tangens. |
| Tanh | Hyperbolic tangens. |
| ThreshBottom | Threshold bottom operation. |
| ThresholdGT | Perform "greater than" threshold operation for complex numbers on all Vec object values and store the results in calling object. |
| ThresholdGT_LT | Threshold greater than and less than operation. |
| ThresholdLT | Threshold less than operation. |
| ThreshTop | Threshold top operation. |
| Trunc | Rounds a real number towards zero. |
| TruncAndFrac | Rounds a real number towards zero and returns the fractional part. |
| WriteHeader | Writes the header information for the calling vector to a stream. |
| WriteValues | Writes object Values content to a stream. |
| Name | Summary |
|---|---|
| OnSetSize | Called when object size changes. |
| Copyright 2008 Dew Research |