[Nauty] Calling densenauty Modifies the Graph

Saul Spatz saul.spatz at gmail.com
Wed May 3 08:41:39 AEST 2017


I tried converting that program to C, and it produced exactly the same sort
of behavior.  (I didn't check that all the strange vertex numbers were the
same.)

On Tue, May 2, 2017 at 5:09 PM, Saul Spatz <saul.spatz at gmail.com> wrote:

> 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.
>


More information about the Nauty mailing list