Fix for interpolation class. KDTree leaf counting fix.
This commit is contained in:
parent
36cd54193f
commit
f4aac855a2
@ -75,6 +75,8 @@ const Interpolate& Interpolate::operator=(const Interpolate& a)
|
|||||||
spline = gsl_spline_alloc (gsl_interp_linear, a.spline->size);
|
spline = gsl_spline_alloc (gsl_interp_linear, a.spline->size);
|
||||||
accel_interp = gsl_interp_accel_alloc ();
|
accel_interp = gsl_interp_accel_alloc ();
|
||||||
gsl_spline_init(spline, a.spline->x, a.spline->y, a.spline->size);
|
gsl_spline_init(spline, a.spline->x, a.spline->y, a.spline->size);
|
||||||
|
logx = a.logx;
|
||||||
|
logy = a.logy;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Interpolate::getMaxX() const
|
double Interpolate::getMaxX() const
|
||||||
|
@ -70,9 +70,11 @@ namespace CosmoTool {
|
|||||||
uint32_t getNumberInNode(const Node *n) const { return n->numNodes; }
|
uint32_t getNumberInNode(const Node *n) const { return n->numNodes; }
|
||||||
#else
|
#else
|
||||||
uint32_t getNumberInNode(const Node *n) const {
|
uint32_t getNumberInNode(const Node *n) const {
|
||||||
|
if (n->leaf)
|
||||||
|
return 1;
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return 0;
|
return 0;
|
||||||
return 1+getNumberInNode(n->children[0])+getNumberInNode(n->children[1]);
|
return getNumberInNode(n->children[0])+getNumberInNode(n->children[1]);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ using namespace std;
|
|||||||
#define POWER_BDM 7
|
#define POWER_BDM 7
|
||||||
#define POWER_TEST 8
|
#define POWER_TEST 8
|
||||||
|
|
||||||
#define POWER_SPECTRUM HU_BARYON
|
#define POWER_SPECTRUM HU_WIGGLES
|
||||||
|
|
||||||
namespace Cosmology {
|
namespace Cosmology {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user