-
Notifications
You must be signed in to change notification settings - Fork 0
prvnsmpth/merge-sort
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
MERGE SORT IMPLEMENTATION ========================= Praveen Sampath prvn.exe@gmail.com The main sort method is present in the file sort.c. This method depends on other auxiliary methods defined in sort.c and a heap implementation in heap.h and heap.c. Compilation ----------- $ make sort Usage ----- Usage: ./sort [-o output_file] [-b buffer_size] [-a attr_list] input_file The only required argument is the input file name. Options: -o output_file Specify output file name. If not specified, the sorted data is written to 'output.bin'. -b buffer_size Set the buffer size (in bytes). The default buffer size is 100000 bytes. -a attr_list Specify the attributes to be considered for sorting, separated by comma. E.g., -a 3,4 or -a 8,4,-3. There should be NO SPACE between attribute index and the comma. If no attribute list is supplied, the data is sorted on the first column. Data file format ---------------- The input data file (the file to be sorted) is a binary file that is structured as follows: Metadata 4 byte unsigned int: number of attributes (n) followed by metadata of n attributes, each of the form type (4 bytes), length (4 bytes) Type is one of the following: 1: int, 2: double, 3: char (fixed length) Data Records are fixed length. Refer to the sort function in sort.c to see how the metadata and data are read from the input binary file
About
An external merge sort implementation.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published