Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
Classes | Functions
Sparse Matrix Views

Sparse matrix containers that wrap existing data or iterators in COO, CSR, DIA, ELL, HYB, and Permutation representations. More...

Classes

class  cusp::coo_matrix_view< ArrayType1, ArrayType2, ArrayType3, IndexType, ValueType, MemorySpace >
 View of a coo_matrix. More...
 
class  cusp::csr_matrix_view< ArrayType1, ArrayType2, ArrayType3, IndexType, ValueType, MemorySpace >
 View of a csr_matrix. More...
 
class  cusp::dia_matrix_view< ArrayType1, ArrayType2, IndexType, ValueType, MemorySpace >
 View of a dia_matrix. More...
 
class  cusp::ell_matrix_view< ArrayType1, ArrayType2, IndexType, ValueType, MemorySpace >
 View of a ell_matrix. More...
 
class  cusp::hyb_matrix_view< MatrixType1, MatrixType2, IndexType, ValueType, MemorySpace >
 View of a hyb_matrix. More...
 
class  cusp::permutation_matrix_view< ArrayType, IndexType, MemorySpace >
 View of a permutation_matrix. More...
 

Functions

template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 >
coo_matrix_view< ArrayType1,
ArrayType2, ArrayType3 > 
cusp::make_coo_matrix_view (const size_t num_rows, const size_t num_cols, const size_t num_entries, ArrayType1 row_indices, ArrayType2 column_indices, ArrayType3 values)
 
template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 , typename IndexType , typename ValueType , typename MemorySpace >
coo_matrix_view< ArrayType1,
ArrayType2, ArrayType3,
IndexType, ValueType,
MemorySpace > 
cusp::make_coo_matrix_view (const coo_matrix_view< ArrayType1, ArrayType2, ArrayType3, IndexType, ValueType, MemorySpace > &m)
 
template<typename MatrixType >
MatrixType::coo_view_type cusp::make_coo_matrix_view (MatrixType &m)
 
template<typename MatrixType >
MatrixType::const_coo_view_type cusp::make_coo_matrix_view (const MatrixType &m)
 
template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 >
csr_matrix_view< ArrayType1,
ArrayType2, ArrayType3 > 
cusp::make_csr_matrix_view (size_t num_rows, size_t num_cols, size_t num_entries, ArrayType1 row_offsets, ArrayType2 column_indices, ArrayType3 values)
 
template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 , typename IndexType , typename ValueType , typename MemorySpace >
csr_matrix_view< ArrayType1,
ArrayType2, ArrayType3,
IndexType, ValueType,
MemorySpace > 
cusp::make_csr_matrix_view (const csr_matrix_view< ArrayType1, ArrayType2, ArrayType3, IndexType, ValueType, MemorySpace > &m)
 
template<typename IndexType , typename ValueType , class MemorySpace >
csr_matrix< IndexType,
ValueType, MemorySpace >::view 
cusp::make_csr_matrix_view (csr_matrix< IndexType, ValueType, MemorySpace > &m)
 
template<typename IndexType , typename ValueType , class MemorySpace >
csr_matrix< IndexType,
ValueType, MemorySpace >
::const_view 
cusp::make_csr_matrix_view (const csr_matrix< IndexType, ValueType, MemorySpace > &m)
 
template<typename ArrayType1 , typename ArrayType2 >
dia_matrix_view< ArrayType1,
ArrayType2 > 
cusp::make_dia_matrix_view (size_t num_rows, size_t num_cols, size_t num_entries, ArrayType1 diagonal_offsets, ArrayType2 values)
 
template<typename ArrayType1 , typename ArrayType2 , typename IndexType , typename ValueType , typename MemorySpace >
dia_matrix_view< ArrayType1,
ArrayType2, IndexType,
ValueType, MemorySpace > 
cusp::make_dia_matrix_view (const dia_matrix_view< ArrayType1, ArrayType2, IndexType, ValueType, MemorySpace > &m)
 
template<typename IndexType , typename ValueType , class MemorySpace >
dia_matrix< IndexType,
ValueType, MemorySpace >::view 
cusp::make_dia_matrix_view (dia_matrix< IndexType, ValueType, MemorySpace > &m)
 
template<typename IndexType , typename ValueType , class MemorySpace >
dia_matrix< IndexType,
ValueType, MemorySpace >
::const_view 
cusp::make_dia_matrix_view (const dia_matrix< IndexType, ValueType, MemorySpace > &m)
 
template<typename ArrayType1 , typename ArrayType2 >
ell_matrix_view< ArrayType1,
ArrayType2 > 
cusp::make_ell_matrix_view (size_t num_rows, size_t num_cols, size_t num_entries, ArrayType1 column_indices, ArrayType2 values)
 
template<typename ArrayType1 , typename ArrayType2 , typename IndexType , typename ValueType , typename MemorySpace >
ell_matrix_view< ArrayType1,
ArrayType2, IndexType,
ValueType, MemorySpace > 
cusp::make_ell_matrix_view (const ell_matrix_view< ArrayType1, ArrayType2, IndexType, ValueType, MemorySpace > &m)
 
template<typename IndexType , typename ValueType , typename MemorySpace >
ell_matrix< IndexType,
ValueType, MemorySpace >::view 
cusp::make_ell_matrix_view (ell_matrix< IndexType, ValueType, MemorySpace > &m)
 
template<typename IndexType , typename ValueType , typename MemorySpace >
ell_matrix< IndexType,
ValueType, MemorySpace >
::const_view 
cusp::make_ell_matrix_view (const ell_matrix< IndexType, ValueType, MemorySpace > &m)
 
template<typename ArrayType >
permutation_matrix_view
< ArrayType > 
cusp::make_permutation_matrix_view (size_t num_rows, ArrayType permutation)
 
template<typename ArrayType , typename IndexType , typename MemorySpace >
permutation_matrix_view
< ArrayType, IndexType,
MemorySpace > 
cusp::make_permutation_matrix_view (const permutation_matrix_view< ArrayType, IndexType, MemorySpace > &m)
 
template<typename IndexType , class MemorySpace >
permutation_matrix< IndexType,
MemorySpace >::view 
cusp::make_permutation_matrix_view (permutation_matrix< IndexType, MemorySpace > &m)
 
template<typename IndexType , class MemorySpace >
permutation_matrix< IndexType,
MemorySpace >::const_view 
cusp::make_permutation_matrix_view (const permutation_matrix< IndexType, MemorySpace > &m)
 

Function Documentation

template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 >
coo_matrix_view<ArrayType1,ArrayType2,ArrayType3> cusp::make_coo_matrix_view ( const size_t  num_rows,
const size_t  num_cols,
const size_t  num_entries,
ArrayType1  row_indices,
ArrayType2  column_indices,
ArrayType3  values 
)

This is a convenience function for generating an coo_matrix_view using individual arrays

Template Parameters
ArrayType1row indices array type
ArrayType2column indices array type
ArrayType3values array type
Parameters
num_rowsNumber of rows.
num_colsNumber of columns.
num_entriesNumber of nonzero matrix entries.
row_indicesArray containing the row indices.
column_indicesArray containing the column indices.
valuesArray containing the values.
Returns
coo_matrix_view constructed using input arrays

Definition at line 513 of file coo_matrix.h.

template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 , typename IndexType , typename ValueType , typename MemorySpace >
coo_matrix_view<ArrayType1,ArrayType2,ArrayType3,IndexType,ValueType,MemorySpace> cusp::make_coo_matrix_view ( const coo_matrix_view< ArrayType1, ArrayType2, ArrayType3, IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an coo_matrix_view using individual arrays with explicit index, value, and memory space annotations.

Template Parameters
ArrayType1row indices array type
ArrayType2column indices array type
ArrayType3values array type
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar coo_matrix_view matrix to copy.
Returns
coo_matrix_view constructed using input arrays.

Definition at line 549 of file coo_matrix.h.

template<typename MatrixType >
MatrixType::coo_view_type cusp::make_coo_matrix_view ( MatrixType &  m)

This is a convenience function for generating an coo_matrix_view using an existing matrix.

Template Parameters
MatrixTypeType of the input matrix
Parameters
mExemplar MatrixType matrix to copy.
Returns
coo_matrix_view constructed using input matrix.

Definition at line 566 of file coo_matrix.h.

template<typename MatrixType >
MatrixType::const_coo_view_type cusp::make_coo_matrix_view ( const MatrixType &  m)

This is a convenience function for generating an const coo_matrix_view using an existing matrix.

Template Parameters
MatrixTypeType of the input matrix
Parameters
mExemplar MatrixType matrix to copy.
Returns
coo_matrix_view constructed using input matrix.

Definition at line 585 of file coo_matrix.h.

template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 >
csr_matrix_view<ArrayType1,ArrayType2,ArrayType3> cusp::make_csr_matrix_view ( size_t  num_rows,
size_t  num_cols,
size_t  num_entries,
ArrayType1  row_offsets,
ArrayType2  column_indices,
ArrayType3  values 
)

This is a convenience function for generating an csr_matrix_view using individual arrays

Template Parameters
ArrayType1row offsets array type
ArrayType2column indices array type
ArrayType3values array type
Parameters
num_rowsNumber of rows.
num_colsNumber of columns.
num_entriesNumber of nonzero matrix entries.
row_offsetsArray containing the row offsets.
column_indicesArray containing the column indices.
valuesArray containing the values.
Returns
csr_matrix_view constructed using input arrays

Definition at line 434 of file csr_matrix.h.

template<typename ArrayType1 , typename ArrayType2 , typename ArrayType3 , typename IndexType , typename ValueType , typename MemorySpace >
csr_matrix_view<ArrayType1,ArrayType2,ArrayType3,IndexType,ValueType,MemorySpace> cusp::make_csr_matrix_view ( const csr_matrix_view< ArrayType1, ArrayType2, ArrayType3, IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an csr_matrix_view using individual arrays with explicit index, value, and memory space annotations.

Template Parameters
ArrayType1row offsets array type
ArrayType2column indices array type
ArrayType3values array type
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar csr_matrix_view matrix to copy.
Returns
csr_matrix_view constructed using input arrays.

Definition at line 470 of file csr_matrix.h.

template<typename IndexType , typename ValueType , class MemorySpace >
csr_matrix<IndexType,ValueType,MemorySpace>::view cusp::make_csr_matrix_view ( csr_matrix< IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an csr_matrix_view using an existing csr_matrix.

Template Parameters
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar csr_matrix matrix to copy.
Returns
csr_matrix_view constructed using input arrays.

Definition at line 489 of file csr_matrix.h.

template<typename IndexType , typename ValueType , class MemorySpace >
csr_matrix<IndexType,ValueType,MemorySpace>::const_view cusp::make_csr_matrix_view ( const csr_matrix< IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an const csr_matrix_view using an existing csr_matrix.

Template Parameters
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar csr_matrix matrix to copy.
Returns
csr_matrix_view constructed using input arrays.

Definition at line 512 of file csr_matrix.h.

template<typename ArrayType1 , typename ArrayType2 >
dia_matrix_view<ArrayType1,ArrayType2> cusp::make_dia_matrix_view ( size_t  num_rows,
size_t  num_cols,
size_t  num_entries,
ArrayType1  diagonal_offsets,
ArrayType2  values 
)

This is a convenience function for generating an dia_matrix_view using individual arrays

Template Parameters
ArrayType1diagonal offsets array type
ArrayType2values array type
Parameters
num_rowsNumber of rows.
num_colsNumber of columns.
num_entriesNumber of nonzero matrix entries.
diagonal_offsetsArray containing the diagonal offsets.
valuesArray containing the values.
Returns
dia_matrix_view constructed using input arrays

Definition at line 460 of file dia_matrix.h.

template<typename ArrayType1 , typename ArrayType2 , typename IndexType , typename ValueType , typename MemorySpace >
dia_matrix_view<ArrayType1,ArrayType2,IndexType,ValueType,MemorySpace> cusp::make_dia_matrix_view ( const dia_matrix_view< ArrayType1, ArrayType2, IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an dia_matrix_view using individual arrays with explicit index, value, and memory space annotations.

Template Parameters
ArrayType1diagonal offsets array type
ArrayType2values array type
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar dia_matrix_view matrix to copy.
Returns
dia_matrix_view constructed using input arrays.

Definition at line 493 of file dia_matrix.h.

template<typename IndexType , typename ValueType , class MemorySpace >
dia_matrix<IndexType,ValueType,MemorySpace>::view cusp::make_dia_matrix_view ( dia_matrix< IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an dia_matrix_view using an existing dia_matrix.

Template Parameters
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar dia_matrix matrix to copy.
Returns
dia_matrix_view constructed using input arrays.

Definition at line 512 of file dia_matrix.h.

template<typename IndexType , typename ValueType , class MemorySpace >
dia_matrix<IndexType,ValueType,MemorySpace>::const_view cusp::make_dia_matrix_view ( const dia_matrix< IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an const dia_matrix_view using an existing coo_matrix.

Template Parameters
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar dia_matrix matrix to copy.
Returns
dia_matrix_view constructed using input arrays.

Definition at line 534 of file dia_matrix.h.

template<typename ArrayType1 , typename ArrayType2 >
ell_matrix_view<ArrayType1,ArrayType2> cusp::make_ell_matrix_view ( size_t  num_rows,
size_t  num_cols,
size_t  num_entries,
ArrayType1  column_indices,
ArrayType2  values 
)

This is a convenience function for generating an ell_matrix_view using individual arrays

Template Parameters
ArrayType1column indices array type
ArrayType2values array type
Parameters
num_rowsNumber of rows.
num_colsNumber of columns.
num_entriesNumber of nonzero matrix entries.
column_indicesArray containing the column indices.
valuesArray containing the values.
Returns
ell_matrix_view constructed using input arrays

Definition at line 448 of file ell_matrix.h.

template<typename ArrayType1 , typename ArrayType2 , typename IndexType , typename ValueType , typename MemorySpace >
ell_matrix_view<ArrayType1,ArrayType2,IndexType,ValueType,MemorySpace> cusp::make_ell_matrix_view ( const ell_matrix_view< ArrayType1, ArrayType2, IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an ell_matrix_view using individual arrays with explicit index, value, and memory space annotations.

Template Parameters
ArrayType1column indices array type
ArrayType2values array type
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar ell_matrix_view matrix to copy.
Returns
ell_matrix_view constructed using input arrays.

Definition at line 478 of file ell_matrix.h.

template<typename IndexType , typename ValueType , typename MemorySpace >
ell_matrix<IndexType,ValueType,MemorySpace>::view cusp::make_ell_matrix_view ( ell_matrix< IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an ell_matrix_view using an existing ell_matrix.

Template Parameters
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar ell_matrix matrix to copy.
Returns
ell_matrix_view constructed using input arrays.

Definition at line 497 of file ell_matrix.h.

template<typename IndexType , typename ValueType , typename MemorySpace >
ell_matrix<IndexType,ValueType,MemorySpace>::const_view cusp::make_ell_matrix_view ( const ell_matrix< IndexType, ValueType, MemorySpace > &  m)

This is a convenience function for generating an const ell_matrix_view using an existing ell_matrix.

Template Parameters
IndexTypeindices type
ValueTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar ell_matrix matrix to copy.
Returns
ell_matrix_view constructed using input arrays.

Definition at line 519 of file ell_matrix.h.

template<typename ArrayType >
permutation_matrix_view<ArrayType> cusp::make_permutation_matrix_view ( size_t  num_rows,
ArrayType  permutation 
)

This is a convenience function for generating a permutation_matrix_view using individual arrays

Template Parameters
ArrayTyperow offsets array type
Parameters
num_rowsNumber of rows.
permutationArray containing the permutation.
Returns
permutation_matrix_view constructed using input arrays

Definition at line 380 of file permutation_matrix.h.

template<typename ArrayType , typename IndexType , typename MemorySpace >
permutation_matrix_view<ArrayType,IndexType,MemorySpace> cusp::make_permutation_matrix_view ( const permutation_matrix_view< ArrayType, IndexType, MemorySpace > &  m)

This is a convenience function for generating a permutation_matrix_view using individual arrays with explicit value, and memory space annotations.

Template Parameters
ArrayTypepermutation array type
IndexTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar permutation_matrix_view matrix to copy.
Returns
permutation_matrix_view constructed using input arrays.

Definition at line 402 of file permutation_matrix.h.

template<typename IndexType , class MemorySpace >
permutation_matrix<IndexType,MemorySpace>::view cusp::make_permutation_matrix_view ( permutation_matrix< IndexType, MemorySpace > &  m)

This is a convenience function for generating a permutation_matrix_view using an existing permutation_matrix.

Template Parameters
IndexTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar permutation_matrix matrix to copy.
Returns
permutation_matrix_view constructed using input arrays.

Definition at line 420 of file permutation_matrix.h.

template<typename IndexType , class MemorySpace >
permutation_matrix<IndexType,MemorySpace>::const_view cusp::make_permutation_matrix_view ( const permutation_matrix< IndexType, MemorySpace > &  m)

This is a convenience function for generating a const permutation_matrix_view using an existing const permutation_matrix.

Template Parameters
IndexTypevalues type
MemorySpacememory space of the arrays
Parameters
mExemplar permutation_matrix matrix to copy.
Returns
permutation_matrix_view constructed using input arrays.

Definition at line 438 of file permutation_matrix.h.