Commit 3af709b8 authored by snuverink_j's avatar snuverink_j
Browse files

fix unitialised values: initialise reference for hypervolume calculation to the origin, for #235

parent 3b04e36b
......@@ -381,6 +381,10 @@ double Hypervolume::FromFile(std::string file)
// initialise the reference point
ref.objectives = (OBJECTIVE*) malloc(sizeof(OBJECTIVE) * maxn);
ref.tnode = (avl_node_t*) malloc(sizeof(avl_node_t));
// initialise to zero (origin)
for (int i = 0; i < maxn; i++) ref.objectives[i] = 0;
/*
if (argc == 2)
{printf("No reference point provided: using the origin\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment