igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] maximal_cliques_template.h: a way to stop the search?


From: Szabolcs Horvát
Subject: [igraph] maximal_cliques_template.h: a way to stop the search?
Date: Fri, 22 Apr 2016 12:33:47 +0200

Hello,

Maximal clique related functions are implemented (mostly) through
maximal_cliques_template.h.  There is a RECORD macro where we can
define how to record a clique that was found.  Is there a way to
signal within this RECORD section that the clique search does not need
to continue and the clique search function should now return (after
doing all the necessary cleanup)?

I want to have an analog of igraph_cliques_callback for maximal cliques:

https://github.com/igraph/igraph/blob/master/include/igraph_cliques.h#L106

I am trying to decide if I can re-use the callback function type
igraph_clique_handler_t

https://github.com/igraph/igraph/blob/master/include/igraph_cliques.h#L102

This callback function can signal when the search does not need to continue.

The function igraph_i_maximal_cliques() actually already does this,
but it is not public.  It takes a callback function as an argument.
That function can signal when the search should no longer continue.
But igraph_i_maximal_cliques is considerably slower than the
maximal_cliques_template.h implementation, so I wanted to avoid using
it.

Szabolcs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]