void RandomSparse(TVec *X, TVec *Y, bool Symmetric = false, double FillInPercent = 33, int MaxNonZeroCount = 10000000);
Creates quadratic non-complex non-singular sparse matrix.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TVec * | |
| 2 | Y | TVec * | |
| 3 | Symmetric = false | bool | |
| 4 | FillInPercent = 33 | double | |
| 5 | MaxNonZeroCount = 10000000 | int |
Remarks:
Creates general/symmetric quadratic non-complex non-singular sparse matrix. It returns the right hand side in vector Y and the solution in vector X. If Symmetric is true the method will generate a matrix with symmetric pattern. The FillInPercent parameter defines the percentage of non-zero in the sparse matrix. The MaxNonZeroCount parameter defines an upper limit to prevent against excessive memory usage (consequence of invalid user parameters) and consecutive system lock up.
Note:
You have to set TSparseMtx::Cols property to definethe size of the matrix before calling this routine.
Declared in Dew::Math::TSparseMtx · Dew.Math/sparse.h · Cross-compiler