forked from jontodd/r.refine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpqelement.c
55 lines (50 loc) · 1.29 KB
/
pqelement.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* ************************************************************
*
* MODULE: r.refine
*
* Authors: Jon Todd <[email protected]>, Laura Toma <[email protected]>
* Bowdoin College, USA
*
* Purpose: convert grid data to TIN
*
* COPYRIGHT:
* This program is free software under the GNU General Public
* License (>=v2). Read the file COPYING that comes with GRASS
* for details.
*
*
************************************************************ */
/******************************************************************************
*
* pqelement.c functions for an element in a priority queue
*
* AUTHOR(S): Jonathan Todd - <[email protected]>
*
* UPDATED: jt 2005-08-15
*
* COMMENTS:
*
*****************************************************************************/
#include <assert.h>
#include "pqelement.h"
#include "geom_tin.h"
#include "constants.h"
//
// determine the priority of an element
//
double getPriority(PQ_elemType t) {
assert(t);
//return -error;
return -t->maxErrorValue;
}
//
// print a elements
//
void printElem(PQ_elemType t) {
assert(t);
char str[100];
sprintf(str,"[%s] x:%%d y:%%d z:%s ptr:%%p",
ELEV_TYPE_PRINT_CHAR,ELEV_TYPE_PRINT_CHAR);
printf(str, t->maxErrorValue,t->maxE->x,t->maxE->y,
t->maxE->z,t->maxE);
}