#include <gudhi/Simplex_tree.h>
#include <iostream>
#include <ctime>
#include <string>
#include <utility>  
typedef int Vertex_handle;
typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::undirectedS,
                                boost::property < vertex_filtration_t, Filtration_value >,
                                boost::property < edge_filtration_t, Filtration_value > > Graph_t;
int main(int argc, char * const argv[]) {
  if (argc != 3) {
    std::cerr << "Usage: " << argv[0]
        << " path_to_file_graph max_dim \n";
    return 0;
  }
  std::string filegraph = argv[1];
  int max_dim = atoi(argv[2]);
  clock_t start, end;
  
  start = clock();
  auto g = read_graph<Graph_t, Filtration_value, Vertex_handle>(filegraph);
  
  end = clock();
  std::cout << "Insert the 1-skeleton in the simplex tree in "
      << static_cast<double>(end - start) / CLOCKS_PER_SEC << " s. \n";
  start = clock();
  
  end = clock();
  std::cout << "max_dim = " << max_dim << "\n";
  std::cout << "Expand the simplex tree in "
      << static_cast<double>(end - start) / CLOCKS_PER_SEC << " s. \n";
  std::cout << "Information of the Simplex Tree: " << std::endl;
  std::cout << 
"  Number of vertices = " << st.
num_vertices() << 
" ";
  std::cout << 
"  Number of simplices = " << st.
num_simplices() << std::endl;
  std::cout << std::endl << std::endl;
  std::cout << "Iterator on vertices: ";
    std::cout << vertex << " ";
  }
  std::cout << std::endl;
  std::cout << std::endl << std::endl;
  std::cout << "Iterator on simplices: " << std::endl;
    std::cout << "   ";
      std::cout << vertex << " ";
    }
    std::cout << std::endl;
  }
  std::cout << std::endl << std::endl;
  std::cout << "Iterator on Simplices in the filtration, with [filtration value]:" << std::endl;
    std::cout << 
"   " << 
"[" << st.
filtration(f_simplex) << 
"] ";
      std::cout << vertex << " ";
    }
    std::cout << std::endl;
  }
  std::cout << std::endl << std::endl;
  std::cout << "Iterator on Simplices in the filtration, and their boundary simplices:" << std::endl;
    std::cout << 
"   " << 
"[" << st.
filtration(f_simplex) << 
"] ";
      std::cout << vertex << " ";
    }
    std::cout << std::endl;
      std::cout << 
"      " << 
"[" << st.
filtration(b_simplex) << 
"] ";
        std::cout << vertex << " ";
      }
      std::cout << std::endl;
    }
  }
  return 0;
}