Skip to content

what is the purpose of Phantom_node ?  #5626

Closed
@bsnyh

Description

@bsnyh

Hi, I found this PhantomNode struct really interesting. Yet, I was confused about the following piece of code except from the file phantom_node.hpp.

EdgeDistance GetForwardDistance() const
    {
        // .....                  <-- forward_distance
        //      ....              <-- offset
        // .........              <-- desired distance
        //         x              <-- this is PhantomNode.location
        // 0----1----2----3----4  <-- EdgeBasedGraph Node segments
        BOOST_ASSERT(forward_segment_id.enabled);
        return forward_distance + forward_distance_offset;
    }

    EdgeDistance GetReverseDistance() const
    {
        //            ..........  <-- reverse_distance
        //         ...            <-- offset
        //         .............  <-- desired distance
        //         x              <-- this is PhantomNode.location
        // 0----1----2----3----4  <-- EdgeBasedGraph Node segments
        BOOST_ASSERT(reverse_segment_id.enabled);
        return reverse_distance + reverse_distance_offset;
    }

I was wondering, where to find any explanations for this PhantomNode?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions