-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSubsetSum.h
36 lines (33 loc) · 889 Bytes
/
SubsetSum.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
28
29
30
31
32
33
34
35
36
//
// Created by quartie on 2018-05-13.
//
#pragma once
#include <fstream>
#include <iomanip>
#include "SurgeryTheatre.h"
#include "FunctionTemplates.h"
class SubsetSum
{
private:
int numberOfTheatres;
int numberOfSurgeries;
int surgeryArrayCapacity;
int totalMinutes;
bool* *matrix;
SurgeryTheatre *theatres;
Surgery *allSurgeries;
void expandSurgeryArray();
public:
SubsetSum(std::string fileLocation, int numOfTheatres);
~SubsetSum();
void read(std::string fileLocation, Surgery surgeries[]);
void printAllSurgeries();
void viewAllTheatres() const;
void setHours(int theatre, int opening, int closing);
void initilizeMatrix(int res);
void constructMatrix();
void printMatrix(int x);
void sortSurgeriesAsc();
void planSurgeries(int theatre, int x, int y, int timeToSave);
int getNrOfSurgeries() const;
};