#ifdef __BORLANDC__
#include <condefs.h>
#endif
#include <time.h>           
#include <stdlib.h>           
#include <iSeeML/fwdPaths>
int main() 
{
  
  
  const int nbConfig = 1000; 
  
  
  
  const double xSize = 50, ySize = 50; 
  
  const double minTurnRadius = 5; 
  
  const double minTurnDist   = 5; 
  
  
#ifdef WIN32
  srand((unsigned int) time(NULL));
#else
  srandom((unsigned int) time(NULL));
#endif
  
  const int maxRnd = ~(01 << 31); 
  
  
  int i; 
#ifdef WIN32
#define random rand
#endif
  for(i = 0; i < nbConfig; i++) {
    
    const double x = xSize * random() / maxRnd, 
      y  = ySize * random() / maxRnd, 
      th = (2.0 * random() / maxRnd - 1) * M_PI; 
    
  
  clock_t ctime; 
  double time, atime; 
  int j, nbPaths; 
  
  const double maxCurv = 1 / minTurnRadius; 
  
  ctime = clock(); 
  
  for(i = 0, nbPaths = 0; i < nbConfig; i++) 
    for(j = 0; j < nbConfig; j++) 
      if (i != j) { 
    
                    maxCurv); 
    
    nbPaths++; } 
  
  ctime = clock() - ctime; 
  time  = ctime * 1.0 / CLOCKS_PER_SEC; 
  atime = time * 1000 / nbPaths; 
  cout << "Elapsed time for " << nbPaths 
       << " Dubins' paths computation: \n\t" 
       << time << " s, average "<< atime << " ms\n"; 
  
  
  const double maxCurvDeriv = maxCurv / minTurnDist; 
  
  
  double limDeflect, turnRadius, turnAngle; 
                     limDeflect, turnRadius, 
                     turnAngle); 
  
  ctime = clock(); 
  
  for(i = 0, nbPaths = 0; i < nbConfig; i++) 
    for(j = 0; j < nbConfig; j++) 
      if (i != j) { 
    
                 maxCurv, maxCurvDeriv, 
                 limDeflect, turnRadius, 
                 turnAngle); 
    
    nbPaths++; } 
  
  ctime = clock() - ctime; 
  time  = ctime * 1.0 / CLOCKS_PER_SEC; 
  atime = time * 1000 / nbPaths; 
  cout << "Elapsed time for " << nbPaths 
       << " FSC paths computation: \n\t" 
       << time << " s, average "<< atime << " ms\n"; 
#ifdef WIN32
  system(pause);
#endif
  return(0); 
}