Open thk686 opened 1 year ago
I'm quite lost with the defaults. I thought it works like
idx_t options[METIS_NOPTIONS];
METIS_SetDefaultOptions(options);
But all values I check, including options[METIS_OPTION_NUMBERING]
, are set to -1?!
Indeed:
int METIS_SetDefaultOptions(idx_t *options)
{
iset(METIS_NOPTIONS, -1, options);
return METIS_OK;
}
Looks like its zero:
ctrl->numflag = GETOPTION(options, METIS_OPTION_NUMBERING, 0);
So It appears that -1 in the options indicates to use the default rather than being the default. The confusing part is that all the options are copied into the ctrl
structure.
That makes indeed sense if the defaults are selected depending on the actual data (now or in the future).
Thanks for the clarifications via code quotes.
For such an important value (a sure-fire way to segfault if you get it wrong), it is remarkable how difficult it is to figure out the default value of this parameter in the documentation and even when searching the code.