libigl v2.5.0
Loading...
Searching...
No Matches
dijkstra.h
Go to the documentation of this file.
1// This file is part of libigl, a simple c++ geometry processing library.
2//
3// Copyright (C) 2015 Olga Diamanti <olga.diam@gmail.com>
4//
5// This Source Code Form is subject to the terms of the Mozilla Public License
6// v. 2.0. If a copy of the MPL was not distributed with this file, You can
7// obtain one at http://mozilla.org/MPL/2.0/.
8
9#ifndef IGL_DIJKSTRA
10#define IGL_DIJKSTRA
11#include "igl_inline.h"
12
13#include <Eigen/Core>
14#include <vector>
15#include <set>
16
17namespace igl {
18
30 template <typename IndexType, typename DerivedD, typename DerivedP>
32 const IndexType &source,
33 const std::set<IndexType> &targets,
34 const std::vector<std::vector<IndexType> >& VV,
35 const std::vector<double>& weights,
36 Eigen::PlainObjectBase<DerivedD> &min_distance,
37 Eigen::PlainObjectBase<DerivedP> &previous);
39 template <typename IndexType, typename DerivedV,
40 typename DerivedD, typename DerivedP>
42 const Eigen::MatrixBase<DerivedV> &V,
43 const std::vector<std::vector<IndexType> >& VV,
44 const IndexType &source,
45 const std::set<IndexType> &targets,
46 Eigen::PlainObjectBase<DerivedD> &min_distance,
47 Eigen::PlainObjectBase<DerivedP> &previous);
49 template <typename IndexType, typename DerivedD, typename DerivedP>
51 const IndexType &source,
52 const std::set<IndexType> &targets,
53 const std::vector<std::vector<IndexType> >& VV,
54 Eigen::PlainObjectBase<DerivedD> &min_distance,
55 Eigen::PlainObjectBase<DerivedP> &previous);
61 template <typename IndexType, typename DerivedP>
63 const IndexType &vertex,
64 const Eigen::MatrixBase<DerivedP> &previous,
65 std::vector<IndexType> &path);
66}
67
68#ifndef IGL_STATIC_LIBRARY
69#include "dijkstra.cpp"
70#endif
71
72
73#endif /* defined(IGL_DIJKSTRA) */
#define IGL_INLINE
Definition igl_inline.h:15
Definition AABB.h:17
int dijkstra(const IndexType &source, const std::set< IndexType > &targets, const std::vector< std::vector< IndexType > > &VV, const std::vector< double > &weights, Eigen::PlainObjectBase< DerivedD > &min_distance, Eigen::PlainObjectBase< DerivedP > &previous)
Dijkstra's algorithm for vertex-weighted shortest paths, with multiple targets.