Ask Your Question
0

Functions source code

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

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

Comments

How did you install Sage ? And on which platform ?

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

Alternative to try:

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

1 Answer

Sort by » oldest newest most voted
1

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

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/generic_graph.py, so you can navigate to that file and search for the method: https://github.com/sagemath/sage/blob.... 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

Stats

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

Seen: 157 times

Last updated: May 02