/******************************************************************************************
> [KAZOE]                                                                                 <
> Initial Sofware by [Yannick Verdie, Florent Lafarge], Copyright (C) Inria (GEOMETRICA)  <
> All Rights Reserved, 2012, [Version 1.0].                                               <
******************************************************************************************/
#include "Stat.h"



	GPU_Stat::GPU_Stat(std::string n)
	{
	   m_name = n;	
	   m_myfile.open (m_name.c_str());
	   m_myfile.setf ( ios::fixed, ios::floatfield );     
	   m_myfile<<"iteration, energy, time, nb_object, currentT, decreateT, currentDelta, decreaseDelta\n";
	}

	 //iteration, energy, time, nb_object, currentT, decreateT, currentDelta, , decreaseDelta
	void GPU_Stat::write(	int i, float e, float time, int n, float t, float dt, float d, float dd)
	{
	    m_myfile<<i<<" "<<e<<" "<<time<<" "<<n<<" "<<t<<" "<<dt<<" "<<d<<" "<<dd<<"\n"; 
	}

	void GPU_Stat::close()
	{
		m_myfile.close();
	}


	GPU_Stat::~GPU_Stat()
	{
	  close();
	}
