Solar
Public Member Functions | List of all members
SolAR::api::storage::ICovisibilityGraph Class Referenceabstract

Allows to store the covisibility graph between keyframes. This storage component can be accessed by processing components to share persistent data. UUID: 15455f5a-0e99-49e5-a3fb-39de3eeb5b9b More...

#include <ICovisibilityGraph.h>

Inheritance diagram for SolAR::api::storage::ICovisibilityGraph:
Inheritance graph
[legend]
Collaboration diagram for SolAR::api::storage::ICovisibilityGraph:
Collaboration graph
[legend]

Public Member Functions

 ICovisibilityGraph ()=default
 ICovisibilityGraph default constructor.
 
virtual ~ICovisibilityGraph ()=default
 ICovisibilityGraph default destructor.
 
virtual FrameworkReturnCode increaseEdge (const uint32_t node1_id, const uint32_t node2_id, const float weight)=0
 This method allow to increase edge between 2 nodes. More...
 
virtual FrameworkReturnCode decreaseEdge (const uint32_t node1_id, const uint32_t node2_id, const float weight)=0
 This method allow to decrease edge between 2 nodes. More...
 
virtual FrameworkReturnCode removeEdge (const uint32_t node1_id, const uint32_t node2_id)=0
 This method allow to remove an edge between 2 nodes. More...
 
virtual FrameworkReturnCode getEdge (uint32_t node1_id, uint32_t node2_id, float &weight) const =0
 This method allow to get edge between 2 nodes. More...
 
virtual bool isEdge (const uint32_t node1_id, const uint32_t node2_id) const =0
 This method allow to verify that exist an edge between 2 nodes. More...
 
virtual FrameworkReturnCode getAllNodes (std::set< uint32_t > &nodes_id) const =0
 This method allow to get all nodes of the graph. More...
 
virtual FrameworkReturnCode suppressNode (const uint32_t node_id)=0
 This method allow to suppress a node of the graph. More...
 
virtual FrameworkReturnCode getNeighbors (const uint32_t node_id, const float minWeight, std::vector< uint32_t > &neighbors) const =0
 This method allow to get neighbors of a node in the graph. More...
 
virtual FrameworkReturnCode minimalSpanningTree (std::vector< std::tuple< uint32_t, uint32_t, float >> &edges_weights, float &minTotalWeights)=0
 This method allow to get minimal spanning tree of the graph. More...
 
virtual FrameworkReturnCode maximalSpanningTree (std::vector< std::tuple< uint32_t, uint32_t, float >> &edges_weights, float &maxTotalWeights)=0
 This method allow to get maximal spanning tree of the graph. More...
 
virtual FrameworkReturnCode getShortestPath (uint32_t node1_id, uint32_t node2_id, std::vector< uint32_t > &path)=0
 This method allow to get the shortest (by number of vertices) path between 2 nodes. More...
 
virtual FrameworkReturnCode display () const =0
 This method allow to display all vertices and weighted edges of the covisibility graph.
 
virtual FrameworkReturnCode saveToFile (const std::string &file) const =0
 This method allows to save the graph to the external file. More...
 
virtual FrameworkReturnCode loadFromFile (const std::string &file)=0
 This method allows to load the graph from the external file. More...
 

Detailed Description

Allows to store the covisibility graph between keyframes. This storage component can be accessed by processing components to share persistent data. UUID: 15455f5a-0e99-49e5-a3fb-39de3eeb5b9b

Member Function Documentation

◆ decreaseEdge()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::decreaseEdge ( const uint32_t  node1_id,
const uint32_t  node2_id,
const float  weight 
)
pure virtual

This method allow to decrease edge between 2 nodes.

Parameters
[in]node1_idid of 1st node
[in]node2_idid of 2nd node
[in]weightweight to decrease
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getAllNodes()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::getAllNodes ( std::set< uint32_t > &  nodes_id) const
pure virtual

This method allow to get all nodes of the graph.

Parameters
[out]nodes_idids of all nodes
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getEdge()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::getEdge ( uint32_t  node1_id,
uint32_t  node2_id,
float &  weight 
) const
pure virtual

This method allow to get edge between 2 nodes.

Parameters
[in]node1_idid of 1st node
[in]node2_idid of 2nd node
[out]weightweight of the edge
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getNeighbors()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::getNeighbors ( const uint32_t  node_id,
const float  minWeight,
std::vector< uint32_t > &  neighbors 
) const
pure virtual

This method allow to get neighbors of a node in the graph.

Parameters
[in]node_idid of the node to get neighbors
[in]minWeightmin value between this node and a neighbor to accept
[out]neighborsa vector of neighbors sorted to greater weighted edge.
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getShortestPath()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::getShortestPath ( uint32_t  node1_id,
uint32_t  node2_id,
std::vector< uint32_t > &  path 
)
pure virtual

This method allow to get the shortest (by number of vertices) path between 2 nodes.

Parameters
[in]node1_idid of 1st node
[in]node2_idid of 2nd node
[out]paththe shortest path
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ increaseEdge()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::increaseEdge ( const uint32_t  node1_id,
const uint32_t  node2_id,
const float  weight 
)
pure virtual

This method allow to increase edge between 2 nodes.

Parameters
[in]node1_idid of 1st node
[in]node2_idid of 2nd node
[in]weightweight to increase
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ isEdge()

virtual bool SolAR::api::storage::ICovisibilityGraph::isEdge ( const uint32_t  node1_id,
const uint32_t  node2_id 
) const
pure virtual

This method allow to verify that exist an edge between 2 nodes.

Parameters
[in]node1_idid of 1st node
[in]node2_idid of 2nd node
Returns
true if exist, else false

◆ loadFromFile()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::loadFromFile ( const std::string &  file)
pure virtual

This method allows to load the graph from the external file.

Parameters
[in]filethe file name
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ maximalSpanningTree()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::maximalSpanningTree ( std::vector< std::tuple< uint32_t, uint32_t, float >> &  edges_weights,
float &  maxTotalWeights 
)
pure virtual

This method allow to get maximal spanning tree of the graph.

Parameters
[out]edges_weightsthe maximal spanning tree graph including edges with weights
[out]maxTotalWeightscost of the maximal spanning tree graph
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ minimalSpanningTree()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::minimalSpanningTree ( std::vector< std::tuple< uint32_t, uint32_t, float >> &  edges_weights,
float &  minTotalWeights 
)
pure virtual

This method allow to get minimal spanning tree of the graph.

Parameters
[out]edges_weightsthe minimal spanning tree graph including edges with weights
[out]minTotalWeightscost of the minimal spanning tree graph
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ removeEdge()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::removeEdge ( const uint32_t  node1_id,
const uint32_t  node2_id 
)
pure virtual

This method allow to remove an edge between 2 nodes.

Parameters
[in]node1_idid of 1st node
[in]node2_idid of 2nd node
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ saveToFile()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::saveToFile ( const std::string &  file) const
pure virtual

This method allows to save the graph to the external file.

Parameters
[in]filethe file name
Returns
FrameworkReturnCode::SUCCESS if the suppression succeed, else FrameworkReturnCode::_ERROR.

◆ suppressNode()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraph::suppressNode ( const uint32_t  node_id)
pure virtual

This method allow to suppress a node of the graph.

Parameters
[in]node_idid of the node to suppress
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

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