Append all pathValue weights to route.
| 230 | |
| 231 | // Append all pathValue weights to route. |
| 232 | void Foam::router::storeRoute |
| 233 | ( |
| 234 | const label startNodeI, |
| 235 | const label prevNodeI, |
| 236 | const label pathValue, |
| 237 | DynamicList<label>& route |
| 238 | ) const |
| 239 | { |
| 240 | const labelList& myNeighbours = connections_[startNodeI]; |
| 241 | |
| 242 | forAll(myNeighbours, neighbourI) |
| 243 | { |
| 244 | label nodeI = myNeighbours[neighbourI]; |
| 245 | |
| 246 | if (nodeI != prevNodeI) |
| 247 | { |
| 248 | if (weights_[nodeI] == pathValue) |
| 249 | { |
| 250 | route.append(nodeI); |
| 251 | |
| 252 | storeRoute |
| 253 | ( |
| 254 | nodeI, |
| 255 | startNodeI, |
| 256 | pathValue, |
| 257 | route |
| 258 | ); |
| 259 | } |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | |
| 265 | // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // |