345 void Resize(
const int height,
const int width);
381 void Init(
const int height,
const int width);
404 Init( height , width );
467 for (
int j = 0; j < rows; ++j)
494 Init(height , width);
567 for (
int j=0 ; j<array.
LengthY() ; ++j)
569 for (
int i=0 ; i<array.
LengthX() ; ++i)
571 stream << array[j][i] <<
" ";
583 for (
int j=0 ; j<array.
LengthY() ; ++j)
585 for (
int i=0 ; i<array.
LengthX() ; ++i)
587 stream >> array[j][i];
Definition of class SequenceHeaderByteIO.
Definition accessunit_byteio.h:52
std::ostream & operator<<(std::ostream &stream, TwoDArray< T > &array)
A function for extracting array data.
Definition arrays.h:565
std::istream & operator>>(std::istream &stream, TwoDArray< T > &array)
A function for inserting array data.
Definition arrays.h:581
Range type.
Definition arrays.h:61
int First() const
Returns the start of the range.
Definition arrays.h:70
Range(int s, int e)
Constructor.
Definition arrays.h:67
int m_lst
Definition arrays.h:76
int m_fst
Definition arrays.h:76
int Last() const
Returns the end point of the range.
Definition arrays.h:73
~OneDArray()
Destructor.
Definition arrays.h:116
OneDArray< T > & operator=(const OneDArray< T > &rhs)
Assignment=.
Definition arrays.h:200
void FreePtr()
Definition arrays.h:264
int m_first
Definition arrays.h:158
const T & operator[](const int pos) const
Element access.
Definition arrays.h:140
int m_last
Definition arrays.h:158
int m_length
Definition arrays.h:159
int Length() const
Returns the length of the array.
Definition arrays.h:143
int First() const
Returns the index of the first element.
Definition arrays.h:146
void Resize(int l)
Resize the array, throwing away the current data.
Definition arrays.h:221
T * m_ptr
Definition arrays.h:160
int Last() const
Returns the index of the last element.
Definition arrays.h:149
void Init(const int len)
Definition arrays.h:234
T & operator[](const int pos)
Element access.
Definition arrays.h:137
OneDArray()
Default constructor.
Definition arrays.h:167
A template class for two-dimensional arrays.
Definition arrays.h:285
bool CopyContents(TwoDArray< T > &out) const
Copy Contents.
Definition arrays.h:461
int LengthX() const
Returns the width.
Definition arrays.h:362
int LastX() const
Returns the index of the last element of a row.
Definition arrays.h:374
TwoDArray(const int height, const int width)
Constructor.
Definition arrays.h:300
TwoDArray()
Default constructor.
Definition arrays.h:294
TwoDArray< T > & operator=(const TwoDArray< T > &rhs)
Assignment =.
Definition arrays.h:430
int LastY() const
Returns the index of the first element of a column.
Definition arrays.h:377
void Fill(T val)
Fill contents.
Definition arrays.h:482
int m_first_x
Definition arrays.h:386
int m_length_x
Definition arrays.h:392
int FirstX() const
Returns the index of the first element of a row.
Definition arrays.h:368
element_type & operator[](const int pos)
Element access.
Definition arrays.h:352
virtual ~TwoDArray()
Destructor.
Definition arrays.h:313
void FreeData()
Free all the allocated data.
Definition arrays.h:546
const element_type & operator[](const int pos) const
Element access.
Definition arrays.h:359
int LengthY() const
Returns the height.
Definition arrays.h:365
element_type * m_array_of_rows
Definition arrays.h:395
void Resize(const int height, const int width)
Resizes the array, deleting the current data.
Definition arrays.h:489
int m_last_x
Definition arrays.h:389
void Init(const int height, const int width)
Initialise the array.
Definition arrays.h:502
int m_first_y
Definition arrays.h:387
T * element_type
Definition arrays.h:286
TwoDArray(const TwoDArray< T > &Cpy)
Copy constructor.
Definition arrays.h:409
int FirstY() const
Returns the index of the first element of a column.
Definition arrays.h:371
int m_length_y
Definition arrays.h:393
TwoDArray(const int height, const int width, T val)
Constructor.
Definition arrays.h:402
int m_last_y
Definition arrays.h:390
OneDArray< T > & operator=(const OneDArray< T > &rhs)
Assignment=.
Definition arrays.h:200
void FreePtr()
Definition arrays.h:264
void Init(const Range &r)
Definition arrays.h:243
OneDArray(const int len)
'Length' constructor.
Definition arrays.h:173
OneDArray(const OneDArray< T > &cpy)
Copy constructor.
Definition arrays.h:185
void Resize(int l)
Resize the array, throwing away the current data.
Definition arrays.h:221
OneDArray(const Range &r)
Range constructor.
Definition arrays.h:179
void Init(const int len)
Definition arrays.h:234
OneDArray()
Default constructor.
Definition arrays.h:167
MVector * element_type
Definition arrays.h:286