assert(n_edges == graph->sources[graph->n]);
graph->sources[n_nodes] = n_edges;
- if (model == MODEL_SHORTPATH || model == MODEL_MDS) {
- // TODO: fix MDS
+ if (model == MODEL_SHORTPATH) {
+ // do nothing
} else if (model == MODEL_SUBSET) {
// i,j,k refer to actual node indices, while x,y refer to edge indices in graph->targets
int i;
free(neighbours_i);
free(neighbours_j);
} else {
- assert(false); // circuit model not supported
+ // TODO: model == MODEL_MDS and MODEL_CIRCUIT
+ assert(false); // mds and circuit model not supported
}
return graph;
}
int model /* distance model */)
{
if (model == MODEL_CIRCUIT) {
- agerr(AGWARN, "circuit model not yet supported in Gmode=sgd, reverting to MDS model\n");
- model = MODEL_MDS;
+ agerr(AGWARN, "circuit model not yet supported in Gmode=sgd, reverting to shortpath model\n");
+ model = MODEL_SHORTPATH;
+ }
+ if (model == MODEL_MDS) {
+ agerr(AGWARN, "mds model not yet supported in Gmode=sgd, reverting to shortpath model\n");
+ model = MODEL_SHORTPATH;
}
int n = agnnodes(G);