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

#include <cluster.hpp>

Public Member Functions

 TargetValueSearch ()=delete
 
 TargetValueSearch (const HandleGraph &handle_graph, DistanceHeuristic *upper_bound_heuristic, DistanceHeuristic *lower_bound_heuristic)
 
 ~TargetValueSearch ()=default
 
bool tv_path_exists (const pos_t &pos_1, const pos_t &pos_2, int64_t target_value, int64_t tolerance)
 Does a path exist from pos_1 to pos_2 with length within the tolerance from the target value? More...
 
int64_t tv_path_length (const pos_t &pos_1, const pos_t &pos_2, int64_t target_value, int64_t tolerance)
 
vector< handle_ttv_path (const pos_t &pos_1, const pos_t &pos_2, int64_t target_value, int64_t tolerance)
 

Protected Member Functions

vector< handle_ttv_phase2 (const pos_t &pos_1, const pos_t &pos_2, int64_t target_value, int64_t tolerance, hash_map< pair< id_t, bool >, int64_t > &node_to_target_shorter, hash_map< pair< id_t, bool >, int64_t > &node_to_target_longer, pair< int64_t, pair< pair< id_t, bool >, int64_t >> &best_lng, pair< int64_t, pair< pair< id_t, bool >, int64_t >> &next_best, hash_map< pair< pair< id_t, bool >, int64_t >, pair< pair< id_t, bool >, int64_t >> &node_to_path)
 

Protected Attributes

const HandleGraphhandle_graph
 
unique_ptr< DistanceHeuristicupper_bound_heuristic
 
unique_ptr< DistanceHeuristiclower_bound_heuristic
 

Constructor & Destructor Documentation

◆ TargetValueSearch() [1/2]

vg::TargetValueSearch::TargetValueSearch ( )
delete

◆ TargetValueSearch() [2/2]

vg::TargetValueSearch::TargetValueSearch ( const HandleGraph handle_graph,
DistanceHeuristic upper_bound_heuristic,
DistanceHeuristic lower_bound_heuristic 
)

◆ ~TargetValueSearch()

vg::TargetValueSearch::~TargetValueSearch ( )
default

Member Function Documentation

◆ tv_path()

vector< handle_t > vg::TargetValueSearch::tv_path ( const pos_t pos_1,
const pos_t pos_2,
int64_t  target_value,
int64_t  tolerance 
)

Returns a path from pos_1 to pos_2 with length closest to the target value. If there is no such path within the tolerance of the target value, returns an empty vector.

◆ tv_path_exists()

bool vg::TargetValueSearch::tv_path_exists ( const pos_t pos_1,
const pos_t pos_2,
int64_t  target_value,
int64_t  tolerance 
)

Does a path exist from pos_1 to pos_2 with length within the tolerance from the target value?

◆ tv_path_length()

int64_t vg::TargetValueSearch::tv_path_length ( const pos_t pos_1,
const pos_t pos_2,
int64_t  target_value,
int64_t  tolerance 
)

Returns the length of path from pos_1 to pos_2 with length closest to the target value. If there is no such path within the tolerance of the target value, returns numeric_limits<int64_t>::max().

◆ tv_phase2()

vector< handle_t > vg::TargetValueSearch::tv_phase2 ( const pos_t pos_1,
const pos_t pos_2,
int64_t  target_value,
int64_t  tolerance,
hash_map< pair< id_t, bool >, int64_t > &  node_to_target_shorter,
hash_map< pair< id_t, bool >, int64_t > &  node_to_target_longer,
pair< int64_t, pair< pair< id_t, bool >, int64_t >> &  best_lng,
pair< int64_t, pair< pair< id_t, bool >, int64_t >> &  next_best,
hash_map< pair< pair< id_t, bool >, int64_t >, pair< pair< id_t, bool >, int64_t >> &  node_to_path 
)
protected

Member Data Documentation

◆ handle_graph

const HandleGraph& vg::TargetValueSearch::handle_graph
protected

◆ lower_bound_heuristic

unique_ptr<DistanceHeuristic> vg::TargetValueSearch::lower_bound_heuristic
protected

◆ upper_bound_heuristic

unique_ptr<DistanceHeuristic> vg::TargetValueSearch::upper_bound_heuristic
protected

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