1 // 2 // debug.h 3 // libmsym 4 // 5 // Created by Marcus Johansson on 07/11/14. 6 // Copyright (c) 2014 Marcus Johansson. 7 // 8 // Distributed under the MIT License ( See LICENSE file or copy at http://opensource.org/licenses/MIT ) 9 // 10 11 #ifndef __MSYM__DEBUG_h 12 #define __MSYM__DEBUG_h 13 14 #include "msym.h" 15 16 #ifdef LIBMSYM_DEBUG 17 #include <stdlib.h> 18 #include "permutation.h" 19 20 #define clean_debug_printf(...) fprintf (stderr, __VA_ARGS__) 21 #define debug_printTransform(R,C,M) do { printTransform((R),(C),(M)); } while(0) 22 #define debug_printSubspace(C,L,S) do { printSubspace((C),(L),(S)); } while(0) 23 #define debug_printPermutation(P) do { printPermutation((P)); } while(0) 24 #define debug_printCharacterTable(C) do { printCharacterTable((C)); } while(0) 25 26 27 void printTransform(int r, int c, double M[r][c]); 28 void printPermutation(msym_permutation_t *perm); 29 void printSubspace(msym_character_table_t *ct, int l, msym_subrepresentation_space_t srs[l]); 30 void printCharacterTable(msym_character_table_t *ct); 31 32 #else 33 #define clean_debug_printf(fmt, ...) do{} while(0) 34 #define debug_printTransform(R,C,M) do {} while(0) 35 #define debug_printSubspace(C,L,S) do {} while(0) 36 #define debug_printPermutation(P) do {} while(0) 37 #define debug_printCharacterTable(C) do {} while(0) 38 39 40 #endif 41 42 #endif /* defined(__MSYM__DEBUG_h) */ 43