Find all simple paths from source to target. e.g., for one of the paths, `source --> instance1 --> instance2 --> target`, the return is [source, instance1, instance2, target].
(&self, source: InstanceId, target: InstanceId)
| 150 | |
| 151 | /// Find all simple paths from source to target. |
| 152 | /// e.g., for one of the paths, `source --> instance1 --> instance2 --> target`, |
| 153 | /// the return is [source, instance1, instance2, target]. |
| 154 | pub fn all_simple_paths(&self, source: InstanceId, target: InstanceId) -> Vec<Vec<InstanceId>> { |
| 155 | algo::all_simple_paths::<Vec<_>, _>(&self.graph, source, target, 0, None) |
| 156 | .collect::<Vec<_>>() |
| 157 | } |
| 158 |