Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

PLearn::Array< T > Class Template Reference

#include <Array_decl.h>

Inheritance diagram for PLearn::Array< T >:

Inheritance graph
[legend]
Collaboration diagram for PLearn::Array< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T * iterator

Public Member Functions

 Array (int the_size=0, int extra_space=10)
 Array (const T &elem1)
 Array (const T &elem1, const T &elem2)
 Array (const Array< T > &other)
 Array (const TVec< T > &other)
 Array (const vector< T > &other)
 operator bool () const
 To allow if(v) statements.

bool operator! () const
 To allow if(!v) statements.

Array< T > subArray (int start, int len)
void clear ()
void operator= (const Array< T > &other)
void operator= (const TVec< T > &other)
 NOTE: operator= COPIES THE TVec STRUCTURE BUT NOT THE DATA (use operator<< to copy data).

void view (const TVec< T > &other)
 Makes this array a shared view of the given TVec.

bool operator== (const Array< T > &other) const
bool operator< (const Array< T > &other) const
bool operator<= (const Array< T > &other) const
bool operator> (const Array< T > &other) const
bool operator>= (const Array< T > &other) const
void operator= (const vector< T > &other)
void print (ostream &out) const
 the data is printed on a single row, no newline

int findFirstOccurence (const T &elem)
void makeDeepCopyFromShallowCopy (map< const void *, void * > &copies)
 Deep copy of an array is not the same as for a TVec, because the shallow copy automatically creates a new storage.

void write (ostream &out_) const
void read (istream &in_)
 operator char * () const
 used by Hash (VERY DIRTY: TO BE REMOVED [Pascal])

size_t byteLength () const

template<class T>
class PLearn::Array< T >


Member Typedef Documentation

template<class T>
typedef T* PLearn::Array< T >::iterator
 

Reimplemented from PLearn::TVec< T >.

Reimplemented in PLearn::VarArray.

Definition at line 79 of file Array_decl.h.


Constructor & Destructor Documentation

template<class T>
PLearn::Array< T >::Array int  the_size = 0,
int  extra_space = 10
[inline, explicit]
 

template<class T>
PLearn::Array< T >::Array const T &  elem1  )  [inline]
 

template<class T>
PLearn::Array< T >::Array const T &  elem1,
const T &  elem2
[inline]
 

template<class T>
PLearn::Array< T >::Array const Array< T > &  other  )  [inline]
 

template<class T>
PLearn::Array< T >::Array const TVec< T > &  other  )  [inline]
 

template<class T>
PLearn::Array< T >::Array const vector< T > &  other  )  [inline]
 


Member Function Documentation

template<class T>
size_t PLearn::Array< T >::byteLength  )  const [inline]
 

Reimplemented from PLearn::TVec< T >.

Definition at line 293 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::clear  )  [inline]
 

Definition at line 138 of file Array_decl.h.

Referenced by PLearn::rebalanceNClasses().

template<class T>
int PLearn::Array< T >::findFirstOccurence const T &  elem  )  [inline]
 

Definition at line 251 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::makeDeepCopyFromShallowCopy map< const void *, void * > &  copies  ) 
 

Deep copy of an array is not the same as for a TVec, because the shallow copy automatically creates a new storage.

Reimplemented from PLearn::TVec< T >.

Reimplemented in PLearn::VarArray.

Definition at line 222 of file Array_impl.h.

References PLearn::deepCopyField(), and PLearn::PP< Storage< T > >::isNotNull().

Referenced by PLearn::deepCopyField().

template<class T>
PLearn::Array< T >::operator bool  )  const [inline]
 

To allow if(v) statements.

Definition at line 119 of file Array_decl.h.

template<class T>
PLearn::Array< T >::operator char *  )  const [inline]
 

used by Hash (VERY DIRTY: TO BE REMOVED [Pascal])

Reimplemented from PLearn::TVec< T >.

Definition at line 288 of file Array_decl.h.

template<class T>
bool PLearn::Array< T >::operator!  )  const [inline]
 

To allow if(!v) statements.

Reimplemented from PLearn::TVec< T >.

Definition at line 123 of file Array_decl.h.

template<class T>
bool PLearn::Array< T >::operator< const Array< T > &  other  )  const [inline]
 

Definition at line 175 of file Array_decl.h.

template<class T>
bool PLearn::Array< T >::operator<= const Array< T > &  other  )  const [inline]
 

Definition at line 190 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::operator= const vector< T > &  other  )  [inline]
 

Definition at line 236 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::operator= const TVec< T > &  other  )  [inline]
 

NOTE: operator= COPIES THE TVec STRUCTURE BUT NOT THE DATA (use operator<< to copy data).

Reimplemented from PLearn::TVec< T >.

Definition at line 149 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::operator= const Array< T > &  other  )  [inline]
 

Definition at line 141 of file Array_decl.h.

template<class T>
bool PLearn::Array< T >::operator== const Array< T > &  other  )  const [inline]
 

Definition at line 163 of file Array_decl.h.

template<class T>
bool PLearn::Array< T >::operator> const Array< T > &  other  )  const [inline]
 

Definition at line 206 of file Array_decl.h.

template<class T>
bool PLearn::Array< T >::operator>= const Array< T > &  other  )  const [inline]
 

Definition at line 221 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::print ostream &  out  )  const [inline]
 

the data is printed on a single row, no newline

Reimplemented from PLearn::TVec< T >.

Definition at line 244 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::read istream &  in_  )  [inline]
 

Reimplemented in PLearn::VarArray.

Definition at line 281 of file Array_decl.h.

template<class T>
Array<T> PLearn::Array< T >::subArray int  start,
int  len
[inline]
 

Definition at line 126 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::view const TVec< T > &  other  )  [inline]
 

Makes this array a shared view of the given TVec.

Definition at line 158 of file Array_decl.h.

template<class T>
void PLearn::Array< T >::write ostream &  out_  )  const [inline]
 

Reimplemented in PLearn::VarArray.

Definition at line 265 of file Array_decl.h.


The documentation for this class was generated from the following files:
Generated on Tue Aug 17 16:22:33 2004 for PLearn by doxygen 1.3.7