Using .h files in Perl script

Questions and problems about using polymake go here.
jrei
Posts: 15
Joined: 31 Jan 2019, 15:37

Using .h files in Perl script

Postby jrei » 07 Mar 2019, 18:27

Dear Polymake Team,

Is it possible, and if yes how, to use the classes and methods implemented in the header files in "apps/graph/include" in a perl script or the interactive shell?

Kind regards,
JR

User avatar
gawrilow
Main Author
Posts: 423
Joined: 25 Dec 2010, 17:40

Re: Using .h files in Perl script

Postby gawrilow » 07 Mar 2019, 22:34

Some of them - yes, some others not. There is some gluing magic in place which has to be written for every C++ function and class in order to make them visible on the perl side.

To get an overview of what is already available from the interactive shell and scripts, you can browse the interactive help system. For example, change to application "graph" and enter help "functions/ or help "objects/ then use TAB completion to see the proposals. Or look at the release documentation at https://polymake.org/release_docs/latest/graph.html, it contains the same information.

If a function that you are looking for is missing, it will probably be possible to provide the missing glue, but it's a too vast topic to be explained in a single forum post. The general procedure is explained here: https://polymake.org/doku.php/user_guid ... on_to_perl for functions and here: https://polymake.org/doku.php/user_guid ... pe_binding for classes, but this stuff is more oriented at experienced polymake developers. Maybe you just ask concretely for things you need.

jrei
Posts: 15
Joined: 31 Jan 2019, 15:37

Re: Using .h files in Perl script

Postby jrei » 08 Mar 2019, 12:36

Thanks for the answer,
My Question was aimed at the different implementations of dijkstras shortest path algorithm. After checking i found them to be available as shortest_path_dijkstra.

Kind regards,
JR


Return to “Helpdesk”