ac-library-rs icon indicating copy to clipboard operation
ac-library-rs copied to clipboard

Make the names of graph structs consistent

Open universato opened this issue 4 years ago • 2 comments

main

Now: SccGraph, MfGraph, MinCostFlowGraph

  • The name style of the struct is different.

Expected1: Scc(or SCC), MaxFlow, MinCostFlow

  • Short and readable.
  • Each struct name equals each file name.

Expected2: SccGraph, MaxFlowGraph, MinCostFlowGraph

  • Long but readable.
  • No other language library has adopted this idea.

Expected3: SccGraph, MfGraph, McfGraph

  • Too short, not readable (except for SccGraph).
  • These names are closest to the original C++ library.

All graph names need to be changed, but I prefer expected1.

Other data structures

In reference,

lang struct, impl file
Rust Dsu dsu URL
Rust SccGraph scc URL
Rust MfGraph maxflow URL
Rust MinCostFlowGraph mincostflow URL
Rust Segtree segtree URL
Rust LazySegtree lazysegtree URL
Rust TwoSat twosat URL
Rust ModInt modint URL

Other language libraries

In reference,

Lang SCC MaxFlow MinCostFlow
C++ scc_graph mf_graph mcf_graph
C# SccGraph MFGraph/MaxFlow.cs McfGraph/MinCostFlow.cs
Python SCCGprah MFGraph MCFGraph
Rust SccGraph MfGraph MinCostFlowGraph
Go SccGraph --- ---
D SccGraph MfGraph McfGraph
Java SCC MaxFlow MinCostFlow
Kotolin SCC MaxFlow MinCostFlow
Ruby SCC MaxFlow MinCostFlow
Crystal SCC MaxFlow MinCostFlow

universato avatar Jun 12 '21 17:06 universato

This is just renaming the names, so it may be worth considering before the language update.

TonalidadeHidrica avatar Mar 26 '23 20:03 TonalidadeHidrica

@TonalidadeHidrica @mizar I prefer "Expected2". What do you think?

qryxip avatar Apr 08 '23 10:04 qryxip