Closed lichengzhang2 closed 1 month ago
To count size-$k$ cliques, use IGCliqueSizeCounts[graph, {k}]
.
I'm afraid I don't quite understand the question. Restricting the search to size-$k$ cliques only should be faster than doing the search for all cliques and then taking the result for size-$k$ only.
Thank you! I hadn't noticed the option you mention. I thought it must provide the number of cliques of every size, and then select the number of cliques of size $k$ . Now I think it is not the case.
IGCliqueSizeCounts
can compute the number of all k-cliques, but if I only want the count of cliques of a fixed size, I feel that usingIGCliqueSizeCounts[graph][k]
is well but it might lead to overcounting additional cliques.I'm wondering whether calculating the number of k-cliques depends on the sizes of other cliques in your function.