Scaffolding  0.1
This program can assemble genome scaffolds using the pairing information in paired-end reads.
Public Member Functions | Protected Member Functions | List of all members
scaffold::graph_infos::BridgeInfo< Graph > Class Template Reference

a graph property for the set of bridges in g More...

#include <graph_infos.hpp>

Inheritance diagram for scaffold::graph_infos::BridgeInfo< Graph >:
scaffold::graph_infos::StructuralInfo< Graph, BridgeMap< Graph > >

Public Member Functions

void update (const bool force=false)
 update bridges
 
void read_from_infos (const BridgeInfo< Graph > &infos, const Matching< Graph > &translate)
 read from translated information More...
 
void read_from_split_off_component (const BridgeInfo< Graph > &info, const Matching< Graph > &translate)
 read from given infos, assuming that g is a single connected component that has been split off
 
void update_disjoint_union (const BridgeInfo< Graph > &info, const Matching< Graph > &translate)
 update infos, assuming that g is the disjoint union of a graph with our infos and a graph with the given infos
 
void add_edge (const Vertex< Graph > &u, const Vertex< Graph > &v)
 react to the addition of the edge uv to g
 
void delete_edge (const VertexPair< Graph > &uv)
 react to the deletion of the edge uv
 
bool is_bridge (const Vertex< Graph > &u, const Vertex< Graph > &v)
 return whether the edge uv is a bridge, updating the infos if necessary
 
bool is_bridge_const (const Vertex< Graph > &u, const Vertex< Graph > &v) const
 return whether the edge uv is a bridge, avoiding updating the bridge map
 
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
void get_non_bridges (std::list< WeightedBridge< Graph >> &non_bridges, const EdgePredicate &predicate=EdgePredicate())
 return the set of non-bridges in g, updating the bridge map if necessary
 
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
void get_non_bridges_const (std::list< WeightedBridge< Graph >> &non_bridges, const EdgePredicate &predicate=EdgePredicate()) const
 return the set of non-bridges without updating the bridge map
 
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
const WeightedBridge< Graph > get_cheapest_nonbridge (const EdgePredicate &predicate=EdgePredicate())
 return the lightest non-bridge, updating the bridge map if necessary
 
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
const WeightedBridge< Graph > get_cheapest_nonbridge (const EdgePredicate &predicate=EdgePredicate()) const
 return the lightest non-bridge without updating the bridge map
 
bool has_incident_nonbridge (const Vertex< Graph > &u)
 return whether a vertex has an incident nonbridge, updating the bridge map if necessary
 
bool has_incident_nonbridge_const (const Vertex< Graph > &v) const
 return whether a vertex has an incident nonbridge without updating the bridge map
 
template<class Scoring = IdentityScore<VertexPair<Graph> >>
const WeightedBridge< Graph > * get_best_bridge (const Scoring &score=Scoring())
 get non-matching bridge that minimizes the given scoring function, updating the bridge map if necessary
 
template<class Scoring = IdentityScore<VertexPair<Graph> >>
const WeightedBridge< Graph > * get_best_bridge (const Scoring &score=Scoring()) const
 get non-matching bridge that minimizes the given scoring function without updating the bridge map
 
- Public Member Functions inherited from scaffold::graph_infos::StructuralInfo< Graph, BridgeMap< Graph > >
 StructuralInfo (const Graph &_g)
 constructor
 
 StructuralInfo (const Graph &_g, const BridgeMap< Graph > &_payload)
 constructor
 
void invalidate ()
 set the property to "not up-to-date"
 
bool is_valid () const
 return whether the property is up-to-date
 
const BridgeMap< Graph > & get ()
 get the current value of the property, updating if necessary
 
const BridgeMap< Graph > & get_const () const
 get the current value of the property without updating More...
 

Protected Member Functions

template<class EdgePredicate = TruePredicate<Edge<Graph> >>
void _get_non_bridges (std::list< WeightedBridge< Graph >> &non_bridges, const EdgePredicate &predicate) const
 store all non-bridges with their weights in the parameter More...
 
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
const WeightedBridge< Graph > _get_cheapest_nonbridge (const EdgePredicate &predicate) const
 return the non-bridge of least weight More...
 
bool _has_incident_nonbridge (const Vertex< Graph > &u) const
 return whether a vertex has an incident nonbridge
 
template<class Scoring = IdentityScore<VertexPair<Graph> >>
const WeightedBridge< Graph > * _get_best_bridge (const Scoring &score) const
 get non-matching bridge that minimizes the given scoring function
 

Additional Inherited Members

- Protected Attributes inherited from scaffold::graph_infos::StructuralInfo< Graph, BridgeMap< Graph > >
const Graph & g
 a reference to the graph
 
BridgeMap< Graph > payload
 the actual graph property
 
bool up_to_date
 indicate whether the property needs to be recomputed due to changes in the graph
 

Detailed Description

template<class Graph>
class scaffold::graph_infos::BridgeInfo< Graph >

a graph property for the set of bridges in g

Member Function Documentation

template<class Graph>
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
const WeightedBridge<Graph> scaffold::graph_infos::BridgeInfo< Graph >::_get_cheapest_nonbridge ( const EdgePredicate &  predicate) const
inlineprotected

return the non-bridge of least weight

if a predicate is given, consider only non-bridges for which the predicate evaluates to true

template<class Graph>
template<class EdgePredicate = TruePredicate<Edge<Graph> >>
void scaffold::graph_infos::BridgeInfo< Graph >::_get_non_bridges ( std::list< WeightedBridge< Graph >> &  non_bridges,
const EdgePredicate &  predicate 
) const
inlineprotected

store all non-bridges with their weights in the parameter

if a predicate is given, only include the bridges for which the predicate evaluates to true

template<class Graph>
void scaffold::graph_infos::BridgeInfo< Graph >::read_from_infos ( const BridgeInfo< Graph > &  infos,
const Matching< Graph > &  translate 
)
inline

read from translated information

using this function, we can copy the graph property value when copying a graph without having to recompute it.


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