23#include <cusp/detail/config.h>
24#include <cusp/detail/format.h>
25#include <cusp/detail/matrix_base.h>
28#include <cusp/memory.h>
34template <
typename ArrayType,
typename IndexType,
typename MemorySpace>
class permutation_matrix_view;
107template <
typename IndexType,
typename MemorySpace>
108class permutation_matrix :
public cusp::detail::matrix_base<IndexType,IndexType,MemorySpace,cusp::permutation_format>
112 typedef cusp::detail::matrix_base<IndexType,IndexType,MemorySpace,cusp::permutation_format> Parent;
122 typename permutation_array_type::view,
127 typename permutation_array_type::const_view,
129 MemorySpace> const_view;
131 template<
typename MemorySpace2>
150 : Parent(num_rows, num_rows, num_rows),
159 template<
typename MemorySpace2>
170 template<
typename ArrayType>
192 template<
typename MatrixType>
273template <
typename ArrayType,
274 typename IndexType =
typename ArrayType::value_type,
275 typename MemorySpace =
typename ArrayType::memory_space>
280 typedef cusp::detail::matrix_base<IndexType,IndexType,MemorySpace,cusp::permutation_format> Parent;
285 typedef ArrayType permutation_array_type;
308 : Parent(num_rows, num_rows, num_rows),
318 : Parent(num_rows, num_rows, num_rows),
363 template<
typename MatrixType>
379template <
typename ArrayType>
401template <
typename ArrayType,
typename IndexType,
typename MemorySpace>
402permutation_matrix_view<ArrayType,IndexType,MemorySpace>
419template <
typename IndexType,
class MemorySpace>
420typename permutation_matrix<IndexType,MemorySpace>::view
437template <
typename IndexType,
class MemorySpace>
438typename permutation_matrix<IndexType,MemorySpace>::const_view
448#include <cusp/detail/permutation_matrix.inl>
1D array of elements that may reside in "host" or "device" memory space
The array1d class is a 1D vector container that may contain elements stored in "host" or "device" mem...
Specialized array1d_view wrapping thrust::counting_iterator.
View of a permutation_matrix.
permutation_matrix_view(permutation_matrix_view< ArrayType > &matrix)
void resize(const size_t num_rows)
permutation_matrix_view(const size_t num_rows, ArrayType &permutation)
permutation_array_type permutation
permutation_matrix_view(void)
permutation_matrix_view(const size_t num_rows, const ArrayType &permutation)
permutation_matrix_view(const permutation_matrix_view< ArrayType > &matrix)
void symmetric_permute(MatrixType &matrix)
permutation_matrix_view(permutation_matrix< IndexType, MemorySpace > &matrix)
permutation_matrix_view(const permutation_matrix< IndexType, MemorySpace > &matrix)
Simple representation a permutation matrix.
void resize(const size_t num_rows)
void swap(permutation_matrix &matrix)
permutation_array_type permutation
permutation_matrix(const permutation_matrix< IndexType, MemorySpace2 > &matrix)
permutation_matrix(const size_t num_rows)
void symmetric_permute(MatrixType &matrix)
permutation_matrix(const size_t num_rows, const ArrayType &permutation)
array1d_view< Iterator > make_array1d_view(Iterator first, Iterator last)
permutation_matrix_view< ArrayType > make_permutation_matrix_view(size_t num_rows, ArrayType permutation)