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

a graph property for the number of connected components and a map of vertices to components (represented by unsigneds) More...

#include <graph_infos.hpp>

Inheritance diagram for scaffold::graph_infos::ComponentInfo< Graph >:
scaffold::graph_infos::StructuralInfo< Graph, ComponentsAndNum< Graph > >

Public Member Functions

void update (const bool force=false)
 update the connected components
 
void read_from_infos (const ComponentInfo< Graph > &infos, const Matching< Graph > &translate)
 read from translated information More...
 
void read_from_split_off_component (const ComponentInfo< Graph > &info)
 react to splitting off a connected component of the graph g More...
 
void update_disjoint_union (const ComponentInfo< Graph > &info, const Matching< Graph > &translate)
 react to forming the disjoint union of g with a graph h, given the corresponding property of h
 
void add_vertex (const Vertex< Graph > &u)
 react to the addition of a single vertex u to g
 
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, const bool is_bridge)
 react to the deletion of the edge uv, depending on whether it was a bridge or not
 
bool num_is_valid () const
 return whether the number of connected components is up to date
 
const unsigned get_num ()
 return the number of connected components, updating if necessary
 
const unsigned get_num_const () const
 return the number of connected components without updating
 
- Public Member Functions inherited from scaffold::graph_infos::StructuralInfo< Graph, ComponentsAndNum< Graph > >
 StructuralInfo (const Graph &_g)
 constructor
 
 StructuralInfo (const Graph &_g, const ComponentsAndNum< 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 ComponentsAndNum< Graph > & get ()
 get the current value of the property, updating if necessary
 
const ComponentsAndNum< Graph > & get_const () const
 get the current value of the property without updating More...
 

Additional Inherited Members

- Protected Attributes inherited from scaffold::graph_infos::StructuralInfo< Graph, ComponentsAndNum< Graph > >
const Graph & g
 a reference to the graph
 
ComponentsAndNum< 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::ComponentInfo< Graph >

a graph property for the number of connected components and a map of vertices to components (represented by unsigneds)

Member Function Documentation

template<class Graph>
void scaffold::graph_infos::ComponentInfo< Graph >::read_from_infos ( const ComponentInfo< 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.

template<class Graph>
void scaffold::graph_infos::ComponentInfo< Graph >::read_from_split_off_component ( const ComponentInfo< Graph > &  info)
inline

react to splitting off a connected component of the graph g

we just decrease the number of connected components


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