コード例 #1
0
ファイル: segment.hpp プロジェクト: milchakov/omim
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();
}
コード例 #2
0
ファイル: cross_mwm_graph.cpp プロジェクト: milchakov/omim
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;
  }
}
コード例 #3
0
 // 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;
 }