Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weight matrices #17

Open
gdalle opened this issue Sep 28, 2023 · 4 comments
Open

Weight matrices #17

gdalle opened this issue Sep 28, 2023 · 4 comments
Labels
question Further information is requested

Comments

@gdalle
Copy link
Member

gdalle commented Sep 28, 2023

Do they still make sense?
Should weights be defined even for edges that don't exist?

@gdalle
Copy link
Member Author

gdalle commented Sep 28, 2023

@CameronBieganek
Copy link

I think it's probably best to leave the interface generic, so something like weight(g, e) seems good.

Should weights be defined even for edges that don't exist?

Probably not? But I'm not really an expert on graph algorithms, so I can't say for sure.

@gdalle
Copy link
Member Author

gdalle commented Oct 3, 2023

Should weights be defined even for edges that don't exist?

The question arises because in Graphs.jl, the default weight matrix is basically a FillArrays.Ones, which returns 1 for every query even when the edge does not exist. I don't like that.

@gdalle
Copy link
Member Author

gdalle commented Oct 3, 2023

I think it's probably best to leave the interface generic, so something like weight(g, e) seems good.

Yes, and it's consistent with a remark by @mtfishman about separating the data from the edge (as in, weight(e) is less flexible)

@gdalle gdalle added the question Further information is requested label Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants