version 1.7, 2018/04/04 09:52:03 |
version 1.8, 2018/04/05 06:17:27 |
|
|
/* -*- mode: C; coding: euc-japan -*- */ |
/* -*- mode: C; coding: euc-japan -*- */ |
/* $OpenXM: OpenXM/src/ox_toolkit/print.c,v 1.6 2018/04/04 09:44:09 ohara Exp $ */ |
/* $OpenXM: OpenXM/src/ox_toolkit/print.c,v 1.7 2018/04/04 09:52:03 ohara Exp $ */ |
|
|
/* |
/* |
Functions in this module print a given CMO to console. |
Functions in this module print a given CMO to console. |
Line 20 static void print_cmo_bf(cmo_bf* c); |
|
Line 20 static void print_cmo_bf(cmo_bf* c); |
|
static void print_cmo_zz(cmo_zz* c); |
static void print_cmo_zz(cmo_zz* c); |
static void print_cmo_qq(cmo_qq* c); |
static void print_cmo_qq(cmo_qq* c); |
static void print_cmo_tree(cmo_tree* c); |
static void print_cmo_tree(cmo_tree* c); |
|
static void print_cmo_polynomial_in_one_variable(cmo_polynomial_in_one_variable* c); |
|
static void print_cmo_recursive_polynomial(cmo_recursive_polynomial* c); |
|
|
void print_cmo(cmo* c) |
void print_cmo(cmo* c) |
{ |
{ |
Line 68 void print_cmo(cmo* c) |
|
Line 70 void print_cmo(cmo* c) |
|
case CMO_TREE: |
case CMO_TREE: |
print_cmo_tree((cmo_tree *)c); |
print_cmo_tree((cmo_tree *)c); |
break; |
break; |
|
case CMO_POLYNOMIAL_IN_ONE_VARIABLE: |
|
print_cmo_polynomial_in_one_variable((cmo_polynomial_in_one_variable *)c); |
|
break; |
|
case CMO_RECURSIVE_POLYNOMIAL: |
|
print_cmo_recursive_polynomial((cmo_recursive_polynomial *)c); |
|
break; |
default: |
default: |
ox_printf("\nprint_cmo() does not know how to print cmo of type %d.\n", tag); |
ox_printf("\nprint_cmo() does not know how to print cmo of type %d.\n", tag); |
} |
} |
Line 136 static void print_cmo_tree(cmo_tree* c) |
|
Line 144 static void print_cmo_tree(cmo_tree* c) |
|
print_cmo(c->attributes); |
print_cmo(c->attributes); |
ox_printf(", "); |
ox_printf(", "); |
print_cmo(c->leaves); |
print_cmo(c->leaves); |
|
ox_printf(")"); |
|
} |
|
|
|
|
|
static void print_cmo_polynomial_in_one_variable(cmo_polynomial_in_one_variable* c) |
|
{ |
|
int i; |
|
cell *cc; |
|
ox_printf(", %d", c->var); |
|
for(i=0; i<c->length; i++) { |
|
cc = list_nth_cell((cmo_list *)c, i); |
|
ox_printf(", %d, ", cc->exp); |
|
print_cmo(cc->cmo); |
|
} |
|
ox_printf(")"); |
|
} |
|
|
|
static void print_cmo_recursive_polynomial(cmo_recursive_polynomial* c) |
|
{ |
|
ox_printf(", "); |
|
print_cmo((cmo *)c->ringdef); |
|
ox_printf(", "); |
|
print_cmo(c->coef); |
ox_printf(")"); |
ox_printf(")"); |
} |
} |
|
|