Limit the Total Number of Paths

Hello,

Is is possible to limit the total number of paths between two given vertices/nodes
for a given graph? I mean, I could easily return all and select a subset of it, but it'd not be
efficient I guess. Is there a way to do that without returning all paths first?

I'm guessing you are talking about the all_paths() function, although that
function returns an iterator over paths, not all paths at once, allowing you
to abort it any time by stopping the iteration.

So, I'm not sure what you mean. If you want more meaningful help, please be
more concrete, with an example, etc.