| MF_Pelement
| MD_Pelement |
ME_Pelement |
| MCF_Pelement |
MCD_Pelement |
MCE_Pelement |
|
| Function | get pointer to a matrix element |
|
| Syntax C/C++ | #include <MFstd.h>
float * MF_Pelement( fMatrix X, unsigned ht, unsigned len, unsigned m, unsigned n ); |
| C++ MatObj | #include <OptiVec.h>
T * matrix<T>::Pelement( const unsigned m, const unsigned n ); |
| Pascal/Delphi | uses MFstd;
function MF_Pelement( MA:fMatrix; ht, len, m, n:UInt ): PSingle; |
|
| Description | A pointer to the element MAm,n is returned.
This function is needed to access elements of dynamically allocated matrices, for which older versions of Borland C++ had a pointer arithmetics bug, and Pascal/Delphi - unlike C - does not provide an own mechanism at all. Writing a matrix element through this function, use the dereferenced-pointer syntax: |
| C/C++ | *MF_Pelement( MA, ht, len, m, n ) = 3.5; |
| Pascal/Delphi | MF_Pelement( MA, ht, len, m, n )^ := 3.5;
Read-only access to matrix elements is provided by the related function, MF_element |
|
| Return value | pointer to the matrix element MAm,n |
|
|