Exemple #1
0
inline std::string DebugPrint(Segment const & segment)
{
  std::ostringstream out;
  out << std::boolalpha << "Segment(" << segment.GetMwmId() << ", " << segment.GetFeatureId() << ", "
      << segment.GetSegmentIdx() << ", " << segment.IsForward() << ")";
  return out.str();
}
Exemple #2
0
void CrossMwmGraph::GetTwinFeature(Segment const & segment, bool isOutgoing, vector<Segment> & twins)
{
  std::vector<uint32_t> const & transitSegmentIds =
    m_crossMwmIndexGraph.GetTransitSegmentId(segment.GetMwmId(), segment.GetFeatureId());

  for (auto transitSegmentId : transitSegmentIds)
  {
    Segment const transitSegment(segment.GetMwmId(), segment.GetFeatureId(),
                                 transitSegmentId, segment.IsForward());

    if (!IsTransition(transitSegment, isOutgoing))
      continue;

    GetTwins(transitSegment, isOutgoing, twins);
    break;
  }
}
 // Can not check segment for fake or not with segment.IsRealSegment(), because all segments
 // have got fake m_numMwmId during mwm generation.
 bool IsRealSegment(Segment const & segment) const
 {
   return segment.GetFeatureId() != FakeFeatureIds::kIndexGraphStarterId;
 }