vg
tools for working with variation graphs
Public Member Functions | Public Attributes | Private Attributes | List of all members
vg::PathOrientedDistanceMeasurer Class Reference

#include <cluster.hpp>

Inheritance diagram for vg::PathOrientedDistanceMeasurer:
vg::OrientedDistanceMeasurer

Public Member Functions

 PathOrientedDistanceMeasurer (const PathPositionHandleGraph *graph, const PathComponentIndex *path_component_index=nullptr)
 
 ~PathOrientedDistanceMeasurer ()=default
 Default desctructor. More...
 
int64_t oriented_distance (const pos_t &pos_1, const pos_t &pos_2)
 
vector< vector< size_t > > get_buckets (const function< pos_t(size_t)> &get_position, size_t num_items)
 
vector< pair< size_t, size_t > > exclude_merges (vector< vector< size_t >> &current_groups, const function< pos_t(size_t)> &get_position)
 
- Public Member Functions inherited from vg::OrientedDistanceMeasurer
virtual ~OrientedDistanceMeasurer ()=default
 

Public Attributes

size_t max_walk = 50
 The maximum distance we will walk trying to find a shared path. More...
 

Private Attributes

const PathPositionHandleGraphgraph = nullptr
 
const PathComponentIndexpath_component_index = nullptr
 

Constructor & Destructor Documentation

◆ PathOrientedDistanceMeasurer()

vg::PathOrientedDistanceMeasurer::PathOrientedDistanceMeasurer ( const PathPositionHandleGraph graph,
const PathComponentIndex path_component_index = nullptr 
)

Construct a distance service to measures distance along paths in this graph. Optionally measures all distances on the forward strand of the paths.

◆ ~PathOrientedDistanceMeasurer()

vg::PathOrientedDistanceMeasurer::~PathOrientedDistanceMeasurer ( )
default

Default desctructor.

Member Function Documentation

◆ exclude_merges()

vector< pair< size_t, size_t > > vg::PathOrientedDistanceMeasurer::exclude_merges ( vector< vector< size_t >> &  current_groups,
const function< pos_t(size_t)> &  get_position 
)
virtual

Return a vector of pairs of groups (referred to by indexes in the current_groups vector) that cannot have finite distances between them (typically because they are on separate components).

Implements vg::OrientedDistanceMeasurer.

◆ get_buckets()

vector< vector< size_t > > vg::PathOrientedDistanceMeasurer::get_buckets ( const function< pos_t(size_t)> &  get_position,
size_t  num_items 
)
virtual

Return a vector of groups that we believe will have finite distances under this metric, can be empty.

Implements vg::OrientedDistanceMeasurer.

◆ oriented_distance()

int64_t vg::PathOrientedDistanceMeasurer::oriented_distance ( const pos_t pos_1,
const pos_t pos_2 
)
virtual

Returns a signed distance, where positive indicates that pos_2 is to the right of pos_1, and negative indicates to the left. If the distance is infinite or can't be determined, returns numeric_limits<int64_t>::max().

Implements vg::OrientedDistanceMeasurer.

Member Data Documentation

◆ graph

const PathPositionHandleGraph* vg::PathOrientedDistanceMeasurer::graph = nullptr
private

◆ max_walk

size_t vg::PathOrientedDistanceMeasurer::max_walk = 50

The maximum distance we will walk trying to find a shared path.

◆ path_component_index

const PathComponentIndex* vg::PathOrientedDistanceMeasurer::path_component_index = nullptr
private

The documentation for this class was generated from the following files: