Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hqr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
hqr
Commits
b4dc986b
Commit
b4dc986b
authored
7 years ago
by
BOUCHERIE Raphael
Browse files
Options
Downloads
Patches
Plain Diff
Updated testing file for drawing the tree
parent
23cf009b
No related branches found
No related tags found
1 merge request
!5
Print tree
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/libhqr.h
+3
-3
3 additions, 3 deletions
include/libhqr.h
testings/testing_treedraw.c
+20
-13
20 additions, 13 deletions
testings/testing_treedraw.c
with
23 additions
and
16 deletions
include/libhqr.h
+
3
−
3
View file @
b4dc986b
...
...
@@ -82,9 +82,9 @@ typedef enum libhqr_typefacto_ {
* @brief Structure for stocking informations in order to draw the tree
*/
typedef
struct
libhqr_treedraw_s
{
int
k
;
/**<The factorization step for the color*/
int
*
tiles
;
/**<Table for tiles*/
int
tiles_size
;
/**<Size of the table*/
int
k
;
/**<
The factorization step for the color
*/
int
*
tiles
;
/**<
Table for tiles
*/
int
tiles_size
;
/**<
Size of the table
*/
}
libhqr_treedraw_t
;
/**
...
...
This diff is collapsed.
Click to expand it.
testings/testing_treedraw.c
+
20
−
13
View file @
b4dc986b
...
...
@@ -17,7 +17,9 @@
#include
<stdio.h>
#include
<string.h>
#include
<stdlib.h>
#include
"libdraw.h"
#include
"libhqr.h"
#define WIDTH 50
#define HEIGHT 50
...
...
@@ -25,17 +27,22 @@
int
main
(
int
argc
,
char
**
argv
)
{
FILE
*
tree
=
fopen
(
"tree.svg"
,
"w+"
);
int
x
,
y
,
i
,
j
;
libhqr_writeheader
(
tree
);
libhqr_drawline
(
125
,
100
,
125
,
800
,
tree
);
for
(
i
=
1
;
i
<
5
;
i
++
){
for
(
j
=
1
;
j
<
9
;
j
++
){
x
=
100
*
i
;
y
=
100
*
j
;
libhqr_drawTS
(
x
,
y
,
WIDTH
,
HEIGHT
,
3
,
tree
);
}
}
libhqr_writeend
(
tree
);
return
1
;
libhqr_tree_t
qrtree
;
libhqr_tiledesc_t
matrix
;
int
minMN
;
libhqr_treedraw_t
drawing
;
matrix
.
nodes
=
1
;
matrix
.
p
=
1
;
matrix
.
mt
=
8
;
matrix
.
nt
=
4
;
libhqr_hqr_init
(
&
qrtree
,
LIBHQR_QR
,
&
matrix
,
LIBHQR_BINARY_TREE
,
LIBHQR_FLAT_TREE
,
1
,
1
,
0
,
0
);
minMN
=
libhqr_imin
(
matrix
.
mt
,
matrix
.
nt
);
drawing
.
tiles
=
(
int
*
)
malloc
(
minMN
*
sizeof
(
int
));
drawing
.
tiles_size
=
minMN
;
FILE
*
tree
=
fopen
(
"tree.svg"
,
"w+"
);
libhqr_writeheader
(
tree
);
libhqr_treewalk
(
&
qrtree
,
0
);
libhqr_writeend
(
tree
);
free
(
drawing
.
tiles
);
return
1
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment