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

an accumulator class for different graph properties More...

#include <graph_infos.hpp>

Public Member Functions

 GraphInfos (const Graph &_g, const bool update_values=false)
 constructor: needs a graph to initalize the EdgeHasher of the bridgs; updates all values on construction of the infos
 
 GraphInfos (const Graph &_g, const GraphInfos &infos, const Matching< Graph > &translate)
 constructor
 
void invalidate_all ()
 invalidate all infos
 
void update_all (const bool force=false)
 update all values
 
void add_vertex (const Vertex< Graph > &u)
 react to addition of vertex u
 
void add_edge (const Vertex< Graph > &u, const Vertex< Graph > &v)
 react to addition of edge uv
 
void delete_edge (const VertexPair< Graph > &uv)
 react to deletion of edge uv
 
void read_from_infos (const GraphInfos< Graph > &infos, const Matching< Graph > &translate)
 update the infos from the graph h of which g has just been copied More...
 
void read_from_split_off_component (const GraphInfos< Graph > &infos, const Matching< Graph > &translate)
 react to splitting off this connected component g from a graph h More...
 
void update_disjoint_union (const GraphInfos< Graph > &infos, const Matching< Graph > &translate)
 react to forming a disjoint union with g with another graph h, given the infos of h and a translate map More...
 
PathsAndCycles get_paths_and_cycles ()
 get the number of paths and cycles in the graph, assuming its max degree is 2, updating infos if necessary
 
PathsAndCycles get_paths_and_cycles_const () const
 get the number of paths and cycles in the graph, assuming its max degree is 2, without updating the infos
 
unsigned get_FES ()
 return the feedback edge set number of the graph, updating its infos if necessary
 
unsigned get_FES_const () const
 return the feedback edge set number of the graph without updating its infos
 
bool is_acyclic ()
 return whether the graph is acyclic, updating its infos if necessary
 
bool is_acyclic_const () const
 return whether the graph is acyclic without updating its infos
 
bool is_max_deg_two ()
 return whether the graph has max degree 2, updating its max-degree info if necessary
 
bool is_max_deg_two_const () const
 return whether the graph has max degree 2 without updating infos
 

Public Attributes

const Graph & g
 
ComponentInfo< Graph > comps
 
MaxDegreeInfo< Graph > max_deg
 
BridgeInfo< Graph > bridges
 

Protected Member Functions

PathsAndCycles _get_paths_and_cycles (const unsigned cc)
 get the number of paths and cycles in the graph, assuming its max degree is 2
 
bool is_max_deg_two_easy_cases () const
 return whether g has maximum degree 2 using only queries to |V| and |E|
 

Detailed Description

template<class Graph>
struct scaffold::graph_infos::GraphInfos< Graph >

an accumulator class for different graph properties

Member Function Documentation

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

update the infos from the graph h of which g has just been copied

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

translate has to contain a map such that, for each vertex u of h, translate[u] is the representation of u in g

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

react to splitting off this connected component g from a graph h

translate has to contain a map such that, for each vertex u of h, translate[u] is the representation of u in g

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

react to forming a disjoint union with g with another graph h, given the infos of h and a translate map

translate has to contain a map such that, for each vertex u of h, translate[u] is the representation of u in g


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