vg
tools for working with variation graphs
Loading...
Searching...
No Matches
vg::algorithms::TracedScore Class Reference

#include <chain_items.hpp>

Public Member Functions

void max_in (const vector< TracedScore > &options, size_t option_number)
 Max in a score from a DP table. If it wins, record provenance.
TracedScore add_points (int adjustment) const
 Add (or remove) points along a route to somewhere. Return a modified copy.
TracedScore set_shared_paths (const std::pair< size_t, size_t > &new_paths) const
 Update the paths supported by this score and return a modified copy.
bool operator== (const TracedScore &other) const
 Compare for equality.
bool operator!= (const TracedScore &other) const
 Compare for inequality.
bool operator< (const TracedScore &other) const
 Compare for less-than.
bool operator> (const TracedScore &other) const
 Compare for greater-than.
int operator- (const TracedScore &other) const
 Subtraction to yield a difference in points.

Static Public Member Functions

static size_t nowhere ()
static TracedScore unset ()
static TracedScore score_from (const vector< TracedScore > &options, size_t option_number)
 Get a score from a table of scores and record provenance in it.

Public Attributes

int score
size_t source
path_flags_t paths
 Supported paths.
size_t rec_num =0

Member Function Documentation

◆ add_points()

TracedScore vg::algorithms::TracedScore::add_points ( int adjustment) const

Add (or remove) points along a route to somewhere. Return a modified copy.

◆ max_in()

void vg::algorithms::TracedScore::max_in ( const vector< TracedScore > & options,
size_t option_number )

Max in a score from a DP table. If it wins, record provenance.

◆ nowhere()

size_t vg::algorithms::TracedScore::nowhere ( )
inlinestatic

What is the sentinel for an empty provenance? Use a function instead of a constant because that's easier when we're just a header.

◆ operator!=()

bool vg::algorithms::TracedScore::operator!= ( const TracedScore & other) const
inline

Compare for inequality.

◆ operator-()

int vg::algorithms::TracedScore::operator- ( const TracedScore & other) const
inline

Subtraction to yield a difference in points.

◆ operator<()

bool vg::algorithms::TracedScore::operator< ( const TracedScore & other) const
inline

Compare for less-than.

◆ operator==()

bool vg::algorithms::TracedScore::operator== ( const TracedScore & other) const
inline

Compare for equality.

◆ operator>()

bool vg::algorithms::TracedScore::operator> ( const TracedScore & other) const
inline

Compare for greater-than.

◆ score_from()

TracedScore vg::algorithms::TracedScore::score_from ( const vector< TracedScore > & options,
size_t option_number )
static

Get a score from a table of scores and record provenance in it.

◆ set_shared_paths()

TracedScore vg::algorithms::TracedScore::set_shared_paths ( const std::pair< size_t, size_t > & new_paths) const

Update the paths supported by this score and return a modified copy.

◆ unset()

TracedScore vg::algorithms::TracedScore::unset ( )
inlinestatic

What's the default value for an empty table cell? Use a function instead of a constant because that's easier when we're just a header.

Member Data Documentation

◆ paths

path_flags_t vg::algorithms::TracedScore::paths

Supported paths.

◆ rec_num

size_t vg::algorithms::TracedScore::rec_num =0

◆ score

int vg::algorithms::TracedScore::score

◆ source

size_t vg::algorithms::TracedScore::source

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