Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
Nektar::Array< TwoD, DataType > Class Template Reference

A 2D array. More...

#include <SharedArray.hpp>

Inheritance diagram for Nektar::Array< TwoD, DataType >:
Inheritance graph
[legend]
Collaboration diagram for Nektar::Array< TwoD, DataType >:
Collaboration graph
[legend]

Public Types

typedef Array< TwoD, const
DataType > 
BaseType
 
typedef BaseType::iterator iterator
 
typedef BaseType::reference reference
 
typedef BaseType::index index
 
typedef BaseType::size_type size_type
 
typedef BaseType::element element
 
- Public Types inherited from Nektar::Array< TwoD, const DataType >
typedef boost::multi_array_ref
< DataType, 2 > 
ArrayType
 
typedef ArrayType::const_reference const_reference
 
typedef ArrayType::reference reference
 
typedef ArrayType::index index
 
typedef ArrayType::const_iterator const_iterator
 
typedef ArrayType::iterator iterator
 
typedef ArrayType::element element
 
typedef ArrayType::size_type size_type
 

Public Member Functions

 Array ()
 
 Array (unsigned int dim1Size, unsigned int dim2Size)
 
 Array (unsigned int dim1Size, unsigned int dim2Size, const DataType &initValue)
 
 Array (unsigned int dim1Size, unsigned int dim2Size, const DataType *data)
 
 Array (const Array< TwoD, DataType > &rhs)
 
Array< TwoD, DataType > & operator= (const Array< TwoD, DataType > &rhs)
 
iterator begin ()
 
iterator end ()
 
reference operator[] (index i)
 
elementget ()
 
elementdata ()
 
- Public Member Functions inherited from Nektar::Array< TwoD, const DataType >
 Array ()
 
 Array (unsigned int dim1Size, unsigned int dim2Size)
 Constructs a 3 dimensional array. The elements of the array are not initialized. More...
 
 Array (unsigned int dim1Size, unsigned int dim2Size, const DataType &initValue)
 
 Array (unsigned int dim1Size, unsigned int dim2Size, const DataType *data)
 
 Array (const Array< TwoD, const DataType > &rhs)
 
Array< TwoD, const DataType > & operator= (const Array< TwoD, const DataType > &rhs)
 
const_iterator begin () const
 
const_iterator end () const
 
const_reference operator[] (index i) const
 
const elementget () const
 
const elementdata () const
 
size_type num_dimensions () const
 
const size_typeshape () const
 
size_type num_elements () const
 
size_type GetRows () const
 
size_type GetColumns () const
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::Array< TwoD, const DataType >
boost::shared_ptr< ArrayTypem_data
 

Detailed Description

template<typename DataType>
class Nektar::Array< TwoD, DataType >

A 2D array.

Definition at line 589 of file SharedArray.hpp.

Member Typedef Documentation

template<typename DataType >
typedef Array<TwoD, const DataType> Nektar::Array< TwoD, DataType >::BaseType

Definition at line 592 of file SharedArray.hpp.

template<typename DataType >
typedef BaseType::element Nektar::Array< TwoD, DataType >::element

Definition at line 597 of file SharedArray.hpp.

template<typename DataType >
typedef BaseType::index Nektar::Array< TwoD, DataType >::index

Definition at line 595 of file SharedArray.hpp.

template<typename DataType >
typedef BaseType::iterator Nektar::Array< TwoD, DataType >::iterator

Definition at line 593 of file SharedArray.hpp.

template<typename DataType >
typedef BaseType::reference Nektar::Array< TwoD, DataType >::reference

Definition at line 594 of file SharedArray.hpp.

template<typename DataType >
typedef BaseType::size_type Nektar::Array< TwoD, DataType >::size_type

Definition at line 596 of file SharedArray.hpp.

Constructor & Destructor Documentation

template<typename DataType >
Nektar::Array< TwoD, DataType >::Array ( )
inline

Definition at line 600 of file SharedArray.hpp.

600  :
601  BaseType()
602  {
603  }
Array< TwoD, const DataType > BaseType
template<typename DataType >
Nektar::Array< TwoD, DataType >::Array ( unsigned int  dim1Size,
unsigned int  dim2Size 
)
inline

Definition at line 605 of file SharedArray.hpp.

605  :
606  BaseType(dim1Size, dim2Size)
607  {
608  }
Array< TwoD, const DataType > BaseType
template<typename DataType >
Nektar::Array< TwoD, DataType >::Array ( unsigned int  dim1Size,
unsigned int  dim2Size,
const DataType &  initValue 
)
inline

Definition at line 610 of file SharedArray.hpp.

610  :
611  BaseType(dim1Size, dim2Size, initValue)
612  {
613  }
Array< TwoD, const DataType > BaseType
template<typename DataType >
Nektar::Array< TwoD, DataType >::Array ( unsigned int  dim1Size,
unsigned int  dim2Size,
const DataType *  data 
)
inline

Definition at line 615 of file SharedArray.hpp.

615  :
616  BaseType(dim1Size, dim2Size, data)
617  {
618  }
Array< TwoD, const DataType > BaseType
template<typename DataType >
Nektar::Array< TwoD, DataType >::Array ( const Array< TwoD, DataType > &  rhs)
inline

Definition at line 620 of file SharedArray.hpp.

620  :
621  BaseType(rhs)
622  {
623  }
Array< TwoD, const DataType > BaseType

Member Function Documentation

template<typename DataType >
iterator Nektar::Array< TwoD, DataType >::begin ( )
inline

Definition at line 632 of file SharedArray.hpp.

632 { return this->m_data->begin(); }
boost::shared_ptr< ArrayType > m_data
template<typename DataType >
element* Nektar::Array< TwoD, DataType >::data ( )
inline

Definition at line 644 of file SharedArray.hpp.

644 { return this->m_data->data(); }
boost::shared_ptr< ArrayType > m_data
template<typename DataType >
iterator Nektar::Array< TwoD, DataType >::end ( )
inline

Definition at line 635 of file SharedArray.hpp.

635 { return this->m_data->end(); }
boost::shared_ptr< ArrayType > m_data
template<typename DataType >
element* Nektar::Array< TwoD, DataType >::get ( )
inline

Definition at line 641 of file SharedArray.hpp.

641 { return this->m_data->data(); }
boost::shared_ptr< ArrayType > m_data
template<typename DataType >
Array<TwoD, DataType>& Nektar::Array< TwoD, DataType >::operator= ( const Array< TwoD, DataType > &  rhs)
inline

Definition at line 625 of file SharedArray.hpp.

626  {
627  BaseType::operator=(rhs);
628  return *this;
629  }
template<typename DataType >
reference Nektar::Array< TwoD, DataType >::operator[] ( index  i)
inline

Definition at line 638 of file SharedArray.hpp.

638 { return (*this->m_data)[i]; }
boost::shared_ptr< ArrayType > m_data