First time here? Check out the FAQ!

Ask Your Question
0

Functions source code

asked 0 years ago

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.

Preview: (hide)

Comments

How did you install Sage ? And on which platform ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 0 years ago )
1

Alternative to try:

sage: G=Graph()
sage: ??G.is_isomorphic
Max Alekseyev gravatar imageMax Alekseyev ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 0 years ago

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.

Preview: (hide)
link

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: 0 years ago

Seen: 203 times

Last updated: May 02 '24