#ifndef STATE_HEADERFILE
#define STATE_HEADERFILE

#include "SlaveAgentSlotOfAgent.h"
#include "SubState.h"
#include <vector>

class State {
	
	private:

		vector<SubState*> vInputSubStates;
		vector<SubState*> vOutputSubStates;

		//unsigned int discreteAveragePartitionSize;
		unsigned int discreteAveragePartitionCounter;

		/*
		StatisticValue continuousStatisticValue;
		vector<AverageValue*> vDiscreteAveragePartition;

		bool addDiscreteAveragePartition();
		*/

		bool addSubState(vector<SubState*>* vSubStates, SlaveAgentSlotOfAgent* slot);

		bool variablesAreRelated(vector<SubState*>* vSubStates, float thresholdToBeRelated);

		bool checkSubStatesForNotDrifting(vector<SubState*>* vSubStates, unsigned int discreteAveragePartitionSize, unsigned int compareDistanceDiscreteAveragePartition, float thresholdNotDrift);

	public:
		State();
		/*
		bool setDiscreteAveragePartitionSize(unsigned int discreteAverage);
		unsigned int getDiscreteAveragePartitionSize();
		*/
		bool addInputSubState(SlaveAgentSlotOfAgent* slot);
		bool addOutputSubState(SlaveAgentSlotOfAgent* slot);

		void resetDiscreteAveragePartitionCounter();

		bool addNewdiscreteAveragePartition();

		bool injectValues(unsigned int discreteAveragePartitionSize);

		bool injectValuesAndMakeNewDiscreteAveragePartition(unsigned int discreteAveragePartitionSize);

		bool inputVariablesAreRelated(float thresholdToBeRelated);
		bool outputVariablesAreRelated(float thresholdToBeRelated);

		unsigned int getNumOfInjections();

		bool checkAllVariablesForNotDrifting(unsigned int discreteAveragePartitionSize, unsigned int compareDistanceDiscreteAveragePartition, float thresholdNotDrift);



		/*
		

		bool injectValue(float value);
		bool valueIsRelated(float value, float thresholdToAverage);

		bool isNew();

		unsigned int getNumberOfInjections();

		void deleteState();
		*/


};

#endif