annotate src/coord.c @ 5:9c331ec9e210

SVG path is partially supported
author Thinker K.F. Li <thinker@branda.to>
date Sat, 26 Jul 2008 01:37:35 +0800
parents 164162781a7a
children 79e9edf4c00a
rev   line source
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
1 /*! \brief Implement coordination tranform mechanism.
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
2 * \file
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
3 * This file implements coordination transforming for containers.
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
4 */
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
5 #include <stdio.h>
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
6 #include <string.h>
5
9c331ec9e210 SVG path is partially supported
Thinker K.F. Li <thinker@branda.to>
parents: 3
diff changeset
7 #include "mb_types.h"
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
8
3
164162781a7a Test cairo with Xlib surface
Thinker K.F. Li <thinker@branda.to>
parents: 2
diff changeset
9 /* To keep possibility of changing type of aix */
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
10 #define MUL(a, b) ((a) * (b))
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
11 #define ADD(a, b) ((a) + (b))
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
12 #define DIV(a, b) ((a) / (b))
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
13 #define SUB(a, b) ((a) - (b))
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
14
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
15 static void mul_matrix(co_aix *m1, co_aix *m2, co_aix *dst) {
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
16 dst[0] = ADD(MUL(m1[0], m2[0]), MUL(m1[1], m2[3]));
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
17 dst[1] = ADD(MUL(m1[0], m2[1]), MUL(m1[1], m2[4]));
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
18 dst[2] = ADD(ADD(MUL(m1[0], m2[2]), MUL(m1[1], m2[5])), m1[2]);
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
19 dst[3] = ADD(MUL(m1[3], m2[0]), MUL(m1[4], m2[3]));
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
20 dst[4] = ADD(MUL(m1[3], m2[1]), MUL(m1[4], m2[4]));
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
21 dst[5] = ADD(ADD(MUL(m1[3], m2[2]), MUL(m1[4], m2[5])), m1[5]);
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
22 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
23
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
24 /*! \brief Compute agrregated transform function.
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
25 *
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
26 * Base on parent's aggregated matrix if it is existed, or use transform
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
27 * matrix as aggregated matrix.
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
28 */
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
29 static void compute_transform_function(coord_t *visit) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
30 if(visit->parent)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
31 mul_matrix(visit->parent->aggr_matrix,
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
32 visit->matrix, visit->aggr_matrix);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
33 else
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
34 memcpy(visit->aggr_matrix, visit->matrix, sizeof(visit->matrix));
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
35 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
36
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
37 /*! \brief Update aggregate matrices of elements under a sub-tree.
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
38 *
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
39 * A subtree is specified by the root of it. All elements in the subtree
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
40 * are effected by that changes of matrix of the subtree root.
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
41 */
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
42 void update_aggr_matrix(coord_t *start) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
43 coord_t *visit, *child, *next;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
44
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
45 compute_transform_function(start);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
46
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
47 visit = start;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
48 while(visit) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
49 child = visit->children;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
50 while(child) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
51 compute_transform_function(child);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
52 child = child->sibling;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
53 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
54
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
55 if(visit->children)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
56 visit = visit->children;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
57 else if(visit->sibling)
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
58 visit = visit->sibling;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
59 else {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
60 next = NULL;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
61 while(visit->parent && visit->parent != start) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
62 visit = visit->parent;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
63 if(visit->sibling) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
64 next = visit->sibling;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
65 break;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
66 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
67 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
68 visit = next;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
69 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
70 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
71 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
72
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
73 void coord_init(coord_t *co, coord_t *parent) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
74 memset(co, 0, sizeof(coord_t));
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
75 if(parent) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
76 co->parent = parent;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
77 co->sibling = parent->children;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
78 parent->children = co;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
79 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
80 co->matrix[0] = 1;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
81 co->matrix[4] = 1;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
82 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
83
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
84 void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y) {
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
85 co_aix nx, ny;
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
86
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
87 nx = ADD(ADD(MUL(co->aggr_matrix[0], *x),
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
88 MUL(co->aggr_matrix[1], *y)),
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
89 co->aggr_matrix[2]);
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
90 ny = ADD(ADD(MUL(co->aggr_matrix[3], *x),
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
91 MUL(co->aggr_matrix[4], *y)),
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
92 co->aggr_matrix[5]);
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
93 *x = nx;
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
94 *y = ny;
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
95 }
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
96
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
97 #ifdef UNITTEST
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
98
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
99 #include <CUnit/Basic.h>
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
100
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
101 void test_update_aggr_matrix(void) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
102 coord_t elms[6];
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
103 co_aix x, y;
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
104
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
105 coord_init(elms, NULL);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
106 coord_init(elms + 1, elms);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
107 coord_init(elms + 2, elms);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
108 coord_init(elms + 3, elms + 1);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
109 coord_init(elms + 4, elms + 1);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
110 coord_init(elms + 5, elms + 2);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
111
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
112 /* | 2 -1 0 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
113 * | 0 1 0 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
114 * | 0 0 1 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
115 */
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
116 elms[0].matrix[0] = 2;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
117 elms[0].matrix[1] = -1;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
118
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
119 /* | 1 3 0 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
120 * | 5 1 0 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
121 * | 0 0 1 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
122 */
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
123 elms[1].matrix[1] = 3;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
124 elms[1].matrix[3] = 5;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
125
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
126 update_aggr_matrix(elms);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
127
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
128 /* | -3 5 0 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
129 * | 5 1 0 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
130 * | 0 0 1 |
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
131 */
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
132 CU_ASSERT(elms[3].aggr_matrix[0] == -3);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
133 CU_ASSERT(elms[3].aggr_matrix[1] == 5);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
134 CU_ASSERT(elms[3].aggr_matrix[2] == 0);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
135 CU_ASSERT(elms[3].aggr_matrix[3] == 5);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
136 CU_ASSERT(elms[3].aggr_matrix[4] == 1);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
137 CU_ASSERT(elms[3].aggr_matrix[5] == 0);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
138
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
139 CU_ASSERT(elms[4].aggr_matrix[0] == -3);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
140 CU_ASSERT(elms[4].aggr_matrix[1] == 5);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
141 CU_ASSERT(elms[4].aggr_matrix[2] == 0);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
142 CU_ASSERT(elms[4].aggr_matrix[3] == 5);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
143 CU_ASSERT(elms[4].aggr_matrix[4] == 1);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
144 CU_ASSERT(elms[4].aggr_matrix[5] == 0);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
145
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
146 CU_ASSERT(elms[5].aggr_matrix[0] == 2);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
147 CU_ASSERT(elms[5].aggr_matrix[1] == -1);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
148 CU_ASSERT(elms[5].aggr_matrix[2] == 0);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
149 CU_ASSERT(elms[5].aggr_matrix[3] == 0);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
150 CU_ASSERT(elms[5].aggr_matrix[4] == 1);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
151 CU_ASSERT(elms[5].aggr_matrix[5] == 0);
2
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
152
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
153 x = 50;
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
154 y = 99;
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
155 coord_trans_pos(elms + 5, &x, &y);
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
156 CU_ASSERT(x == 1);
31402929c587 Transform position
Thinker K.F. Li <thinker@branda.to>
parents: 1
diff changeset
157 CU_ASSERT(y == 99);
1
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
158 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
159
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
160 CU_pSuite get_coord_suite(void) {
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
161 CU_pSuite suite;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
162
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
163 suite = CU_add_suite("Suite_coord", NULL, NULL);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
164 CU_ADD_TEST(suite, test_update_aggr_matrix);
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
165
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
166 return suite;
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
167 }
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
168
b5c0162ccf69 Coordination tranforming
Thinker K.F. Li <thinker@branda.to>
parents:
diff changeset
169 #endif