Re: Lazy Range of Graph Links

2016-02-16 Thread Nordlöw via Digitalmars-d-learn
On Tuesday, 16 February 2016 at 08:45:42 UTC, Andrea Fontana wrote: Something like this: http://dpaste.dzfl.pl/de73cb4e7ac0 ? Thanks. Note that this can be simplified by using a variadic version of zip...

Re: Lazy Range of Graph Links

2016-02-16 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 16 February 2016 at 08:04:29 UTC, Nordlöw wrote: In my knowledge hypergraph I currently have a struct Path { Node start; Step[] steps; } struct Step { Fact fact; Node node; } where Node and Fact a reference types (class). I now want to implement auto byLink(Path p

Lazy Range of Graph Links

2016-02-16 Thread Nordlöw via Digitalmars-d-learn
In my knowledge hypergraph I currently have a struct Path { Node start; Step[] steps; } struct Step { Fact fact; Node node; } where Node and Fact a reference types (class). I now want to implement auto byLink(Path path); so that it returns a lazy range of Links where struct