-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStarGroup.h
More file actions
40 lines (36 loc) · 1.08 KB
/
Copy pathStarGroup.h
File metadata and controls
40 lines (36 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef STARGROUP_H
#define STARGROUP_H
#pragma once
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <cmath>
#include <string>
#include <unordered_map>
#include "star.h"
using namespace std;
class StarGroup {
vector<Star> stars;
vector<vector<Star>> connectedStars;
unordered_map<int, vector<pair<int, float>>> adjacencyList;
unordered_map<int, pair<double, double>> starPositions;
int nodesExplored;
public:
StarGroup(vector<string> lines, int numStars);
double degToRad(double deg);
vector<Star> getStars();
vector<vector<Star>> getConnectedStars();
unordered_map<int, vector<pair<int, float>>> getAdjacencyList();
void printAdjacencyList();
void formAdjacencyList();
unordered_map<int, pair<double, double>> getStarPositions();
void printStarPositions();
void formStarPositions();
double calcDistance(int i, int j);
vector<int> dijkstra(int start, int target);
float heuristic(int from, int to);
vector<int> a_star(int start, int end);
int getNodesExplored();
};
#endif //STARGROUP_H