You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package has utilities like collectresidues and collectatoms. Because this allocates storage, it might be of interest to implement an alternative. I see two main options:
an iterator interface, e.g., EachResidue(struc) or EachAtom(struc). collectresidues could then be implemented as collectresidues(struc) = collect(EachResidue(struc)) but one could also perform other forms of processing (for r in EachResidue(struc) ... end).
a transducers interface, where foldxl is the core operation.
I have less personal experience with the latter, so left to my own devices I'd probably be tempted to implement the iterator version. But collectresidues/collectatoms are currently probably special cases of foldxl so generalizing them would be perfectly viable too.
The text was updated successfully, but these errors were encountered:
This package has utilities like
collectresidues
andcollectatoms
. Because this allocates storage, it might be of interest to implement an alternative. I see two main options:EachResidue(struc)
orEachAtom(struc)
.collectresidues
could then be implemented ascollectresidues(struc) = collect(EachResidue(struc))
but one could also perform other forms of processing (for r in EachResidue(struc) ... end
).foldxl
is the core operation.I have less personal experience with the latter, so left to my own devices I'd probably be tempted to implement the iterator version. But
collectresidues
/collectatoms
are currently probably special cases offoldxl
so generalizing them would be perfectly viable too.The text was updated successfully, but these errors were encountered: