Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
format_utils.h File Reference

Various matrix utility functions. More...

Go to the source code of this file.


template<typename OffsetArray , typename IndexArray >
void cusp::offsets_to_indices (const OffsetArray &offsets, IndexArray &indices)
 Expand CSR row offsets to COO row indices. More...
template<typename IndexArray , typename OffsetArray >
void cusp::indices_to_offsets (const IndexArray &indices, OffsetArray &offsets)
 Compress COO row indices to CSR row offsets. More...
template<typename MatrixType , typename ArrayType >
void cusp::extract_diagonal (const MatrixType &A, ArrayType &output)
 Extract the main diagonal of a matrix. More...
template<typename ArrayType1 , typename ArrayType2 >
size_t cusp::count_diagonals (const size_t num_rows, const size_t num_cols, const ArrayType1 &row_indices, const ArrayType2 &column_indices)
 Count the number of occupied diagonals in the input matrix. More...
template<typename ArrayType >
size_t cusp::compute_max_entries_per_row (const ArrayType &row_offsets)
 Compute the maximum row length of a matrix. More...
template<typename ArrayType >
size_t cusp::compute_optimal_entries_per_row (const ArrayType &row_offsets, float relative_speed=3.0f, size_t breakeven_threshold=4096)
 Compute the optimal number of entries per row of HYB matrix. More...

Detailed Description

Various matrix utility functions.

Definition in file format_utils.h.