/************************************************************************************************/
/*			        LEDA Lab: 6th Lab Assignment					*/
/*			         BFS Algorithm			 					*/
/************************************************************************************************/

#define WhoAmI " GIVE YOUR NAMES AND A.M."		// for identification purposes		



#include <LEDA/graph/graph.h> 
#include <LEDA/core/queue.h> 
#include <LEDA/core/array.h> 
#include <LEDA/core/string.h>
#include <LEDA/core/d_array.h> // for the dynamic insertion of a graph...
#include <iostream> 
 
using namespace leda; 

using std::cout;
using std::cin;
using std::endl;
  
////////////////////////////////// ZHTHMA 1o: CONSTRUCT GRAPH /////////////////////////////

void construct_graph(	graph &G, 
			node_array<string> &name, 
			edge_array<int> &length) 
{

	d_array<string,node> nametonode;
	d_array<node,string> nodetoname;

// INSERTION OF NODES....
// Use G.new_node();

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	


// INSERTION OF EDGES...
// Use G.new_edge(startnode, endnode);

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	


// ASSIGN NAMES TO NODES...
// Use name[v] = nodetoname[v]...

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	


//ASSIGN LENGTHS TO THE EDGES...
// Use length[e] = edgelength....	

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	

}


////////////////////////////////// ZHTHMA 1o: MYPRINT /////////////////////////////

void myprint( graph &G, 
		node_array<string> &name, 
		edge_array<int> &length )
{

//	MY PRINT FUNCTION...
	cout << endl << endl;
	cout << "PRINTING THE GRAPH WITH MY_PRINT (FORMAT [v]: [v]--{lentgth[vu]}-->[u])" << endl;

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	

}


////////////////////////////////// ZHTHMA 2o: BFS ////////////////////////////////


///////////////////////////////////////////////////////////////////////////////////
//                         Breadth First Search (BFS)                            //
///////////////////////////////////////////////////////////////////////////////////

void BFS(	list<edge> &EBFS, 
		const graph &G, 
		node_array<int> &dist , 
		edge_array<int> &length, node s)
{
	queue<node> Q;
	node v,w;
	edge e;
	

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	


}






int main() 
{

cout << "///////////////////////////////////////////////////////////////////////////////////////////////////// " << endl;
cout << "LEDA LAB 2012: Lab6 \t BFS Algorithm \t" << WhoAmI << endl;
cout << "///////////////////////////////////////////////////////////////////////////////////////////////////// " << endl;
 
	string s;

	graph G; 
	
	node_array<string> name;

	node_array<int> dist(G,-1); 	// distances from the root of the BFS tree
						// Initially all unreached (encoded by -1)

	edge_array<int> length(G,1); 	// lengths of edges in the graph G...
	
	list<edge> E;			// the list of BFS Tree edges...

	node v;
	edge e;

	cout << "...GIVING A GRAPH AS INPUT..." << endl; 

	construct_graph(G,name,length); 

	myprint(G,name,length);


	//// DIAVASMA TOU KOMVOU (rootnode) POU XEKINAEI H BFS...
	node rootnode;

	///////////////	 PROVIDE YOUR CODE HERE		///////////////	


	dist.init(G);
	BFS(E, G, dist, length, rootnode);


	//// PRINT BFS: 	(a) dist[u] 
	////			(b) source(e), target(e), length[e] APO to list<edge> E
	////			(c) time needed for BFS	

	///////////////	 PROVIDE YOUR CODE HERE		///////////////		

} 

