Institut de Robòtica i Informàtica Industrial
KRD Group

The CuikSuite Project

cuiksort.c File Reference

Main body of the cuiksort application. More...

#include "box_list.h"
#include "box.h"
#include "glr.h"
#include "llr.h"
#include "defines.h"
#include "error.h"
#include "filename.h"
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main (int argc, char **arg)
 Main body of the cuiksort application.

Detailed Description

Continuous solution sets need to be sorted for for its animation to be smooth. Moreover, when sorting the boxes we determine the number of connected components of the solution set.

This code and its dependencies (llist.h, llist.c, glr.h, glr.c, general.h) are not documented using doxygen but directly in the code because they come from old developments.

Definition in file cuiksort.c.


Function Documentation

int main ( int  argc,
char **  arg 
)

Main body of the cuiksort application.

Usage:

  • cuiksort base_name topology trav_mode step_size

Where:

  • base_name: The name of the .sol file without the extension
  • topology: May be 'r' (for Rn topology) or 't' (for torus topology). Optional. The default value is 'r'.
  • trav_mode: May be 'd' (depth 1st) or 'c' (for cycles) or 'u' (for unordered). Optional. The default value is 'd'.
  • step_size: Stepsize used when printing the boxes of a walk to a file. Optional. The default value is '1'.

If one of the optional parameters is given then all the previous parameters need to be given too.

Parameters:
argc Number of elements in the command line that starts the application (i.e., the cuiksort command itself and its arguments).
arg Strings with the arguments.
Returns:
EXIT_SUCCESS (0) if the execution worked out fine and EXIT_FAILURE if not.

Definition at line 558 of file cuiksort.c.

References CreateFileName(), DeleteFileName(), Error(), GetFileFullName(), ListSize(), PrintBox(), ReadListOfBoxes(), and SOL_EXT.

Here is the call graph for this function: