~ubuntu-branches/ubuntu/saucy/ladr/saucy

« back to all changes in this revision

Viewing changes to ladr/order.h.bak

  • Committer: Package Import Robot
  • Author(s): Frank Lichtenheld
  • Date: 2013-05-25 11:43:32 UTC
  • mfrom: (5.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20130525114332-lkzco1dti2hwrf7v
Tags: 0.0.200911a-2
* QA upload.
* Upload to unstable.
* Change maintainer to QA group.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  Copyright (C) 2006, 2007 William McCune
2
 
 
3
 
    This file is part of the LADR Deduction Library.
4
 
 
5
 
    The LADR Deduction Library is free software; you can redistribute it
6
 
    and/or modify it under the terms of the GNU General Public License,
7
 
    version 2.
8
 
 
9
 
    The LADR Deduction Library is distributed in the hope that it will be
10
 
    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
    GNU General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU General Public License
15
 
    along with the LADR Deduction Library; if not, write to the Free Software
16
 
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
 
*/
18
 
 
19
 
#ifndef TP_ORDER_H
20
 
#define TP_ORDER_H
21
 
 
22
 
#include <stdlib.h>  /* for malloc/free */
23
 
 
24
 
/* INTRODUCTION
25
 
This package defines Ordertype and has a generic sorting 
26
 
routine merge_sort() that can be used to sort any kind of data.
27
 
*/
28
 
 
29
 
/* Public definitions */
30
 
 
31
 
/* basic order relations */
32
 
 
33
 
typedef enum { NOT_COMPARABLE,
34
 
               SAME_AS,
35
 
               LESS_THAN,
36
 
               GREATER_THAN,
37
 
               LESS_THAN_OR_SAME_AS,
38
 
               GREATER_THAN_OR_SAME_AS,
39
 
               NOT_LESS_THAN,
40
 
               NOT_GREATER_THAN
41
 
             } Ordertype;
42
 
 
43
 
/* End of public definitions */
44
 
 
45
 
/* Public function prototypes from order.c */
46
 
 
47
 
void merge_sort_recurse(void *a[],    /* array to sort */
48
 
                        void *w[],    /* work array */
49
 
                        int start,    /* index of first element */
50
 
                        int end,      /* index of last element */
51
 
                        Ordertype (*comp_proc) (void *, void *));
52
 
 
53
 
void merge_sort(void *a[],   /* array to sort */
54
 
                int n,       /* size of array */
55
 
                Ordertype (*comp_proc) (void *, void *));
56
 
 
57
 
Ordertype compare_vecs(int *a, int *b, int n);
58
 
 
59
 
void copy_vec(int *a, int *b, int n);
60
 
 
61
 
#endif  /* conditional compilation of whole file */