mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix QgsGraphAnalyzer: a bad result if the source is a symmetric graph
This commit is contained in:
parent
898604dbb4
commit
34f4ab6140
@ -29,10 +29,10 @@
|
|||||||
void QgsGraphAnalyzer::shortestpath( const QgsGraph* source, int startPointIdx, int criterionNum, const QVector<int>& destPointCost, QVector<double>& cost, QgsGraph* treeResult )
|
void QgsGraphAnalyzer::shortestpath( const QgsGraph* source, int startPointIdx, int criterionNum, const QVector<int>& destPointCost, QVector<double>& cost, QgsGraph* treeResult )
|
||||||
{
|
{
|
||||||
|
|
||||||
// QMap< cost, vertexIdx > not_begin
|
// QMultiMap< cost, vertexIdx > not_begin
|
||||||
// I use it and not create any struct or class.
|
// I use it and not create any struct or class.
|
||||||
QMap< double, int > not_begin;
|
QMultiMap< double, int > not_begin;
|
||||||
QMap< double, int >::iterator it;
|
QMultiMap< double, int >::iterator it;
|
||||||
|
|
||||||
// QVector< QPair< cost, arc id > result
|
// QVector< QPair< cost, arc id > result
|
||||||
QVector< QPair< double, int > > result;
|
QVector< QPair< double, int > > result;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user