Table from FlatTable

This commit is contained in:
Joachim Schoeberl 2022-12-12 20:03:17 +01:00
parent 6d539e0213
commit 52a71a5f76

View File

@ -143,6 +143,21 @@ namespace ngcore
data = new T[cnt]; data = new T[cnt];
} }
explicit NETGEN_INLINE Table (const FlatTable<T,IndexType> & tab2)
: FlatTable<T,IndexType>(0, nullptr, nullptr)
{
size = tab2.Size();
index = new size_t[size+1];
for (size_t i = 0; i <= size; i++)
index[i] = tab2.index[i];
size_t cnt = index[size];
data = new T[cnt];
for (size_t i = 0; i < cnt; i++)
data[i] = tab2.data[i];
}
explicit NETGEN_INLINE Table (const Table & tab2) explicit NETGEN_INLINE Table (const Table & tab2)
: FlatTable<T,IndexType>(0, nullptr, nullptr) : FlatTable<T,IndexType>(0, nullptr, nullptr)
{ {