# include # include # include using namespace std; # include "polyomino_enumerate.hpp" int main ( ); void polyomino_enumerate_chiral_test ( ); void polyomino_enumerate_fixed_test ( ); void polyomino_enumerate_free_test ( ); //****************************************************************************80 int main ( ) //****************************************************************************80 // // 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 ( ); cout << "\n"; cout << "POLYOMINO_ENUMERATE_TEST:\n"; cout << " C++ version,\n"; cout << " POLYOMINO_ENUMERATE enumerates various classes of polyomino.\n"; polyomino_enumerate_chiral_test ( ); polyomino_enumerate_fixed_test ( ); polyomino_enumerate_free_test ( ); // // Terminate. // cout << "\n"; cout << "POLYOMINO_ENUMERATE_TEST:\n"; cout << " Normal end of execution.\n"; cout << "\n"; timestamp ( ); return 0; } //****************************************************************************80 void polyomino_enumerate_chiral_test ( ) //****************************************************************************80 // // Purpose: // // POLYOMINO_ENUMERATE_CHIRAL_TEST tests POLYOMINO_ENUMERATE_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; cout << "\n"; cout << "POLYOMINO_ENUMERATE_CHIRAL_TEST:\n"; cout << " POLYOMINO_ENUMERATE_CHIRAL returns the number of chiral\n"; cout << " polyominoes of a given order;\n"; n_data = 0; cout << "\n"; cout << " Order Number\n"; cout << "\n"; for ( ; ; ) { polyomino_enumerate_chiral ( n_data, order, number ); if ( n_data == 0 ) { break; } cout << " " << setw(4) << order << " " << setw(24) << number << "\n"; } return; } //****************************************************************************80 void polyomino_enumerate_fixed_test ( ) //****************************************************************************80 // // Purpose: // // POLYOMINO_ENUMERATE_FIXED_TEST tests POLYOMINO_ENUMERATE_FIXED. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 13 April 2018 // // Author: // // John Burkardt // { int n_data; long long int number; int order; cout << "\n"; cout << "POLYOMINO_ENUMERATE_FIXED_TEST:\n"; cout << " POLYOMINO_ENUMERATE_FIXED returns the number of fixed\n"; cout << " polyominoes of a given order;\n"; n_data = 0; cout << "\n"; cout << " Order Number\n"; cout << "\n"; for ( ; ; ) { polyomino_enumerate_fixed ( n_data, order, number ); if ( n_data == 0 ) { break; } cout << " " << setw(4) << order << " " << setw(24) << number << "\n"; } return; } //****************************************************************************80 void polyomino_enumerate_free_test ( ) //****************************************************************************80 // // Purpose: // // POLYOMINO_ENUMERATE_FREE_TEST tests POLYOMINO_ENUMERATE_FREE. // // Licensing: // // This code is distributed under the GNU LGPL license. // // Modified: // // 13 April 2018 // // Author: // // John Burkardt // { int n_data; long long int number; int order; cout << "\n"; cout << "POLYOMINO_ENUMERATE_FREE_TEST:\n"; cout << " POLYOMINO_ENUMERATE_FREE returns the number of free\n"; cout << " polyominoes of a given order;\n"; n_data = 0; cout << "\n"; cout << " Order Number\n"; cout << "\n"; for ( ; ; ) { polyomino_enumerate_free ( n_data, order, number ); if ( n_data == 0 ) { break; } cout << " " << setw(4) << order << " " << setw(24) << number << "\n"; } return; }