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

Allows to store the covisibility graph between keyframes. UUID: 15455f5a-0e99-49e5-a3fb-39de3eeb5b9b More...

#include <ICovisibilityGraphManager.h>

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

Public Member Functions

 ICovisibilityGraphManager ()=default
 ICovisibilityGraphManager default constructor.
 
virtual ~ICovisibilityGraphManager ()=default
 ICovisibilityGraphManager 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 uint32_t maxNbNeighbors=0) 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...
 
virtual const SRef< SolAR::datastructure::CovisibilityGraph > & getConstCovisibilityGraph () const =0
 This method returns the covisibility graph. More...
 
virtual std::unique_lock< std::mutex > getCovisibilityGraph (SRef< SolAR::datastructure::CovisibilityGraph > &covisibilityGraph)=0
 This method returns the covisibility graph. More...
 
virtual void setCovisibilityGraph (const SRef< SolAR::datastructure::CovisibilityGraph > covisibilityGraph)=0
 This method is to set the covisibility graph. More...
 

Detailed Description

Allows to store the covisibility graph between keyframes. UUID: 15455f5a-0e99-49e5-a3fb-39de3eeb5b9b

This storage component can be accessed by processing components to share persistent data.

Member Function Documentation

◆ decreaseEdge()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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.

◆ getConstCovisibilityGraph()

virtual const SRef< SolAR::datastructure::CovisibilityGraph > & SolAR::api::storage::ICovisibilityGraphManager::getConstCovisibilityGraph ( ) const
pure virtual

This method returns the covisibility graph.

Returns
the covisibility graph

◆ getCovisibilityGraph()

virtual std::unique_lock< std::mutex > SolAR::api::storage::ICovisibilityGraphManager::getCovisibilityGraph ( SRef< SolAR::datastructure::CovisibilityGraph > &  covisibilityGraph)
pure virtual

This method returns the covisibility graph.

Parameters
[out]covisibilityGraphthe covisibility graph of map
Returns
the covisibility graph

◆ getEdge()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraphManager::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::ICovisibilityGraphManager::getNeighbors ( const uint32_t  node_id,
const float  minWeight,
std::vector< uint32_t > &  neighbors,
const uint32_t  maxNbNeighbors = 0 
) 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.
[in]maxNbNeighborsthe maximum number of neighbors. If it is zero, find all neighbors.
Returns
FrameworkReturnCode::SUCCESS if the addition succeed, else FrameworkReturnCode::_ERROR.

◆ getShortestPath()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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::ICovisibilityGraphManager::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.

◆ setCovisibilityGraph()

virtual void SolAR::api::storage::ICovisibilityGraphManager::setCovisibilityGraph ( const SRef< SolAR::datastructure::CovisibilityGraph covisibilityGraph)
pure virtual

This method is to set the covisibility graph.

Parameters
[in]covisibilityGraphthe covisibility graph of map

◆ suppressNode()

virtual FrameworkReturnCode SolAR::api::storage::ICovisibilityGraphManager::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: