Img2Num C++ (Internal Developer Docs)  dev
API Documentation
Graph Class Reference
+ Collaboration diagram for Graph:

Public Member Functions

 Graph (std::unique_ptr< std::vector< Node_ptr >> &nodes, int width, int height)
 
bool add_edge (int32_t node_id1, int32_t node_id2)
 
bool merge_nodes (const Node_ptr &node_to_keep, const Node_ptr &node_to_remove)
 
void clear_unconnected_nodes ()
 
const std::vector< Node_ptr > & get_nodes () const
 
bool all_areas_bigger_than (int32_t min_area)
 
const size_t size ()
 
void discover_edges (const std::vector< int32_t > &region_labels, const int32_t width, const int32_t height)
 
void merge_small_area_nodes (const int32_t min_area)
 
void compute_contours ()
 

Protected Member Functions

void hash_node_ids (void)
 

Protected Attributes

int m_width
 
int m_height
 
std::unique_ptr< std::vector< Node_ptr > > m_nodes
 
std::unordered_map< int32_t, int32_t > m_node_ids
 

Detailed Description

Definition at line 33 of file graph.h.


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