Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Geodesic_distances_generation< Graph, LandmarkFunctor, LandmarkInfo_functor > Class Template Reference

brief todo More...

#include <Geodesic_distances_generation.hpp>

Public Types

enum  Color { WHITE , GRAY , BLACK }
 
typedef boost::graph_traits< Graph >::vertex_descriptor vertex_descriptor
 
typedef boost::graph_traits< Graph >::vertex_iterator vertex_iterator
 
typedef boost::graph_traits< Graph >::vertices_size_type vertices_size_type
 
typedef boost::graph_traits< Graph >::adjacency_iterator adjacency_iterator
 
typedef boost::vertex_bundle_type< Graph >::type Vertex_handle
 
typedef boost::edge_bundle_type< Graph >::type Distance_number_type
 
typedef LandmarkFunctor Landmark_functor
 

Public Member Functions

 T_Geodesic_distances_generation (Graph &g, Landmark_functor &is_landmark)
 
 T_Geodesic_distances_generation (Graph &g)
 
 ~T_Geodesic_distances_generation (void)
 
Graph::vertices_size_type count_landmarks ()
 this is useful to preallocate the result to structure to be used in k_dijkstra_on_landmarks More...
 
void k_dijkstra_on_landmarks (unsigned k, std::ostream &result, std::ostream &landmarksInfoOutput)
 
void k_dijkstra_on_landmark (vertex_descriptor origin, unsigned k, std::ostream &result, std::ostream &landmarksInfoOutput)
 

Detailed Description

template<class Graph, class LandmarkFunctor, class LandmarkInfo_functor>
class SBL::CADS::T_Geodesic_distances_generation< Graph, LandmarkFunctor, LandmarkInfo_functor >

brief todo

details todo.

Member Typedef Documentation

◆ adjacency_iterator

typedef boost::graph_traits<Graph>::adjacency_iterator adjacency_iterator

◆ Distance_number_type

typedef boost::edge_bundle_type<Graph>::type Distance_number_type

◆ Landmark_functor

typedef LandmarkFunctor Landmark_functor

◆ vertex_descriptor

typedef boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor

◆ Vertex_handle

typedef boost::vertex_bundle_type<Graph>::type Vertex_handle

◆ vertex_iterator

typedef boost::graph_traits<Graph>::vertex_iterator vertex_iterator

◆ vertices_size_type

typedef boost::graph_traits<Graph>::vertices_size_type vertices_size_type

Member Enumeration Documentation

◆ Color

enum Color
Enumerator
WHITE 
GRAY 
BLACK 

Constructor & Destructor Documentation

◆ T_Geodesic_distances_generation() [1/2]

T_Geodesic_distances_generation ( Graph &  g,
Landmark_functor is_landmark 
)
inline

◆ T_Geodesic_distances_generation() [2/2]

T_Geodesic_distances_generation ( Graph &  g)
inline

◆ ~T_Geodesic_distances_generation()

~T_Geodesic_distances_generation ( void  )
inline

Member Function Documentation

◆ count_landmarks()

Graph::vertices_size_type count_landmarks

this is useful to preallocate the result to structure to be used in k_dijkstra_on_landmarks

◆ k_dijkstra_on_landmark()

void k_dijkstra_on_landmark ( vertex_descriptor  origin,
unsigned  k,
std::ostream &  result,
std::ostream &  landmarksInfoOutput 
)

◆ k_dijkstra_on_landmarks()

void k_dijkstra_on_landmarks ( unsigned  k,
std::ostream &  result,
std::ostream &  landmarksInfoOutput 
)

main function computes the k shortest distances to other landmarks from each landmark and outputs the result to an ostream it uses for each landmark a truncated version of dijkstra's algorithm that stops when k other landmarks where visited the greedy-optimal nature of dijkstra's algorithm guarantees that the distances to these k landmarks are indeed the shortest ones