WSF
WsfShortestPath.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2003-2015 The Boeing Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11// ****************************************************************************
12// Updated by Infoscitex, a DCS Company.
13// ****************************************************************************
14
15#ifndef WSFSHORTESTPATH_HPP
16#define WSFSHORTESTPATH_HPP
17
18#include "wsf_export.h"
19
20#include <vector>
21
40
42{
43public:
44 typedef std::vector<std::vector<int>> CostMatrix;
45
47
48 bool Initialize(const CostMatrix& aCostMatrix);
49
50 void FindShortestPath(unsigned int aFromNode, unsigned int aToNode, int& aCost, std::vector<int>& aPath);
51
52private:
53 typedef std::vector<std::vector<int>> AdjacentNodes;
54
55 void UpdatePathMatrix(const std::vector<int>& aPath);
56
58 unsigned int mNodeCount;
59
62 CostMatrix mCostMatrix;
63
66 AdjacentNodes mAdjacentNodes;
67};
68
69#endif
#define WSF_EXPORT
Definition WsfXIO_Export.hpp:35
bool Initialize(const CostMatrix &aCostMatrix)
Definition WsfShortestPath.cpp:58
std::vector< std::vector< int > > CostMatrix
Definition WsfShortestPath.hpp:44
WsfShortestPath()
Definition WsfShortestPath.cpp:36
void FindShortestPath(unsigned int aFromNode, unsigned int aToNode, int &aCost, std::vector< int > &aPath)
Definition WsfShortestPath.cpp:131
Copyrights Multiple, All Rights Reserved