CLAM::Array< T > Class Template Reference

#include <Array.hxx>

List of all members.

Public Member Functions

 Array (TSize size=0, TSize step=1)
void Init ()
 Array (T *ptr, int size=0)
 Array (const Array< T > &originalArray)
 ~Array ()
const char * GetClassName () const
 Return the class name.
bool OwnsMemory () const
bool Empty () const
TSize Size (void) const
TSize SizeInBytes (void) const
TSize AllocatedSize (void) const
TSize AllocatedSizeInBytes (void) const
void SetSize (TSize size)
void SetStep (TSize step)
TSize GetStep () const
void Resize (TSize newAllocSize)
const T * GetPtr (void) const
T * GetPtr (void)
void SetPtr (T *ptr, int size=0)
void GiveChunk (int pos, int size, Array< T > &) const
void CopyChunk (int pos, int size, Array< T > &) const
const T & operator[] (const int &i) const
T & operator[] (const int &i)
void AddElem (const T &elem)
void InsertElem (int where, const T &elem)
void SetElem (int where, const T &elem)
void DeleteElem (int where)
Array< T > & operator= (const Array< T > &src)
Array< T > & operator+= (const Array< T > &src)
void Apply (T(*f)(T))
void Apply (T(*f)(T, int), int parameter)
void StoreOn (Storage &storage) const
 Stores component's subitems on the given Storage.
void LoadFrom (Storage &storage)
 Loads component's subitems from the given Storage.

Static Public Attributes

static const char * msgSetSizeOutOfRange
static const char * msgIndexOutOfRange
static const char * msgInsertOutOfRange
static const char * msgDeleteOutOfRange

Detailed Description

template<class T>
class CLAM::Array< T >

Definition at line 49 of file Array.hxx.


Constructor & Destructor Documentation

template<class T>
CLAM::Array< T >::Array ( TSize  size = 0,
TSize  step = 1 
) [inline]

Definition at line 57 of file Array.hxx.

template<class T>
CLAM::Array< T >::Array ( T *  ptr,
int  size = 0 
) [inline]

Definition at line 70 of file Array.hxx.

template<class T>
CLAM::Array< T >::Array ( const Array< T > &  originalArray  )  [inline]

Definition at line 80 of file Array.hxx.

template<class T>
CLAM::Array< T >::~Array (  )  [inline]

Definition at line 87 of file Array.hxx.


Member Function Documentation

template<class T>
void CLAM::Array< T >::AddElem ( const T &  elem  )  [inline]
template<class T>
TSize CLAM::Array< T >::AllocatedSize ( void   )  const [inline]
template<class T>
TSize CLAM::Array< T >::AllocatedSizeInBytes ( void   )  const [inline]

Definition at line 101 of file Array.hxx.

template<class T>
void CLAM::Array< T >::Apply ( T(*)(T, int f,
int  parameter 
) [inline]

Definition at line 274 of file Array.hxx.

template<class T>
void CLAM::Array< T >::Apply ( T(*)(T)  f  )  [inline]

Definition at line 267 of file Array.hxx.

template<class T>
void CLAM::Array< T >::CopyChunk ( int  pos,
int  size,
Array< T > &  a 
) const [inline]

Definition at line 420 of file Array.hxx.

References CLAM_ASSERT.

template<class T>
void CLAM::Array< T >::DeleteElem ( int  where  )  [inline]
template<class T>
bool CLAM::Array< T >::Empty (  )  const [inline]

Definition at line 96 of file Array.hxx.

template<class T>
const char* CLAM::Array< T >::GetClassName (  )  const [inline, virtual]

Return the class name.

Implements CLAM::Component.

Definition at line 93 of file Array.hxx.

template<class T>
T* CLAM::Array< T >::GetPtr ( void   )  [inline]

Definition at line 154 of file Array.hxx.

template<class T>
const T* CLAM::Array< T >::GetPtr ( void   )  const [inline]
template<class T>
TSize CLAM::Array< T >::GetStep (  )  const [inline]

Definition at line 118 of file Array.hxx.

Referenced by CLAM::BPFTmpl< TData, TData >::GetStep().

template<class T>
void CLAM::Array< T >::GiveChunk ( int  pos,
int  size,
Array< T > &  a 
) const [inline]

Definition at line 412 of file Array.hxx.

References CLAM_ASSERT, and CLAM::Array< T >::SetPtr().

template<class T>
void CLAM::Array< T >::Init (  )  [inline]

Definition at line 66 of file Array.hxx.

template<class T>
void CLAM::Array< T >::InsertElem ( int  where,
const T &  elem 
) [inline]

Definition at line 198 of file Array.hxx.

Referenced by CLAM::BPFTmpl< TX, TY >::Insert().

template<class T>
void CLAM::Array< T >::LoadFrom ( Storage storage  )  [inline, virtual]

Loads component's subitems from the given Storage.

Parameters:
storage The given storage where the subitem will be loaded from
See also:
Storage

Implements CLAM::Component.

Definition at line 285 of file Array.hxx.

Referenced by CLAM::Segmentation::LoadFrom().

template<class T>
Array<T>& CLAM::Array< T >::operator+= ( const Array< T > &  src  )  [inline]

Definition at line 257 of file Array.hxx.

template<class T>
Array<T>& CLAM::Array< T >::operator= ( const Array< T > &  src  )  [inline]

Definition at line 227 of file Array.hxx.

template<class T>
T& CLAM::Array< T >::operator[] ( const int i  )  [inline]

Definition at line 182 of file Array.hxx.

template<class T>
const T& CLAM::Array< T >::operator[] ( const int i  )  const [inline]

Definition at line 175 of file Array.hxx.

template<class T>
bool CLAM::Array< T >::OwnsMemory (  )  const [inline]
template<class T>
void CLAM::Array< T >::Resize ( TSize  newAllocSize  )  [inline]
template<class T>
void CLAM::Array< T >::SetElem ( int  where,
const T &  elem 
) [inline]

Definition at line 209 of file Array.hxx.

template<class T>
void CLAM::Array< T >::SetPtr ( T *  ptr,
int  size = 0 
) [inline]

Definition at line 156 of file Array.hxx.

Referenced by CLAM::Audio::GetAudioSlice(), and CLAM::Array< T >::GiveChunk().

template<class T>
void CLAM::Array< T >::SetSize ( TSize  size  )  [inline]
template<class T>
void CLAM::Array< T >::SetStep ( TSize  step  )  [inline]

Definition at line 116 of file Array.hxx.

Referenced by CLAM::BPFTmpl< TData, TData >::SetStep().

template<class T>
TSize CLAM::Array< T >::Size ( void   )  const [inline]

Definition at line 98 of file Array.hxx.

Referenced by CLAM::AssertProperSize(), CLAM::BPFTmpl< TX, TY >::BPFSplineInt(), CLAM::BPFTmpl< TX, TY >::BPFTmpl(), CLAM::Dispatcher::ConcreteConfigure(), CLAM::ConvertToBPF(), CLAM::BPFTmpl< TX, TY >::CreateSplineTable(), CLAM::WindowGenerator::Do(), CLAM::SynthSineSpectrum::Do(), CLAM::LPC_AutoCorrelation::Do(), CLAM::FundFreqDetect::Do(), CLAM::EnvelopeGenerator::Do(), CLAM::CircularShift::Do(), CLAM::FillBuffer(), CLAM::MIDI2Melody::FindNote(), CLAM::SpectralPeakArray::GetFirstNonValidIndexPosition(), CLAM::CleanTracks::GetnCleanedTracks(), CLAM::SpectralPeakArray::GetnIndexedPeaks(), CLAM::SpectralPeakArray::GetPositionFromIndex(), CLAM::BPFTmpl< TX, TY >::Insert(), CLAM::Segmentation::LoadFrom(), CLAM::ComplexMaxElement< abs, FrameDescriptors >::operator()(), CLAM::ComplexMinElement< abs, FrameDescriptors >::operator()(), CLAM::CentralMoment< 4, abs, TData, TData >::operator()(), CLAM::BiasedPoweredSum< o, abs, T, U >::operator()(), CLAM::GeometricMeanTmpl< FrameDescriptors, FrameDescriptors >::operator()(), CLAM::CenterOfGravity< 1, abs, T, U >::operator()(), CLAM::Moment< 1, abs, FrameDescriptors, FrameDescriptors >::operator()(), CLAM::CrossWeightedPoweredSum< o, abs, T >::operator()(), CLAM::WeightedPoweredSum< o, abs, T >::operator()(), CLAM::InnerProductTmpl< T >::operator()(), CLAM::LogSumTmpl< FrameDescriptors >::operator()(), CLAM::PoweredSum< o, abs, T >::operator()(), CLAM::Array< TGuide >::operator+=(), CLAM::Array< TGuide >::operator=(), CLAM::operator==(), CLAM::IntervalAmplitudeAverages::Reconfigure(), CLAM::LinearMapping::Set(), CLAM::NoteToFreqMapping::Set(), CLAM::ValueToRatioMapping::Set(), CLAM::BPFTmpl< TData, TData >::Size(), and CLAM::SMSTransformationChain::TurnOn().

template<class T>
TSize CLAM::Array< T >::SizeInBytes ( void   )  const [inline]

Definition at line 99 of file Array.hxx.

template<class T>
void CLAM::Array< T >::StoreOn ( Storage storage  )  const [inline, virtual]

Stores component's subitems on the given Storage.

Parameters:
storage The given storage where the subitem will be stored
See also:
Storage

Implements CLAM::Component.

Definition at line 281 of file Array.hxx.

Referenced by CLAM::Segmentation::StoreOn().


Member Data Documentation

template<class T>
const char * CLAM::Array< T >::msgDeleteOutOfRange [inline, static]
Initial value:
 
"Array::DeleteElem: Index out of range"

Definition at line 295 of file Array.hxx.

Referenced by CLAM::Array< TGuide >::DeleteElem().

template<class T>
const char * CLAM::Array< T >::msgIndexOutOfRange [inline, static]
Initial value:
"Array::operator[]: Index out of range\n"
"This may happen if you forgot to call SetSize(...) in your code.\n"
"This is now needed. Just calling Resize() is not enough any more."

Definition at line 293 of file Array.hxx.

Referenced by CLAM::Array< TGuide >::operator[](), and CLAM::Array< TGuide >::SetElem().

template<class T>
const char * CLAM::Array< T >::msgInsertOutOfRange [inline, static]
Initial value:
 
"Array::InsertElem: Index out of range"

Definition at line 294 of file Array.hxx.

Referenced by CLAM::Array< TGuide >::InsertElem().

template<class T>
const char * CLAM::Array< T >::msgSetSizeOutOfRange [inline, static]
Initial value:
"Array::SetSize(): Argument larger than allocated size\n"
"You can probably fix this calling Resize() befor SetSize()."

Definition at line 292 of file Array.hxx.

Referenced by CLAM::Array< TGuide >::SetSize().


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.3