Created
April 17, 2019 00:50
-
-
Save tomasdelvechio/31b9cb4d29cc438755e65c52afb92423 to your computer and use it in GitHub Desktop.
Dijkstra Algorithm with SNAP Library
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "Snap.h" | |
int main(int argc, char* argv[]) { | |
TFIn FIn(argv[1]); | |
PNEANet Graph = TNEANet::Load(FIn); | |
printf("Load Graph\n"); | |
TIntFltH NDistH(Graph->GetNodes()); | |
TFltV vec ; | |
int out = TSnap::GetWeightedShortestPath(Graph, 0, NDistH, vec); | |
printf("%d\n", out); | |
printf("Dijkstra ended\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment