private List <Guid> GetPassThroughNodes(ConduitSegmentInfo conduitSegment, WalkOfInterestInfo conduitWalkOfInterest) { List <Guid> result = new List <Guid>(); // Get pass through node candidates (the ones that the segment don't start or end at) HashSet <Guid> passThroughNodeCandidatess = new HashSet <Guid>(); foreach (var nodeId in conduitWalkOfInterest.AllNodeIds) { if (!(conduitSegment.FromRouteNodeId == nodeId || conduitSegment.ToRouteNodeId == nodeId)) { passThroughNodeCandidatess.Add(nodeId); } } var segmentWalkNodes = conduitWalkOfInterest.SubWalk2(conduitSegment.FromRouteNodeId, conduitSegment.ToRouteNodeId).AllNodeIds; foreach (var segmentWalkNode in segmentWalkNodes) { if (passThroughNodeCandidatess.Contains(segmentWalkNode)) { result.Add(segmentWalkNode); } } return(result); }
private List <Guid> GetPassThroughRouteSegments(FiberSegmentInfo fiberSegment, WalkOfInterestInfo conduitWalkOfInterest) { List <Guid> result = new List <Guid>(); // Get pass through segment candidates (the ones that the segment don't start or end at) HashSet <Guid> passThroughSegmentCandidatess = new HashSet <Guid>(); foreach (var segmentId in conduitWalkOfInterest.AllSegmentIds) { passThroughSegmentCandidatess.Add(segmentId); } var segmentWalkSegments = conduitWalkOfInterest.SubWalk2(fiberSegment.FromRouteNodeId, fiberSegment.ToRouteNodeId).AllSegmentIds; foreach (var segmentWalk in segmentWalkSegments) { if (passThroughSegmentCandidatess.Contains(segmentWalk)) { result.Add(segmentWalk); } } return(result); }