Sleipnir C++ API
|
#include <sleipnir/util/Spy.hpp>
Public Member Functions | |
Spy (std::string_view filename, std::string_view title, std::string_view rowLabel, std::string_view colLabel, int rows, int cols) | |
void | Add (const Eigen::SparseMatrix< double > &mat) |
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. |
rowLabel | Row label. |
colLabel | Column label. |
rows | The sparse matrix's number of rows. |
cols | The sparse matrix's number of columns. |
Adds a matrix to the file.
mat | The matrix. |