-
Notifications
You must be signed in to change notification settings - Fork 0
/
Graph.h
27 lines (25 loc) · 839 Bytes
/
Graph.h
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
#pragma once
#include <vector>
#include <iostream>
#include <algorithm>
#include <utility>
#include <functional>
class Graph{
public:
Graph(const int number_of_nodes);
void outputDistanceMatrix();
void createUndirectedEdge(const int node1, const int node2, const float weight);
void createDirectedEdge(const int start_node, const int destination_node, const float weight);
bool isEulerian();
bool isSemiEulerian();
std::vector<std::vector<float>> getPrimsMST();
void setGraph(const std::vector<std::vector<float>> vect);
float getTotalWeight();
//float getEulerianCycleLength();
void removeNode(const int node);
float getClassicalLowerBound();
float getUpperBound();
private:
std::vector<std::vector<float>> distance_matrix;
bool comparePossibleEdges(const std::pair<int, int> &edge1, const std::pair<int, int> &edge2);
};