luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
338 stars 20 forks source link

Do not check for directedness in every smoothing iteration #182

Closed luukvdmeer closed 2 years ago

luukvdmeer commented 2 years ago

From #179:

I noticed that this check https://github.com/luukvdmeer/sfnetworks/blob/10b009e9d112d50c4f95c326b92864c1eb4f6ba6/R/morphers.R#L589 happens in every row for lapply. I think you could assume that the graph doesn't change directedness inside the lapply, and wrap the two different find_edges functions into the two different branches of that if?