Add skeleton code for matching
This commit is contained in:
committed by
Patrick Niklaus
parent
7e00a86bb4
commit
2259bce05f
@@ -105,6 +105,11 @@ template <class EdgeDataT> class BaseDataFacade
|
||||
IncrementalFindPhantomNodeForCoordinate(const FixedPointCoordinate &input_coordinate,
|
||||
PhantomNode &resulting_phantom_node) = 0;
|
||||
|
||||
virtual bool
|
||||
IncrementalFindPhantomNodeForCoordinateWithDistance(const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
|
||||
const unsigned number_of_results) = 0;
|
||||
|
||||
virtual unsigned GetCheckSum() const = 0;
|
||||
|
||||
virtual unsigned GetNameIndexFromEdgeID(const unsigned id) const = 0;
|
||||
|
||||
@@ -398,6 +398,7 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
BOOST_ASSERT(!resulting_phantom_node_vector.empty());
|
||||
resulting_phantom_node = resulting_phantom_node_vector.front();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -415,6 +416,20 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results);
|
||||
}
|
||||
|
||||
bool
|
||||
IncrementalFindPhantomNodeForCoordinateWithDistance(const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
|
||||
const unsigned number_of_results) final
|
||||
{
|
||||
if (!m_static_rtree.get())
|
||||
{
|
||||
LoadRTree();
|
||||
}
|
||||
|
||||
return m_static_rtree->IncrementalFindPhantomNodeForCoordinateWithDistance(
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results);
|
||||
}
|
||||
|
||||
unsigned GetCheckSum() const override final { return m_check_sum; }
|
||||
|
||||
unsigned GetNameIndexFromEdgeID(const unsigned id) const override final
|
||||
|
||||
@@ -386,6 +386,7 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
BOOST_ASSERT(!resulting_phantom_node_vector.empty());
|
||||
resulting_phantom_node = resulting_phantom_node_vector.front();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -403,6 +404,20 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results);
|
||||
}
|
||||
|
||||
bool
|
||||
IncrementalFindPhantomNodeForCoordinateWithDistance(const FixedPointCoordinate &input_coordinate,
|
||||
std::vector<std::pair<PhantomNode, double>> &resulting_phantom_node_vector,
|
||||
const unsigned number_of_results) final
|
||||
{
|
||||
if (!m_static_rtree.get() || CURRENT_TIMESTAMP != m_static_rtree->first)
|
||||
{
|
||||
LoadRTree();
|
||||
}
|
||||
|
||||
return m_static_rtree->second->IncrementalFindPhantomNodeForCoordinateWithDistance(
|
||||
input_coordinate, resulting_phantom_node_vector, number_of_results);
|
||||
}
|
||||
|
||||
unsigned GetCheckSum() const override final { return m_check_sum; }
|
||||
|
||||
unsigned GetNameIndexFromEdgeID(const unsigned id) const override final
|
||||
|
||||
Reference in New Issue
Block a user