2 #ifndef vnl_matrix_ref_h_ 3 #define vnl_matrix_ref_h_ 19 #include "vnl/vnl_export.h" 44 for (
unsigned int i = 0; i <
m; ++i)
45 Base::data[i] = datablck + i * n;
52 for (
unsigned int i = 0; i < other.
rows(); ++i)
53 Base::data[i] = const_cast<T*>(other.
data_block()) + i * other.
cols();
54 Base::num_rows = other.
rows();
55 Base::num_cols = other.
cols();
59 Base::data[0] =
nullptr;
80 bool resize (
unsigned int,
unsigned int) {
return false; }
82 bool make_size (
unsigned int,
unsigned int) {
return false; }
84 bool set_size (
unsigned int,
unsigned int) {
return false; }
91 #endif // vnl_matrix_ref_h_ unsigned int cols() const
Return the number of columns.
An ordinary mathematical matrix.
An ordinary mathematical matrix.
static T ** allocate_Tptr(const std::size_t n)
Memory allocation.
T const * data_block() const
Access the contiguous block storing the elements in the matrix row-wise. O(1).
unsigned int rows() const
Return the number of rows.
bool set_size(unsigned r, unsigned c)
Resize to r rows by c columns. Old data lost.
vnl_matrix reference to user-supplied storage.