From c5e253a9f9d3d651227ccad56e2c7526ee1f3eba Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 20 Apr 2023 17:27:21 +0100 Subject: Reorganise the dsf API into three kinds of dsf. This is preparing to separate out the auxiliary functionality, and perhaps leave space for making more of it in future. The previous name 'edsf' was too vague: the 'e' stood for 'extended', and didn't say anything about _how_ it was extended. It's now called a 'flip dsf', since it tracks whether elements in the same class are flipped relative to each other. More importantly, clients that are going to use the flip tracking must say so when they allocate the dsf. And Keen's need to track the minimal element of an equivalence class is going to become a non-default feature, so there needs to be a new kind of dsf that specially tracks those, and Keen will have to call it. While I'm here, I've renamed the three dsf creation functions so that they start with 'dsf_' like all the rest of the dsf API. --- grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'grid.c') diff --git a/grid.c b/grid.c index 28e0575..7b4f9ac 100644 --- a/grid.c +++ b/grid.c @@ -404,7 +404,7 @@ static void grid_trim_vigorously(grid *g) * Now identify connected pairs of landlocked dots, and form a dsf * unifying them. */ - dsf = snew_dsf(g->num_dots); + dsf = dsf_new(g->num_dots); for (i = 0; i < g->num_dots; i++) for (j = 0; j < i; j++) if (dots[i] && dots[j] && -- cgit v1.1