# include # include # include "polyomino_enumerate.h" int main ( ); void polyomino_enumerate_chiral_test ( ); void polyomino_enumerate_fixed_test ( ); void polyomino_enumerate_free_test ( ); /******************************************************************************/ int main ( ) /******************************************************************************/ /* Purpose: MAIN is the main program for POLYOMINO_ENUMERATE_TEST. Discussion: POLYOMINO_ENUMERATE_TEST tests the POLYOMINO_ENUMERATE library. Licensing: This code is distributed under the GNU LGPL license. Modified: 18 May 2018 Author: John Burkardt */ { timestamp ( ); printf ( "\n" ); printf ( "POLYOMINO_ENUMERATE_TEST:\n" ); printf ( " C version,\n" ); printf ( " POLYOMINO_ENUMERATE enumerates several types of polyomino.\n" ); polyomino_enumerate_chiral_test ( ); polyomino_enumerate_fixed_test ( ); polyomino_enumerate_free_test ( ); /* Terminate. */ printf ( "\n" ); printf ( "POLYOMINO_ENUMERATE_TEST:\n" ); printf ( " Normal end of execution.\n" ); printf ( "\n" ); timestamp ( ); return 0; } /******************************************************************************/ void polyomino_enumerate_chiral_test ( ) /******************************************************************************/ /* Purpose: POLYOMINO_ENUMERATE_CHIRAL_TEST tests POLYOMINO_CHIRAL. Licensing: This code is distributed under the GNU LGPL license. Modified: 18 May 2018 Author: John Burkardt */ { int n_data; long long int number; int order; printf ( "\n" ); printf ( "POLYOMINO_ENUMERATE_CHIRAL_TEST:\n" ); printf ( " POLYOMINO_ENUMERATE_CHIRAL returns the number of chiral\n" ); printf ( " polyominoes of a given order;\n" ); n_data = 0; printf ( "\n" ); printf ( " Order Number\n" ); printf ( "\n" ); for ( ; ; ) { polyomino_enumerate_chiral ( &n_data, &order, &number ); if ( n_data == 0 ) { break; } printf ( " %4d %24lld\n", order, number ); } return; } /******************************************************************************/ void polyomino_enumerate_fixed_test ( ) /******************************************************************************/ /* Purpose: POLYOMINO_ENUMERATE_FIXED_TEST tests POLYOMINO_FIXED. Licensing: This code is distributed under the GNU LGPL license. Modified: 18 May 2018 Author: John Burkardt */ { int n_data; long long int number; int order; printf ( "\n" ); printf ( "POLYOMINO_ENUMERATE_FIXED_TEST:\n" ); printf ( " POLYOMINO_ENUMERATE_FIXED returns the number of fixed\n" ); printf ( " polyominoes of a given order;\n" ); n_data = 0; printf ( "\n" ); printf ( " Order Number\n" ); printf ( "\n" ); for ( ; ; ) { polyomino_enumerate_fixed ( &n_data, &order, &number ); if ( n_data == 0 ) { break; } printf ( " %4d %24lld\n", order, number ); } return; } /******************************************************************************/ void polyomino_enumerate_free_test ( ) /******************************************************************************/ /* Purpose: POLYOMINO_ENUMERATE_FREE_TEST tests POLYOMINO_ENUMERATE_FREE. Licensing: This code is distributed under the GNU LGPL license. Modified: 18 May 2018 Author: John Burkardt */ { int n_data; long long int number; int order; printf ( "\n" ); printf ( "POLYOMINO_ENUMERATE_FREE_TEST:\n" ); printf ( " POLYOMINO_ENUMERATE_FREE returns the number of free\n" ); printf ( " polyominoes of a given order;\n" ); n_data = 0; printf ( "\n" ); printf ( " Order Number\n" ); printf ( "\n" ); for ( ; ; ) { polyomino_enumerate_free ( &n_data, &order, &number ); if ( n_data == 0 ) { break; } printf ( " %4d %24lld\n", order, number ); } return; }