MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / alloc

Method alloc

Regression/DenseVector.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35void DenseVector::alloc(const int sz)
36{
37 if (size > 0 && size != sz) release(&val);
38 size = sz;
39 val = new double[ sz ];
40 if (!val)
41 {
42 error("Error: fail to allocate memory");
43 }
44 rlse = false;
45
46 reset();
47}
48
49DenseVector::~DenseVector()
50{

Callers 3

timesMatrixMethod · 0.45
timesSquareMatrixMethod · 0.45
squareTimesColumnMethod · 0.45

Calls 2

releaseFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected