cml::external_2D< Element, Rows, Cols, Layout > Class Template Reference

Fixed-size external 2D array. More...

#include <external_2D.h>

Inheritance diagram for cml::external_2D< Element, Rows, Cols, Layout >:

Inheritance graph
[legend]
Collaboration diagram for cml::external_2D< Element, Rows, Cols, Layout >:

Collaboration graph
[legend]

List of all members.

Public Types

enum  { array_rows = Rows, array_cols = Cols }
typedef fixed_1D< Element, Cols > col_array_type
typedef const Element * const_pointer
typedef const Element & const_reference
typedef twod_tag dimension_tag
typedef external< Rows, Cols > generator_type
typedef Layout layout
typedef external_memory_tag memory_tag
typedef Element * pointer
typedef Element & reference
typedef not_resizable_tag resizing_tag
typedef fixed_1D< Element, Rows > row_array_type
typedef fixed_size_tag size_tag
typedef fixed_2D< Element,
Cols, Rows, Layout > 
transposed_type
typedef Element value_type

Public Member Functions

 CML_STATIC_REQUIRE ((Rows > 0)&&(Cols > 0))
size_t cols () const
 Return the number of cols in the array.
const_pointer data () const
 Return access to the data as a raw pointer.
pointer data ()
 Return access to the data as a raw pointer.
 external_2D (value_type *const ptr)
 Construct an external array from a pointer.
 external_2D (value_type const ptr[Rows][Cols])
 Construct an external array from a pointer.
const_reference operator() (size_t row, size_t col) const
 Const access element (row,col) of the matrix.
reference operator() (size_t row, size_t col)
 Access element (row,col) of the matrix.
size_t rows () const
 Return the number of rows in the array.

Protected Member Functions

const_reference get_element (size_t row, size_t col, col_major) const
reference get_element (size_t row, size_t col, col_major)
const_reference get_element (size_t row, size_t col, row_major) const
reference get_element (size_t row, size_t col, row_major)

Protected Attributes

pointer const m_data


Detailed Description

template<typename Element, int Rows, int Cols, typename Layout>
class cml::external_2D< Element, Rows, Cols, Layout >

Fixed-size external 2D array.

Both the memory and the size are fixed at compile time, and cannot be changed.

Definition at line 36 of file external_2D.h.


Member Typedef Documentation

template<typename Element, int Rows, int Cols, typename Layout>
typedef fixed_1D<Element,Cols> cml::external_2D< Element, Rows, Cols, Layout >::col_array_type

Definition at line 76 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
typedef const Element* cml::external_2D< Element, Rows, Cols, Layout >::const_pointer

Definition at line 51 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
typedef const Element& cml::external_2D< Element, Rows, Cols, Layout >::const_reference

template<typename Element, int Rows, int Cols, typename Layout>
typedef twod_tag cml::external_2D< Element, Rows, Cols, Layout >::dimension_tag

Definition at line 66 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
typedef external<Rows,Cols> cml::external_2D< Element, Rows, Cols, Layout >::generator_type

template<typename Element, int Rows, int Cols, typename Layout>
typedef Layout cml::external_2D< Element, Rows, Cols, Layout >::layout

template<typename Element, int Rows, int Cols, typename Layout>
typedef external_memory_tag cml::external_2D< Element, Rows, Cols, Layout >::memory_tag

template<typename Element, int Rows, int Cols, typename Layout>
typedef Element* cml::external_2D< Element, Rows, Cols, Layout >::pointer

Definition at line 48 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
typedef Element& cml::external_2D< Element, Rows, Cols, Layout >::reference

template<typename Element, int Rows, int Cols, typename Layout>
typedef not_resizable_tag cml::external_2D< Element, Rows, Cols, Layout >::resizing_tag

template<typename Element, int Rows, int Cols, typename Layout>
typedef fixed_1D<Element,Rows> cml::external_2D< Element, Rows, Cols, Layout >::row_array_type

Definition at line 75 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
typedef fixed_size_tag cml::external_2D< Element, Rows, Cols, Layout >::size_tag

template<typename Element, int Rows, int Cols, typename Layout>
typedef fixed_2D<Element,Cols,Rows,Layout> cml::external_2D< Element, Rows, Cols, Layout >::transposed_type

template<typename Element, int Rows, int Cols, typename Layout>
typedef Element cml::external_2D< Element, Rows, Cols, Layout >::value_type


Member Enumeration Documentation

template<typename Element, int Rows, int Cols, typename Layout>
anonymous enum

Enumerator:
array_rows 
array_cols 

Definition at line 84 of file external_2D.h.


Constructor & Destructor Documentation

template<typename Element, int Rows, int Cols, typename Layout>
cml::external_2D< Element, Rows, Cols, Layout >::external_2D ( value_type const   ptr[Rows][Cols]  )  [inline]

Construct an external array from a pointer.

Definition at line 90 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
cml::external_2D< Element, Rows, Cols, Layout >::external_2D ( value_type *const   ptr  )  [inline]

Construct an external array from a pointer.

Definition at line 94 of file external_2D.h.


Member Function Documentation

template<typename Element, int Rows, int Cols, typename Layout>
cml::external_2D< Element, Rows, Cols, Layout >::CML_STATIC_REQUIRE ( (Rows > 0)&&(Cols > 0)   ) 

template<typename Element, int Rows, int Cols, typename Layout>
size_t cml::external_2D< Element, Rows, Cols, Layout >::cols (  )  const [inline]

Return the number of cols in the array.

Definition at line 103 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
const_pointer cml::external_2D< Element, Rows, Cols, Layout >::data (  )  const [inline]

Return access to the data as a raw pointer.

Definition at line 138 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
pointer cml::external_2D< Element, Rows, Cols, Layout >::data (  )  [inline]

Return access to the data as a raw pointer.

Definition at line 135 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
const_reference cml::external_2D< Element, Rows, Cols, Layout >::get_element ( size_t  row,
size_t  col,
col_major   
) const [inline, protected]

Definition at line 156 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
reference cml::external_2D< Element, Rows, Cols, Layout >::get_element ( size_t  row,
size_t  col,
col_major   
) [inline, protected]

Definition at line 152 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
const_reference cml::external_2D< Element, Rows, Cols, Layout >::get_element ( size_t  row,
size_t  col,
row_major   
) const [inline, protected]

Definition at line 148 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
reference cml::external_2D< Element, Rows, Cols, Layout >::get_element ( size_t  row,
size_t  col,
row_major   
) [inline, protected]

Definition at line 144 of file external_2D.h.

Referenced by cml::external_2D< Element,-1,-1, Layout >::operator()(), and cml::external_2D< Element, Rows, Cols, Layout >::operator()().

Here is the caller graph for this function:

template<typename Element, int Rows, int Cols, typename Layout>
const_reference cml::external_2D< Element, Rows, Cols, Layout >::operator() ( size_t  row,
size_t  col 
) const [inline]

Const access element (row,col) of the matrix.

Parameters:
row row of element.
col column of element.
Returns:
const reference.
Note:
This function does not range-check the arguments.

Definition at line 129 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
reference cml::external_2D< Element, Rows, Cols, Layout >::operator() ( size_t  row,
size_t  col 
) [inline]

Access element (row,col) of the matrix.

Parameters:
row row of element.
col column of element.
Returns:
mutable reference.
Note:
This function does not range-check the arguments.

Definition at line 116 of file external_2D.h.

template<typename Element, int Rows, int Cols, typename Layout>
size_t cml::external_2D< Element, Rows, Cols, Layout >::rows (  )  const [inline]

Return the number of rows in the array.

Definition at line 100 of file external_2D.h.


Member Data Documentation

template<typename Element, int Rows, int Cols, typename Layout>
pointer const cml::external_2D< Element, Rows, Cols, Layout >::m_data [protected]


The documentation for this class was generated from the following file:

Generated on Sat Jul 18 19:35:38 2009 for CML 1.0 by  doxygen 1.5.9