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

#include <cluster.hpp>

Inheritance diagram for vg::SnarlOrientedDistanceMeasurer:
vg::OrientedDistanceMeasurer

Public Member Functions

 SnarlOrientedDistanceMeasurer (SnarlDistanceIndex *distance_index)
 
 ~SnarlOrientedDistanceMeasurer ()=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
 

Private Attributes

SnarlDistanceIndex * distance_index = nullptr
 

Constructor & Destructor Documentation

◆ SnarlOrientedDistanceMeasurer()

vg::SnarlOrientedDistanceMeasurer::SnarlOrientedDistanceMeasurer ( SnarlDistanceIndex *  distance_index)

◆ ~SnarlOrientedDistanceMeasurer()

vg::SnarlOrientedDistanceMeasurer::~SnarlOrientedDistanceMeasurer ( )
default

Default desctructor.

Member Function Documentation

◆ exclude_merges()

vector< pair< size_t, size_t > > vg::SnarlOrientedDistanceMeasurer::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::SnarlOrientedDistanceMeasurer::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::SnarlOrientedDistanceMeasurer::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

◆ distance_index

SnarlDistanceIndex* vg::SnarlOrientedDistanceMeasurer::distance_index = nullptr
private

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