//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
template<class T>
void MemArray<T>::writeOnPlace(std::size_t id, T element0, const T *others, std::size_t sizeOfOthers)
{
template<class T>
void MemArray<T>::writeOnPlace(std::size_t id, T element0, const T *others, std::size_t sizeOfOthers)
{
std::copy(others,others+sizeOfOthers,pointer+id+1);
_nb_of_elem=std::max<std::size_t>(_nb_of_elem,id+sizeOfOthers+1);
}
std::copy(others,others+sizeOfOthers,pointer+id+1);
_nb_of_elem=std::max<std::size_t>(_nb_of_elem,id+sizeOfOthers+1);
}
template<class T>
template<class InputIterator>
void MemArray<T>::insertAtTheEnd(InputIterator first, InputIterator last)
template<class T>
template<class InputIterator>
void MemArray<T>::insertAtTheEnd(InputIterator first, InputIterator last)
template<class T>
void MemArray<T>::fillWithValue(const T& val)
{
T *pt=_pointer.getPointer();
std::fill(pt,pt+_nb_of_elem,val);
}
template<class T>
void MemArray<T>::fillWithValue(const T& val)
{
T *pt=_pointer.getPointer();
std::fill(pt,pt+_nb_of_elem,val);
}
_nb_of_elem=nbOfElements;
_nb_of_elem_alloc=nbOfElements;
_pointer.setInternal((T*)malloc(_nb_of_elem_alloc*sizeof(T)));
_nb_of_elem=nbOfElements;
_nb_of_elem_alloc=nbOfElements;
_pointer.setInternal((T*)malloc(_nb_of_elem_alloc*sizeof(T)));