mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 14:10:34 +05:00
Table from FlatTable
This commit is contained in:
parent
6d539e0213
commit
52a71a5f76
@ -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)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user