graph theory commands for Giac

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » ven. janv. 11, 2019 3:35 pm

I did not try compiling with nauty the win32 version, because the gcc compiler is somewhat old. (I got some problems on an old debian with nautywrapper.c because gcc does not like for (int ...) constructs, probably a compiler flag to add before running the debian package maker, that's why I did not try on win32/cygwin)

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » ven. janv. 11, 2019 3:49 pm

Should I change the nautywrapper code to make it more convenient for gcc?

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » ven. janv. 11, 2019 7:54 pm

I don't think so, probably a good export CFLAGS = ... before calling dpkg-buildpackage should do that without changes.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » sam. janv. 12, 2019 8:21 am

Thanks. By the way, I updated my source, I had to make some corrections in the graph theory manual and also fixed a couple of bugs in lpsolve.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » mar. janv. 15, 2019 2:03 pm

I have successfully compiled on the old box, with CFLAGS += 'std=c99' in debian/rules
I hope everything is updated! By the way, can you update aide_cas on your side (I have added a few commands related to Groebner basis fine-tuning).

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » jeu. janv. 17, 2019 12:22 am

I've updated aide_cas/cascmd_en.tex, the latter also contains few minor corrections for minimize/maximize/extrema commands (I changed the output from sequence to list). I added purging of the temp variables for these commands in optimization.cc because I noticed that the output was not well defined sometimes. Purging variables after computation fixed the problem.
Xcas 32bits works on windows 7 with nauty, but GLPK is missing.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » jeu. janv. 17, 2019 4:36 pm

I have compiled the win32 version with GLPK in https://www-fourier.ujf-grenoble.fr/~pa ... asunst.exe, let me know if it's ok and I'll copy it in xcasinst.exe.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » jeu. janv. 17, 2019 10:32 pm

It works!
I also realized just now that I had accidentally removed bvpsolve code from optimization.cc some time ago. It's restored now, I've committed the fix...

[Edit] extrema command crashes in win7 with every example (everything's OK in Linux). Obviously some fixes are needed but i don't know how to trace a crash in Windows.
I have also noticed that the following commandline gives undef in Windows but the correct result -4*sqrt(2)-6 in Linux:

Code : Tout sélectionner

minimize(sqrt(x^2+y^2)-z,[x^2+y^2<=16,x+y+z=10],[x,y,z])
Again, I don't have an idea what's wrong.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » ven. janv. 18, 2019 12:07 pm

I have updated my source.
Everything seems normal for me on windows. I get the same answer for minimize on all 3 OS, and extrema does not crash (tried the first 3 examples). I checked with the 64 bits version.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » ven. janv. 18, 2019 12:44 pm

The version that crashes for me is the one pointed to by the link in your message above:
parisse a écrit :
jeu. janv. 17, 2019 4:36 pm
I have compiled the win32 version with GLPK in https://www-fourier.ujf-grenoble.fr/~pa ... asunst.exe, let me know if it's ok and I'll copy it in xcasinst.exe.
Nevermind, win7 is not officially supported any more anyway, I have it on my old machine. It's important that everything works in windows 10.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » jeu. févr. 14, 2019 2:28 pm

Hi,
I have committed a small fix for has_arc command. It hasn't been accepting vertex types other than integer.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » ven. févr. 15, 2019 3:53 pm

Strange, I didn't get any changes after doing git pull.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » ven. févr. 15, 2019 6:09 pm

There should be changes at lines 1148, 1176 and 1180 in graphtheory.cc. I pushed another commit today fixing a small bug in graphe.cc (line 2260 is inserted). I see those changes in my github repository. Try pulling it again, maybe it will work this time.

parisse
Messages : 5731
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: graph theory commands for Giac

Message par parisse » ven. févr. 15, 2019 7:16 pm

Yes, graphe.cc was updated.

lukamar
Messages : 331
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: graph theory commands for Giac

Message par lukamar » ven. févr. 15, 2019 7:34 pm

I made another small fix, this time in graphe::adjacent_nodes (duplicate vertex entries were produced). graphtheory.cc is also updated.

Répondre