[Nauty] Calling densenauty Modifies the Graph

Saul Spatz saul.spatz at gmail.com
Wed May 3 08:09:04 AEST 2017


Hi,
Hi folks,

I'm trying to write my initial nauty application, and I'm having trouble.
On page 24 of the User's Guide, it says
graph ∗g: The input graph. Read-only.
in the description of the parameters to densenauty.  I took this to mean
that the graph would not be indirectly modified through the pointer.  Am I
wrong?

In my app, I want to call densenauty repeatedly on the same graph, with
different colorings.  However, the graph is changing.  I wrote the attached
file main.cpp, to isolate the problem.  I generate all trees of order 6
with gentreeg, and compute their line graphs in dense format.  I convert
the line graphs to sparse format and print them.  Then I call densenauty
and once again, convert the line graph to sparse format and print it.  Not
only has it changed, but it doesn't seem to make any sense.  You can see
this behavior in tree6.log, attached.

Am I doing something wrong in initializing the lab and ptn (which I've
called label and color) or has it something to do with writing in C++?

I'd appreciate any help you can give me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 3129 bytes
Desc: not available
URL: <http://mailman.anu.edu.au/pipermail/nauty/attachments/20170502/c454d4b1/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree6.log
Type: application/octet-stream
Size: 1633 bytes
Desc: not available
URL: <http://mailman.anu.edu.au/pipermail/nauty/attachments/20170502/c454d4b1/attachment.obj>


More information about the Nauty mailing list