#pragma once
#include <vector>
#include "dXgtcFrame.h"
#include <map>
#include <fstream>
#include <sstream>
#include <string>

class Hyra
{
public:
	Hyra(uint16_t &pocetOnu, int16_t _pocetAllocId);
	Hyra::Hyra();
	void Hyra::aktualizace(uint16_t i, uint16_t k);
	std::vector<AllocStruc> Hyra::generujBwmapu(double _cas, std::vector<uint32_t> _obsazenostFrontOnu, std::vector<uint8_t>* _dbruNastaveno);

	uint16_t getA(uint16_t onu) { return A.at(onu); }
	void setA(uint16_t onu, uint16_t hodnota) { A.at(onu) = hodnota; }

	double getT1(uint16_t onu) { return T1.at(onu); }
	void setT1(uint16_t onu, double hodnota) { T1.at(onu) = hodnota; }

	double getP(uint16_t onu, uint16_t poradi) { return p.at(onu).at(poradi) ; }
	void setP(uint16_t onu, uint16_t poradi, uint16_t hodnota) { p.at(onu).at(poradi) = hodnota; }
	~Hyra();
	void Hyra::vygenerujStatistikyBwMap();
private:
	std::vector<uint16_t> A;
	std::vector<double> T1;
	std::vector<std::vector<double>> p;
	double l;		
	double a;		
	uint16_t fixedBw;
	uint16_t assuredBW;
	uint16_t maxBW;
	uint16_t maximalniSirkaPasma;
	uint16_t pocetAllocId;
	std::vector<uint32_t> alokovaneGranty;
	std::vector<std::map<double, uint16_t>> casGenerovaniGrantuHyra;
};