First time here? Check out the FAQ!

Ask Your Question
1

Effective resistance matrix and nonedgesonly=True

asked 2 years ago

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.

Preview: (hide)

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 ( 2 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 2 years ago

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.

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

Seen: 199 times

Last updated: Aug 20 '22