|
Janus 2.0.0
High-performance C++20 dual-mode numerical framework
|
Wrapper around a CasADi graph coloring assignment. More...
#include <Sparsity.hpp>
Public Member Functions | |
| GraphColoring ()=default | |
| Default-construct an empty coloring. | |
| GraphColoring (const casadi::Sparsity &coloring) | |
| Construct from a CasADi coloring sparsity. | |
| int | n_entries () const |
| Number of original entries being colored. | |
| int | n_colors () const |
| Number of compressed seed directions (colors). | |
| double | compression_ratio () const |
| Compression factor relative to one direction per entry. | |
| std::vector< int > | colorvec () const |
| 0-based color assignment for each original entry | |
| const SparsityPattern & | pattern () const |
| Access the sparse assignment matrix behind the coloring. | |
Wrapper around a CasADi graph coloring assignment.
CasADi encodes a coloring as a sparse matrix with one nonzero per colored entry. Rows correspond to original derivative entries and columns correspond to compressed seed directions.
|
default |
Default-construct an empty coloring.
|
inlineexplicit |
Construct from a CasADi coloring sparsity.
| coloring | Sparse assignment matrix from CasADi |
|
inline |
0-based color assignment for each original entry
|
inline |
Compression factor relative to one direction per entry.
|
inline |
Number of compressed seed directions (colors).
|
inline |
Number of original entries being colored.
|
inline |
Access the sparse assignment matrix behind the coloring.