#5793: [with patch, needs work] New algorithm for Max Clique in Graph class
using
Cython
--------------------------+-------------------------------------------------
Reporter: ncohen | Owner: rlm
Type: enhancement | Status: closed
Priority: minor | Milestone: sage-4.1
Component: graph theory | Resolution: duplicate
Keywords: | Reviewer:
Author: | Merged:
--------------------------+-------------------------------------------------
Comment(by jason):
To get this going again, here are some specific suggestions for patch
12427.patch and the associated spkg:
* copy the header files to somewhere in $SAGE_LOCAL/include (maybe
$SAGE_LOCAL/include/cliquer/*.h
* Make a cliquer.pxd file that declares the necessary functions and
structs from the header files. Make sure that you are only doing cdef
externs from the header files, not the .c files like the patch is
currently doing. Don't include the path; just do {{{cdef extern from
"cliquer/graph.h":}}} since the header is in the include path. This
cliquer.pxd file can go into sage/graphs.
* Make a cliquer.pyx in sage/graphs that contains the definitions of
max_clique, all_max_clique, and clique_number. Document and add doctests
to these functions.
* Delete the lines
{{{
from sage.graphs.graph import Graph
#from distutils.core import setup
#from distutils.extension import Extension
from Cython.Distutils import build_ext
}}}
* In module_list.py, add a {{{libraries = ['cliquer']}}} option (see the
surrounding declarations for examples of this).
* Compile the cliquer sources into a shared library, named
libcliquer.so, using the instructions in the HowTo William posted. Place
this shared library into $SAGE_LOCAL/lib.
* In the graphs.py, I don't think you need to do {{{from
sage.graphs.cliquer import clique_number}}}. Since the module will be in
that directory, I think it would be sufficient to do {{{from cliquer
import clique_number}}}.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5793#comment:5>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---