public class TMtxVecReport
The report printer.
The most common way to debug an algorithm in the old days was to print the values of the variables to the screen or to the file. Today it is more common to use watches and tooltips to examine the values of variables. In some cases this two approaches do not work because of multithreading. Sometimes it is also desirable to have an algorithm return report on its convergence, like it is the case with optimization algorithms. For cases like this there is a global variable called Report declared in MtxVec.pas unit. Report is of a TMtxVecReport type and is derived from TStringStream. It has been extended with several new methods to support:
- Saving the stream to TStream or a file.
- Write the contents of TVec and TMtx objects to the stream (as text).
- Specify the text formatting of the floating point values.
Properties
| Name | Type | Description |
|---|---|---|
| Delimiter | String | Delimiter used when converting matrices to text. |
| ImFormat | String | The format specifier for the imaginary part of the complex number. |
| ReFormat | String | The format specifier for the real part of the complex number. |
Methods
| Name | Description |
|---|---|
| Clear | Clears the stream. |
| NewLine | Inserts a new line. |
| Convert the values of TVec and TMtx objects to text. | |
| PrintCplx | Convert TCplx values to text. |
| PrintCplxArray | Convert an array of TCplx values to text. |
| PrintMtx | Convert the values of TMtx objects to text. |
| PrintSample | Convert double values to text. |
| PrintSampleArray | Convert an array of double values to text. |
| PrintVec | Convert the values of TVec objects to text. |
| SaveToFile | Save the strings to a text file. |
| WriteLine | Inserts a new line. |