Closed toyboot4e closed 1 week ago
Current arguable namings:
get
and set
-> read
/ write
They were renamed to follow array
/ vector
API. Or just because I wanted to do so. We can add modify
and exchange
if necessary.apply
overloads -> applyAt
and applyIn
In ac-library, they are apply
and apply_range
, but applyIn
can sound better.edges
-> edges
It creates new edges, so edges
makes sense.edges
-> edges
and unsafeEdges
They are actually freezeEdges
and unsafeFreezeEdges
, but I think the non-conventional names match MaxFlow.edges
and are ok.I didn’t intent to add extra modules, but if I do, I would add..
stimes
but maybe too much. Monoids can be added for simplicity, though.
While I'd like to follow
ac-libary
API, some have to be different.Overloaded functions
segtree
has two different constructors for example. The latter is calledbuild
inac-library-hs
.maxflow
andmincostflow
have two differentflow
functions. Ones without flow limits are not inac-library-hs
(putmaxBound
manually).Segment tree / Lazy segment tree While C++ can pass functions as type parameters, Haskell cannot. Use some type class.
Any more? In addition to
get
andset
(orread
andwrite
invector
),modify
andexchange
can be added.