mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
matrix
This commit is contained in:
parent
9ab799afde
commit
0c78fe56a7
@ -158,25 +158,29 @@ class MatrixFixWidth
|
||||
protected:
|
||||
int height;
|
||||
double * data;
|
||||
|
||||
bool ownmem;
|
||||
public:
|
||||
///
|
||||
MatrixFixWidth ()
|
||||
{ height = 0; data = 0; }
|
||||
{ height = 0; data = 0; ownmem = false; }
|
||||
///
|
||||
MatrixFixWidth (int h)
|
||||
{ height = h; data = new double[WIDTH*height]; }
|
||||
{ height = h; data = new double[WIDTH*height]; ownmem = true; }
|
||||
///
|
||||
MatrixFixWidth (int h, double * adata)
|
||||
{ height = h; data = adata; ownmem = false; }
|
||||
///
|
||||
~MatrixFixWidth ()
|
||||
{ delete [] data; }
|
||||
{ if (ownmem) delete [] data; }
|
||||
|
||||
void SetSize (int h)
|
||||
{
|
||||
if (h != height)
|
||||
{
|
||||
delete data;
|
||||
if (ownmem) delete data;
|
||||
height = h;
|
||||
data = new double[WIDTH*height];
|
||||
ownmem = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user