Commit b5778193 authored by Renaud Pacalet's avatar Renaud Pacalet
Browse files

Better stats output

parent dd439aa9
......@@ -2,7 +2,7 @@
#include "make-standard-qc-matrix.h"
int main(void) {
int n, r, c, t, min, max;
int n, r, c, t, min, max, o, oo;
int num = 14;
const int *mats[] = {
......@@ -43,27 +43,38 @@ int main(void) {
for(r = 0; r < rows[n]; r++) {
printf("%3d", r);
}
oo = 0;
printf("\n%14s", "ORTHOGONAL:");
for(r = 0; r < rows[n]; r++) {
int o = 1;
for(r = 0; r < rows[n] - 1; r++) {
o = 1;
for(c = 0; c < cols[n]; c++) {
if(n < 12) {
if(r > 0 && mats[n][r * cols[n] + c] >= 0 && mats[n][(r - 1) * cols[n] + c] >= 0) {
if(mats[n][r * cols[n] + c] >= 0 && mats[n][(r + 1) * cols[n] + c] >= 0) {
o = 0;
}
}
else {
if(r > 0 && mats[n][r * cols[n] + c] > 0 && mats[n][(r - 1) * cols[n] + c] > 0) {
if(mats[n][r * cols[n] + c] > 0 && mats[n][(r + 1) * cols[n] + c] > 0) {
o = 0;
}
}
}
if(r > 0 && o) {
printf("%3s", "X");
if((o == 1) && (oo == 0)) {
printf("%3s", " <");
}
else if((o == 1) && (oo == 1)) {
printf("%3s", "--X");
}
else if(oo == 1) {
printf("%3s", "-->");
}
else {
printf("%3s", "");
printf("%3s", " ");
}
oo = o;
}
if(o == 1) {
printf("%3s", "-->");
}
printf("\n%14s", "DEGREE:");
for(r = 0; r < rows[n]; r++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment