Ask Your Question

Functions source code

asked 2024-05-02 09:57:19 +0200

I am currently engaged in the study of graph theory for my master's thesis. For my work, I need to use the functions is_isomorphic and is_subgraph. I want to gain a deeper understanding of the underlying code for these two functions.

However, when I attempt to access the documentation using the search_src() function, I receive the following warning message: "Warning: the Sage documentation is not available".

Could you kindly guide me to where I can find the source code of these functions?

I appreciate your assistance in advance.

Best regards.

edit retag flag offensive close merge delete


How did you install Sage ? And on which platform ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2024-05-02 17:28:17 +0200 )edit

Alternative to try:

sage: G=Graph()
sage: ??G.is_isomorphic
Max Alekseyev gravatar imageMax Alekseyev ( 2024-05-02 18:00:05 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2024-05-02 19:53:18 +0200

Two options: (1) as @MaxAlekseyev says, use ?? either before or after the item in question: ??G.is_isomorphic or G.is_isomorphic??. (2) You can read the whole source code by visiting GitHub. The documentation for the method (obtained by G.is_isomorphic? — single question mark) will list the file at the end, which in this case is src/sage/graphs/, so you can navigate to that file and search for the method: A possible disadvantage to using GitHub: this is the source code for the latest version of Sage, and so it may not match what you are using on your machine. My guess is that these particular methods are pretty stable, though.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2024-05-02 09:57:19 +0200

Seen: 94 times

Last updated: May 02