This project contains a MATLAB package containing a MEX interface to the C program Cliquer, which contains a collection of optimized routines for finding cliques in graphs. A (very slightly) modified version of the Cliquer project is included here for convenience (and because a slight modification was required to make the MEX compiler happy on my machine).
Additional README and LICENSE files for Cliquer can be found in the directory +Cliquer/cliquer/. This project currently utilizes only a small subset of Cliquer's functionality (specifically a portion dealing with unweighted graphs).
-
Ensure that your MEX compiler is functioning. You can test this by entering the directory
+Cliquer/mex_test/in MATLAB and executing the commandmex hello_world.c. If that command produces an error, then your MEX compiler is not functioning properly. Otherwise, the command should produce a MEX functionhello_world.mex<suffix>, where<suffix>depends on your OS; now, executing the MATLAB commandhello_worldshould produce the outputHello, World!. -
Ensure that the
+Cliquerdirectory is a subdirectory of a directory in your MATLAB path. Do not add the+Cliquerdirectory to your MATLAB path. -
Execute make.m from within this repository to compile the mex files
% Running make.m
make-
Cliquer's functionality can now be accessed with the command
Cliquer.FindAll, and documentation can be accessed withhelp Cliquer.FindAll. -
Check installation using the following example
A = eye(10);
[ncliques mtxcliques] = Cliquer.FindAll(A,2,2,false,1000);- Be sure to make check that your input is a symmetric matrix using
issymmetric(A). Otherwise running this program results in a segmentation fault.