The array2d_view is a view of a array2d container.
| Iterator | The iterator type used to encapsulate the underlying data. |
#include <array2d.h>
Public Methods | |
| array2d_view (void) | |
| array2d_view (const array2d_view &a) | |
| array2d_view (array2d< typename Parent::value_type, typename Parent::memory_space, orientation > &a) | |
| template<typename Array2 > | |
| array2d_view (size_t num_rows, size_t num_cols, size_t pitch, const Array2 &values) | |
| values_array_type::reference | operator() (const size_t i, const size_t j) const |
| void | resize (const size_t num_rows, const size_t num_cols) |
| void | resize (const size_t num_rows, const size_t num_cols, const size_t pitch) |
| row_view | row (size_t i) |
| column_view | column (size_t i) |
| row_view | row (size_t i) const |
| column_view | column (size_t i) const |
Public Members | |
| size_t | pitch |
| values_array_type | values |
|
inline |
|
inline |
This constructor creates a array2d_view from another array2d_view.
| a | array2d_view used to create this array2d_view. |
|
inline |
This constructor creates a array2d_view from a array2d container.
| a | array2d used to construct this array2d_view. |
|
inline |
This constructor creates a array2d vector with the given shape, fills the entries with a given value and sets the pitch.
| Array2 | The type of values used to construct this array2d_view. |
| num_rows | The number of array2d_view rows. |
| num_cols | The number of array2d_view columns. |
| values | The initial value of all entries. |
| pitch | The stride between entries in the major dimension. |
| column_view cusp::array2d_view< ArrayView, Orientation >::column | ( | size_t | i | ) |
This method generates a array1d_view of column i of this array2d_view matrix
| i | The column index used to create array1d_view |
i | column_view cusp::array2d_view< ArrayView, Orientation >::column | ( | size_t | i | ) | const |
This method generates a const array1d_view of column i of this array2d_view matrix
| i | The column index used to create array1d_view |
i | values_array_type::reference cusp::array2d_view< ArrayView, Orientation >::operator() | ( | const size_t | i, |
| const size_t | j | ||
| ) | const |
Subscript access to the data contained in this array2d_view.
| i | Row index for which data should be accessed. |
| j | Column index for which data should be accessed. |
| void cusp::array2d_view< ArrayView, Orientation >::resize | ( | const size_t | num_rows, |
| const size_t | num_cols | ||
| ) |
This method will resize this array2d_view to the specified dimensions. If the number of total entries is smaller than this array2d_view's current size this array2d_view is truncated, otherwise this array2d_view is extended with the value of new entries undefined.
| num_rows | The number of rows this array2d_view should contain. |
| num_cols | The number of columns this array2d_view should contain. |
| void cusp::array2d_view< ArrayView, Orientation >::resize | ( | const size_t | num_rows, |
| const size_t | num_cols, | ||
| const size_t | pitch | ||
| ) |
This method will resize this array2d_view to the specified dimensions. If the number of total entries is smaller than this array2d_view's current size this array2d_view is truncated, otherwise this array2d_view is extended with the value of new entries undefined.
| num_rows | The number of rows this array2d_view should contain. |
| num_cols | The number of columns this array2d_view should contain. |
| pitch | The stride between major dimension entries this array2d_view should contain. |
| row_view cusp::array2d_view< ArrayView, Orientation >::row | ( | size_t | i | ) |
This method generates a array1d_view of row i of this array2d_view matrix
| i | The row index used to create array1d_view |
i | row_view cusp::array2d_view< ArrayView, Orientation >::row | ( | size_t | i | ) | const |
This method generates a const array1d_view of row i of this array2d_view matrix
| i | The row index used to create array1d_view |
i | size_t cusp::array2d_view< ArrayView, Orientation >::pitch |
| values_array_type cusp::array2d_view< ArrayView, Orientation >::values |
1.8.6