
#define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <cmath>
#include "Point.h"
#include "polarPoint.h"
#include "PeNB.h"
#include "MeNB.h"
using namespace std;

MeNB::MeNB(Point position,double radius, int id, int power, int freq):
//MeNB::MeNB(Point position,int radius, int id, int power, int freq, int NuRRHs,vector<PeNB>& RRHs):
	//position(position),radius(radius),id(id),power(power),freq(freq),NuRRHs(NuRRHs),RRHs(RRHs)
	position(position),radius(radius),id(id),power(power),freq(freq)
{
	regionCommonAreas;		
}

Point MeNB::getPosition(void)
{
	return position;
}

double MeNB::getRadius(void)
{
	return radius;
}
int MeNB::getID(void)
{
	return id;
}
int MeNB::getPower(void)
{
	return power;
}
int MeNB::getFreq(void)
{
	return freq;
}

/*int MeNB::getNuRRH(void)
{
	return NuRRHs;
}*/

/*vector<PeNB> MeNB::getRRHs(void)
{
	return RRHs;
}*/

vector<Point>& MeNB::getRegionCommonAreas(void)
{
	return regionCommonAreas;
}

void MeNB::setPosition(Point point)
{
	this->position = point;
}

void MeNB::setRadius(double radius)
{
	this->radius = radius;
}

void MeNB::setID(int id)
{
	this->id = id;
}

void MeNB::setPower(int power)
{
	this->power = power;
}

void MeNB::setFreq(int freq)
{
	this->freq = freq;
}

/*void MeNB::setRRHs(vector<PeNB> RRHs)
{
	this->RRHs = RRHs;
}*/

void MeNB::setRegionCommonAreas(vector<Point> regionCommonAreas)
{
	this->regionCommonAreas = regionCommonAreas;
}

void MeNB::addRegionCommonAreas(Point point)
{
	this->regionCommonAreas.push_back(point);
}

/*int main()
{
	cout << "Test constructor " << endl;
	vector<PeNB> rrh({PeNB(Point(1, 2),100,1,30,900), PeNB(Point(5, 3),100,2,30,900)});
	MeNB BS(Point(1, 2),500,1,30,900, 2, rrh);
	cout << "Test getters " << endl;
	cout << BS.getPosition().getX() <<endl;
	cout << BS.getPosition().getY() <<endl;
	cout << BS.getRadius() <<endl;
	cout << BS.getID() <<endl;
	cout << BS.getPower() <<endl;
	cout << BS.getFreq() <<endl;
	cout << BS.getNuRRH() <<endl;
	cout << " " << endl;
	cout << " " << endl;
	vector<PeNB> rrh1(BS.getRRHs());
	cout << "Test rrh1[0] getters " << endl;
	cout << rrh1[0].getPosition().getX() <<endl;
	cout << rrh1[0].getPosition().getY() <<endl;
	cout << rrh1[0].getRadius() <<endl;
	cout << rrh1[0].getID() <<endl;
	cout << rrh1[0].getPower() <<endl;
	cout << rrh1[0].getFreq() <<endl;	
	cout << " " << endl;
	cout << " " << endl;
	cout << "Test rrh1[1] getters " << endl;
	cout << rrh1[1].getPosition().getX() <<endl;
	cout << rrh1[1].getPosition().getY() <<endl;
	cout << rrh1[1].getRadius() <<endl;
	cout << rrh1[1].getID() <<endl;
	cout << rrh1[1].getPower() <<endl;
	cout << rrh1[1].getFreq() <<endl;	
	cout << " " << endl;
	cout << " " << endl;
	cout << "Test Setters " << endl;
	BS.setPosition(Point(5, 10));
	BS.setRadius(300);
	BS.setID(2);
	BS.setPower(50);
	BS.setFreq(1000);
	cout << BS.getPosition().getX() <<endl;
	cout << BS.getPosition().getY() <<endl;
	cout << BS.getRadius() <<endl;
	cout << BS.getID() <<endl;
	cout << BS.getPower() <<endl;
	cout << BS.getFreq() <<endl;
	cout << " " << endl;
	cout << " " << endl;
	cout << "Test setRegionCommonAreas " << endl;
	BS.setRegionCommonAreas({polarPoint(100,3), polarPoint(200,3)});
	vector<polarPoint> polar1(BS.getRegionCommonAreas());
	cout << polar1[0].getRadius() <<endl;
	cout << polar1[0].getAngle() <<endl;
	cout << " " << endl;
	cout << " " << endl;
	cout << polar1[1].getRadius() <<endl;
	cout << polar1[1].getAngle() <<endl;
	cout << " " << endl;
	cout << " " << endl;
	cout << "Test addRegionCommonAreas " << endl;
	BS.addRegionCommonAreas(polarPoint(1,4));
	polar1=BS.getRegionCommonAreas();
	cout << "size: " << polar1.size()<< endl;	
	cout << polar1[2].getRadius() <<endl;
	cout << polar1[2].getAngle() <<endl;
	cout << " " << endl;
	cout << " " << endl;
	cout << "Test setRRHs " << endl;
	BS.setRRHs({PeNB(Point(4, 4),100,1,30,900), PeNB(Point(5, 5),100,2,30,900)});
	vector<PeNB> rrh2(BS.getRRHs());
	cout << "Test rrh1[0] getters " << endl;
	cout << rrh2[0].getPosition().getX() <<endl;
	cout << rrh2[0].getPosition().getY() <<endl;
	cout << rrh2[0].getRadius() <<endl;
	cout << rrh2[0].getID() <<endl;
	cout << rrh2[0].getPower() <<endl;
	cout << rrh2[0].getFreq() <<endl;	
	cout << " " << endl;
	cout << " " << endl;
	cout << "Test rrh1[1] getters " << endl;
	cout << rrh2[1].getPosition().getX() <<endl;
	cout << rrh2[1].getPosition().getY() <<endl;
	cout << rrh2[1].getRadius() <<endl;
	cout << rrh2[1].getID() <<endl;
	cout << rrh2[1].getPower() <<endl;
	cout << rrh2[1].getFreq() <<endl;	
	cout << " " << endl;
	cout << " " << endl;	

	return 0;
}
*/





