Ask Your Question
1

Effective resistance matrix and nonedgesonly=True

asked 2022-08-19 23:39:17 +0100

Harry Richman gravatar image

For undirected graphs, there is a method effective_resistance_matrix() which returns the matrix whose (i,j) entry is the effective resistance between vertices i and j. The current implementation has an optional boolean parameter nonedgesonly=True, whose default behavior has the effect that if (i,j) are adjacent then the corresponding matrix entry is 0.

I was wondering, what was the reason behind the choice of default value for this nonedgesonly parameter? I haven't come across cases myself where this feels natural, and there are some nice theorems regarding the effective resistance matrix with nonedgesonly=False.

edit retag flag offensive close merge delete

Comments

This interesting question regards the implementation choices made by the pakage's author(s), is indeed a mathematical question but could nevertheless be adressed to these author(s) (probably via sage-support or sage-devel) with better chances of getting a good answer.

HTH,

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2022-08-20 13:12:59 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-08-20 14:03:31 +0100

slelievre gravatar image

That method was introduced in the file src/sage/graphs/graph.py as part of

which was merged in Sage 8.7.rc0.

Examples and tests all use nonedgesonly=False, yet nonegesonly=True was made the default.

That choice is therefore quite surprising indeed. Nobody raised that point in the ticket discussion.

Changing the default would make sense but might be tricky in terms of deprecation procedure.

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: 2022-08-19 23:39:17 +0100

Seen: 185 times

Last updated: Aug 20 '22