![]() |
WPILibC++ 2027.0.0-alpha-3
|
Writes the sparsity pattern of a sparse matrix to a file. More...
Public Member Functions | |
| Spy (std::string_view filename, std::string_view title, std::string_view row_label, std::string_view col_label, int rows, int cols) | |
| Constructs a Spy instance. | |
| void | add (const Eigen::SparseMatrix< double > &mat) |
| Adds a matrix to the file. | |
Writes the sparsity pattern of a sparse matrix to a file.
Each file represents the sparsity pattern of one matrix over time. spy.py can display it as an animation.
The file starts with the following header:
Then, each sparsity pattern starts with:
followed by that many coordinates in the following format:
| [out] | file | A file stream. |
| [in] | mat | The sparse matrix. |
|
inline |
Constructs a Spy instance.
| filename | The filename. |
| title | Plot title. |
| row_label | Row label. |
| col_label | Column label. |
| rows | The sparse matrix's number of rows. |
| cols | The sparse matrix's number of columns. |
|
inline |
Adds a matrix to the file.
| mat | The matrix. |