64 for (
int i = 0; i < nInitialSize; i++)
106 printf(
"error: tried to set size smaller than current size in CDynamicArray::SetSize\n");
119 for (i = m_nElements; i < nSize; i++)
134 pElement->
bDelete = bManageMemory;
170 int nIndex, nElementsDeleted = 0;
178 return nElementsDeleted;
205 float best_error = 9999999;
212 if (error < best_error)
222 fResultError = best_error;
CDynamicArrayElement * FindBestMatch(const CDynamicArrayElement *pElement, float &fResultError)
int DeleteAllMatches(const CDynamicArrayElement *pElement)
bool DeleteElement(int nIndex)
bool AddElement(CDynamicArrayElement *pElement, bool bAddUniqueOnly=false, bool bManageMemory=true)
int DeleteFirstMatch(const CDynamicArrayElement *pElement)
CDynamicArrayElement * FindFirstMatch(const CDynamicArrayElement *pElement)
void DontManageMemory(int nElement)
int _FindFirstMatch(const CDynamicArrayElement *pElement)
CDynamicArray(int nInititalSize)
CDynamicArrayElement ** m_ppElements
virtual bool Equivalent(const CDynamicArrayElement *pElement) const
virtual float Error(const CDynamicArrayElement *pElement) const