def monomial_value_test ( ):

#*****************************************************************************80
#
## MONOMIAL_VALUE_TEST tests the MONOMIAL_VALUE library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    07 April 2015
#
#  Author:
#
#    John Burkardt
#
  from i4vec_print               import i4vec_print_test
  from i4vec_transpose_print     import i4vec_transpose_print_test
  from i4vec_uniform_ab          import i4vec_uniform_ab_test
  from monomial_value            import monomial_value_test
  from r8mat_nint                import r8mat_nint_test
  from r8mat_print               import r8mat_print_test
  from r8mat_print_some          import r8mat_print_some_test
  from r8mat_uniform_ab          import r8mat_uniform_ab_test
  from timestamp                 import timestamp

  timestamp ( )
  print ''
  print 'MONOMIAL_VALUE_TEST'
  print '  Python version:'
  print '  Test the MONOMIAL_VALUE library.'
#
#  Utilities:
#
  i4vec_print_test ( )
  i4vec_transpose_print_test ( )
  i4vec_uniform_ab_test ( )

  r8mat_nint_test ( )
  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8mat_uniform_ab_test ( )
#
#  The library.
#
  monomial_value_test ( )
#
#  Terminate.
#
  print ''
  print 'MONOMIAL_VALUE_TEST:'
  print '  Normal end of execution.'
  print ''
  timestamp ( )

  return
Example #2
0
def sort_rc_test():

    #*****************************************************************************80
    #
    ## SORT_RC_TEST tests the SORT_RC library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    11 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from i4vec_print import i4vec_print_test
    from i4vec_uniform_ab import i4vec_uniform_ab_test
    from sort_safe_rc import sort_safe_rc_i4vec_test
    from timestamp import timestamp_test

    print ''
    print 'SORT_RC_TEST'
    print '  Python version:'
    print '  Test the SORT_RC library.'

    i4vec_print_test()
    i4vec_uniform_ab_test()
    sort_safe_rc_i4vec_test()
    timestamp_test()
    #
    #  Terminate.
    #
    print ''
    print 'SORT_RC_TEST:'
    print '  Normal end of execution.'
def sort_rc_test ( ):

#*****************************************************************************80
#
## SORT_RC_TEST tests the SORT_RC library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    11 March 2015
#
#  Author:
#
#    John Burkardt
#
  from i4vec_print         import i4vec_print_test
  from i4vec_uniform_ab    import i4vec_uniform_ab_test
  from sort_safe_rc        import sort_safe_rc_i4vec_test
  from timestamp           import timestamp_test

  print ''
  print 'SORT_RC_TEST'
  print '  Python version:'
  print '  Test the SORT_RC library.'

  i4vec_print_test ( )
  i4vec_uniform_ab_test ( )
  sort_safe_rc_i4vec_test ( )
  timestamp_test ( )
#
#  Terminate.
#
  print ''
  print 'SORT_RC_TEST:'
  print '  Normal end of execution.'
Example #4
0
def test_mat_test ( ):

#*****************************************************************************80
#
## TEST_MAT_TEST tests the TEST_MAT library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    24 March 2015
#
#  Author:
#
#    John Burkardt
#
  from bvec_next_grlex           import bvec_next_grlex_test
  from c8_i                      import c8_i_test
  from c8_normal_01              import c8_normal_01_test
  from c8_uniform_01             import c8_uniform_01_test
  from c8mat_identity            import c8mat_identity_test
  from c8mat_indicator           import c8mat_indicator_test
  from c8mat_uniform_01          import c8mat_uniform_01_test
  from c8vec_print               import c8vec_print_test
  from c8vec_uniform_01          import c8vec_uniform_01_test
  from c8vec_unity               import c8vec_unity_test
  from complete_symmetric_poly   import complete_symmetric_poly_test
  from i4_factor                 import i4_factor_test
  from i4_is_even                import i4_is_even_test
  from i4_is_odd                 import i4_is_odd_test
  from i4_is_prime               import i4_is_prime_test
  from i4_log_10                 import i4_log_10_test
  from i4_modp                   import i4_modp_test
  from i4_rise                   import i4_rise_test
  from i4_rise_values            import i4_rise_values_test
  from i4_sign                   import i4_sign_test
  from i4_uniform_ab             import i4_uniform_ab_test
  from i4_wrap                   import i4_wrap_test
  from i4mat_print               import i4mat_print_test
  from i4mat_print_some          import i4mat_print_some_test
  from i4vec_indicator0          import i4vec_indicator0_test
  from i4vec_print               import i4vec_print_test
  from legendre_symbol           import legendre_symbol_test
  from mertens                   import mertens_test
  from mertens_values            import mertens_values_test
  from moebius                   import moebius_test
  from moebius_values            import moebius_values_test
  from prime                     import prime_test
  from r8_choose                 import r8_choose_test
  from r8_factorial              import r8_factorial_test
  from r8_mop                    import r8_mop_test
  from r8_normal_01              import r8_normal_01_test
  from r8_rise                   import r8_rise_test
  from r8_sign                   import r8_sign_test
  from r8_uniform_01             import r8_uniform_01_test
  from r8_uniform_ab             import r8_uniform_ab_test
  from r8col_swap                import r8col_swap_test
  from r8mat_house_axh           import r8mat_house_axh_test
  from r8mat_house_form          import r8mat_house_form_test
  from r8mat_indicator           import r8mat_indicator_test
  from r8mat_is_eigen_left       import r8mat_is_eigen_left_test
  from r8mat_is_eigen_right      import r8mat_is_eigen_right_test
  from r8mat_is_inverse          import r8mat_is_inverse_test
  from r8mat_is_llt              import r8mat_is_llt_test
  from r8mat_is_null_left        import r8mat_is_null_left_test
  from r8mat_is_null_right       import r8mat_is_null_right_test
  from r8mat_is_plu              import r8mat_is_plu_test
  from r8mat_is_solution         import r8mat_is_solution_test
  from r8mat_mm                  import r8mat_mm_test
  from r8mat_mtm                 import r8mat_mtm_test
  from r8mat_mtv                 import r8mat_mtv_test
  from r8mat_mv                  import r8mat_mv_test
  from r8mat_norm_fro            import r8mat_norm_fro_test
  from r8mat_norm_l1             import r8mat_norm_l1_test
  from r8mat_print               import r8mat_print_test
  from r8mat_print_some          import r8mat_print_some_test
  from r8mat_sub                 import r8mat_sub_test
  from r8mat_transpose           import r8mat_transpose_test
  from r8mat_uniform_01          import r8mat_uniform_01_test
  from r8mat_uniform_ab          import r8mat_uniform_ab_test
  from r8poly_print              import r8poly_print_test
  from r8vec_house_column        import r8vec_house_column_test
  from r8vec_nint                import r8vec_nint_test
  from r8vec_norm_l2             import r8vec_norm_l2_test
  from r8vec_print               import r8vec_print_test
  from r8vec_uniform_01          import r8vec_uniform_01_test
  from r8vec_uniform_ab          import r8vec_uniform_ab_test
  from test_condition            import test_condition
  from test_determinant          import test_determinant
  from test_eigen_left           import test_eigen_left
  from test_eigen_right          import test_eigen_right
  from test_inverse              import test_inverse
  from test_llt                  import test_llt
  from test_null_left            import test_null_left
  from test_null_right           import test_null_right
  from test_plu                  import test_plu
  from test_solution             import test_solution
  from timestamp                 import timestamp_test

  print ''
  print 'TEST_MAT_TEST'
  print '  Python version:'
  print '  Test the TEST_MAT library.'
#
#  Utilities.
#
  bvec_next_grlex_test ( )

  c8_i_test ( )
  c8_normal_01_test ( )
  c8_uniform_01_test ( )

  c8mat_identity_test ( )
  c8mat_indicator_test ( )
  c8mat_uniform_01_test ( )

  c8vec_print_test ( )
  c8vec_uniform_01_test ( )
  c8vec_unity_test ( )

  complete_symmetric_poly_test ( )

  i4_factor_test ( )
  i4_is_even_test ( )
  i4_is_odd_test ( )
  i4_is_prime_test ( )
  i4_log_10_test ( )
  i4_modp_test ( )
  i4_rise_test ( )
  i4_rise_values_test ( )
  i4_sign_test ( )
  i4_uniform_ab_test ( )
  i4_wrap_test ( )

  i4mat_print_test ( )
  i4mat_print_some_test ( )

  i4vec_indicator0_test ( )
  i4vec_print_test ( )

  legendre_symbol_test ( )

  mertens_test ( )
  mertens_values_test ( )

  moebius_test ( )
  moebius_values_test ( )

  prime_test ( )

  r8_choose_test ( )
  r8_factorial_test ( )
  r8_mop_test ( )
  r8_normal_01_test ( )
  r8_rise_test ( )
  r8_sign_test ( )
  r8_uniform_01_test ( )
  r8_uniform_ab_test ( )

  r8col_swap_test ( )

  r8mat_house_axh_test ( )
  r8mat_house_form_test ( )
  r8mat_indicator_test ( )
  r8mat_is_eigen_left_test ( )
  r8mat_is_eigen_right_test ( )
  r8mat_is_inverse_test ( )
  r8mat_is_llt_test ( )
  r8mat_is_null_left_test ( )
  r8mat_is_null_right_test ( )
  r8mat_is_plu_test ( )
  r8mat_is_solution_test ( )
  r8mat_mm_test ( )
  r8mat_mtm_test ( )
  r8mat_mtv_test ( )
  r8mat_mv_test ( )
  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8mat_sub_test ( )
  r8mat_transpose_test ( )
  r8mat_uniform_01_test ( )
  r8mat_uniform_ab_test ( )

  r8poly_print_test ( )

  r8vec_house_column_test ( )
  r8vec_nint_test ( )
  r8vec_norm_l2_test ( )
  r8vec_print_test ( )
  r8vec_uniform_01_test ( )
  r8vec_uniform_ab_test ( )

  timestamp_test ( )
#
#  Interesting stuff.
#
  test_condition ( )
  test_determinant ( )
  test_eigen_left ( )
  test_eigen_right ( )
  test_inverse ( )
  test_llt ( )
  test_null_left ( )
  test_null_right ( )
  test_plu ( )
  test_solution ( )
#
#  Terminate.
#
  print ''
  print 'TEST_MAT_TEST:'
  print '  Normal end of execution.'
  print ''

  return
Example #5
0
def r8lib_test ( ):

#*****************************************************************************80
#
## R8LIB_TEST tests the R8LIB library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    24 May 2015
#
#  Author:
#
#    John Burkardt
#
  from agm_values                 import agm_values_test

  from gamma_values               import gamma_values_test
  from gamma_log_values           import gamma_log_values_test

  from i4_log_10                  import i4_log_10_test
  from i4_sign                    import i4_sign_test
  from i4_uniform_ab              import i4_uniform_ab_test

  from i4vec_indicator0           import i4vec_indicator0_test
  from i4vec_indicator1           import i4vec_indicator1_test
  from i4vec_print                import i4vec_print_test
  from i4vec_transpose_print      import i4vec_transpose_print_test

  from perm0_check                import perm0_check_test
  from perm0_uniform              import perm0_uniform_test

  from perm1_check                import perm1_check_test
  from perm1_uniform              import perm1_uniform_test

  from r8_abs                     import r8_abs_test
  from r8_acos                    import r8_acos_test
  from r8_acosh                   import r8_acosh_test
  from r8_add                     import r8_add_test
  from r8_agm                     import r8_agm_test
  from r8_asinh                   import r8_asinh_test
  from r8_atan                    import r8_atan_test
  from r8_atanh                   import r8_atanh_test
  from r8_big                     import r8_big_test
  from r8_cas                     import r8_cas_test
  from r8_ceiling                 import r8_ceiling_test
  from r8_choose                  import r8_choose_test
  from r8_cosd                    import r8_cosd_test
  from r8_cotd                    import r8_cotd_test
  from r8_cscd                    import r8_cscd_test
  from r8_cube_root               import r8_cube_root_test
  from r8_diff                    import r8_diff_test
  from r8_digit                   import r8_digit_test
  from r8_e                       import r8_e_test
  from r8_epsilon                 import r8_epsilon_test
  from r8_epsilon_compute         import r8_epsilon_compute_test
  from r8_factorial               import r8_factorial_test
  from r8_factorial_values        import r8_factorial_values_test
  from r8_factorial2              import r8_factorial2_test
  from r8_factorial2_values       import r8_factorial2_values_test
  from r8_fall                    import r8_fall_test
  from r8_fall_values             import r8_fall_values_test
  from r8_fractional              import r8_fractional_test
  from r8_gamma                   import r8_gamma_test
  from r8_gamma_log               import r8_gamma_log_test
  from r8_huge                    import r8_huge_test
  from r8_log_2                   import r8_log_2_test
  from r8_log_b                   import r8_log_b_test
  from r8_mant                    import r8_mant_test
  from r8_max                     import r8_max_test
  from r8_min                     import r8_min_test
  from r8_mod                     import r8_mod_test
  from r8_modp                    import r8_modp_test
  from r8_mop                     import r8_mop_test
  from r8_nint                    import r8_nint_test
  from r8_normal_01               import r8_normal_01_test
  from r8_normal_ab               import r8_normal_ab_test
  from r8_pi                      import r8_pi_test
  from r8_power                   import r8_power_test
  from r8_power_fast              import r8_power_fast_test
  from r8_rise                    import r8_rise_test
  from r8_rise_values             import r8_rise_values_test
  from r8_round2                  import r8_round2_test
  from r8_roundb                  import r8_roundb_test
  from r8_roundx                  import r8_roundx_test
  from r8_secd                    import r8_secd_test
  from r8_sign                    import r8_sign_test
  from r8_sind                    import r8_sind_test
  from r8_swap                    import r8_swap_test
  from r8_swap3                   import r8_swap3_test
  from r8_tand                    import r8_tand_test
  from r8_to_i4                   import r8_to_i4_test
  from r8_to_r8_discrete          import r8_to_r8_discrete_test
  from r8_uniform_01              import r8_uniform_01_test
  from r8_uniform_ab              import r8_uniform_ab_test
  from r8_walsh_1d                import r8_walsh_1d_test
  from r8_wrap                    import r8_wrap_test

  from r82col_print_part          import r82col_print_part_test

  from r82row_print_part          import r82row_print_part_test

  from r83col_print_part          import r83col_print_part_test

  from r83row_print_part          import r83row_print_part_test

  from r8col_swap                 import r8col_swap_test

  from r8mat_house_axh            import r8mat_house_axh_test
  from r8mat_house_form           import r8mat_house_form_test
  from r8mat_indicator            import r8mat_indicator_test
  from r8mat_mm                   import r8mat_mm_test
  from r8mat_mtm                  import r8mat_mtm_test
  from r8mat_mtv                  import r8mat_mtv_test
  from r8mat_mv                   import r8mat_mv_test
  from r8mat_nint                 import r8mat_nint_test
  from r8mat_nonzeros             import r8mat_nonzeros_test
  from r8mat_norm_fro             import r8mat_norm_fro_test
  from r8mat_norm_l1              import r8mat_norm_l1_test
  from r8mat_norm_li              import r8mat_norm_li_test
  from r8mat_print                import r8mat_print_test
  from r8mat_print_some           import r8mat_print_some_test
  from r8mat_sub                  import r8mat_sub_test
  from r8mat_transpose            import r8mat_transpose_test
  from r8mat_transpose_print      import r8mat_transpose_print_test
  from r8mat_transpose_print_some import r8mat_transpose_print_some_test
  from r8mat_uniform_01           import r8mat_uniform_01_test
  from r8mat_uniform_ab           import r8mat_uniform_ab_test

  from r8poly_degree              import r8poly_degree_test
  from r8poly_print               import r8poly_print_test
  from r8poly_value_horner        import r8poly_value_horner_test

  from r8vec_amax                 import r8vec_amax_test
  from r8vec_amin                 import r8vec_amin_test
  from r8vec_asum                 import r8vec_asum_test
  from r8vec_concatenate          import r8vec_concatenate_test
  from r8vec_copy                 import r8vec_copy_test
  from r8vec_direct_product       import r8vec_direct_product_test
  from r8vec_house_column         import r8vec_house_column_test
  from r8vec_indicator0           import r8vec_indicator0_test
  from r8vec_indicator1           import r8vec_indicator1_test
  from r8vec_linspace             import r8vec_linspace_test
  from r8vec_max                  import r8vec_max_test
  from r8vec_mean                 import r8vec_mean_test
  from r8vec_min                  import r8vec_min_test
  from r8vec_nint                 import r8vec_nint_test
  from r8vec_norm_l0              import r8vec_norm_l0_test
  from r8vec_norm_l2              import r8vec_norm_l2_test
  from r8vec_norm_li              import r8vec_norm_li_test
  from r8vec_permute              import r8vec_permute_test
  from r8vec_permute_uniform      import r8vec_permute_uniform_test
  from r8vec_print                import r8vec_print_test
  from r8vec_product              import r8vec_product_test
  from r8vec_sum                  import r8vec_sum_test
  from r8vec_uniform_01           import r8vec_uniform_01_test
  from r8vec_uniform_ab           import r8vec_uniform_ab_test
  from r8vec_variance             import r8vec_variance_test

  from roots_to_r8poly            import roots_to_r8poly_test

  from timestamp                  import timestamp_test

  print ''
  print 'R8LIB_TEST'
  print '  Python version:'
  print '  Test the R8LIB library.'

  agm_values_test ( )

  gamma_values_test ( )
  gamma_log_values_test ( )

  i4_log_10_test ( )
  i4_sign_test ( )
  i4_uniform_ab_test ( )

  i4vec_indicator0_test ( )
  i4vec_indicator1_test ( )
  i4vec_print_test ( )
  i4vec_transpose_print_test ( )

  perm0_check_test ( )
  perm0_uniform_test ( )

  perm1_check_test ( )
  perm1_uniform_test ( )

  r8_abs_test ( )
  r8_acos_test ( )
  r8_acosh_test ( )
  r8_add_test ( )
  r8_agm_test ( )
  r8_asinh_test ( )
  r8_atan_test ( )
  r8_atanh_test ( )
  r8_big_test ( )
  r8_cas_test ( )
  r8_ceiling_test ( )
  r8_choose_test ( )
  r8_cosd_test ( )
  r8_cotd_test ( )
  r8_cscd_test ( )
  r8_cube_root_test ( )
  r8_diff_test ( )
  r8_digit_test ( )
  r8_e_test ( )
  r8_epsilon_test ( )
  r8_epsilon_compute_test ( )
  r8_factorial_test ( )
  r8_factorial_values_test ( )
  r8_factorial2_test ( )
  r8_factorial2_values_test ( )
  r8_fall_test ( )
  r8_fall_values_test ( )
  r8_fractional_test ( )
  r8_gamma_test ( )
  r8_gamma_log_test ( )
  r8_huge_test ( )
  r8_log_2_test ( )
  r8_log_b_test ( )
  r8_mant_test ( )
  r8_max_test ( )
  r8_min_test ( )
  r8_mod_test ( )
  r8_modp_test ( )
  r8_mop_test ( )
  r8_nint_test ( )
  r8_normal_01_test ( )
  r8_normal_ab_test ( )
  r8_pi_test ( )
  r8_power_test ( )
  r8_power_fast_test ( )
  r8_rise_test ( )
  r8_rise_values_test ( )
  r8_round2_test ( )
  r8_roundb_test ( )
  r8_roundx_test ( )
  r8_secd_test ( )
  r8_sign_test ( )
  r8_sind_test ( )
  r8_swap_test ( )
  r8_swap3_test ( )
  r8_tand_test ( )
  r8_to_i4_test ( )
  r8_to_r8_discrete_test ( )
  r8_uniform_01_test ( )
  r8_uniform_ab_test ( )
  r8_walsh_1d_test ( )
  r8_wrap_test ( )

  r82col_print_part_test ( )

  r82row_print_part_test ( )

  r83col_print_part_test ( )

  r83row_print_part_test ( )

  r8col_swap_test ( )

  r8mat_house_axh_test ( )
  r8mat_house_form_test ( )
  r8mat_indicator_test ( )
  r8mat_mm_test ( )
  r8mat_mtm_test ( )
  r8mat_mtv_test ( )
  r8mat_mv_test ( )
  r8mat_nint_test ( )
  r8mat_nonzeros_test ( )
  r8mat_norm_fro_test ( )
  r8mat_norm_l1_test ( )
  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8mat_sub_test ( )
  r8mat_transpose_test ( )
  r8mat_transpose_print_test ( )
  r8mat_transpose_print_some_test ( )
  r8mat_uniform_01_test ( )
  r8mat_uniform_ab_test ( )

  r8poly_degree_test ( )
  r8poly_print_test ( )
  r8poly_value_horner_test ( )

  r8vec_amax_test ( )
  r8vec_amin_test ( )
  r8vec_asum_test ( )
  r8vec_concatenate_test ( )
  r8vec_copy_test ( )
  r8vec_direct_product_test ( )
  r8vec_house_column_test ( )
  r8vec_indicator0_test ( )
  r8vec_linspace_test ( )
  r8vec_max_test ( )
  r8vec_mean_test ( )
  r8vec_min_test ( )
  r8vec_nint_test ( )
  r8vec_norm_l0_test ( )
  r8vec_norm_l2_test ( )
  r8vec_norm_li_test ( )
  r8vec_permute_test ( )
  r8vec_permute_uniform_test ( )
  r8vec_print_test ( )
  r8vec_product_test ( )
  r8vec_sum_test ( )
  r8vec_uniform_01_test ( )
  r8vec_uniform_ab_test ( )
  r8vec_variance_test ( )

  roots_to_r8poly_test ( )

  timestamp_test ( )
#
#  Terminate.
#
  print ''
  print 'R8LIB_TEST:'
  print '  Normal end of execution.'
Example #6
0
def lpp_test():

    #*****************************************************************************80
    #
    ## LPP_TEST tests the LPP library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    31 October 2014
    #
    #  Author:
    #
    #    John Burkardt
    #
    from comp_enum import comp_enum_test
    from comp_next_grlex import comp_next_grlex_test
    from comp_random_grlex import comp_random_grlex_test
    from comp_rank_grlex import comp_rank_grlex_test
    from comp_unrank_grlex import comp_unrank_grlex_test
    from i4_choose import i4_choose_test
    from i4_uniform_ab import i4_uniform_ab_test
    from i4vec_permute import i4vec_permute_test
    from i4vec_print import i4vec_print_test
    from i4vec_sort_heap_index_a import i4vec_sort_heap_index_a_test
    from i4vec_sum import i4vec_sum_test
    from i4vec_uniform_ab import i4vec_uniform_ab_test
    from lp_coefficients import lp_coefficients_test
    from lp_value import lp_value_test
    from lp_values import lp_values_test
    from lpp_to_polynomial import lpp_to_polynomial_test
    from lpp_value import lpp_value_test
    from mono_next_grlex import mono_next_grlex_test
    from mono_print import mono_print_test
    from mono_rank_grlex import mono_rank_grlex_test
    from mono_unrank_grlex import mono_unrank_grlex_test
    from mono_upto_enum import mono_upto_enum_test
    from mono_upto_next_grlex import mono_upto_next_grlex_test
    from mono_upto_random import mono_upto_random_test
    from mono_value import mono_value_test
    from perm_uniform import perm_uniform_test
    from polynomial_compress import polynomial_compress_test
    from polynomial_print import polynomial_print_test
    from polynomial_sort import polynomial_sort_test
    from polynomial_value import polynomial_value_test
    from r8mat_print import r8mat_print_test
    from r8mat_print_some import r8mat_print_some_test
    from r8mat_uniform_ab import r8mat_uniform_ab_test
    from r8vec_permute import r8vec_permute_test
    from r8vec_print import r8vec_print_test
    from r8vec_uniform_ab import r8vec_uniform_ab_test
    from timestamp import timestamp

    print ''
    print 'LPP_TEST'
    print '  Python version:'
    print '  Test the LPP library.'

    i4_choose_test()
    i4_uniform_ab_test()

    i4vec_permute_test()
    i4vec_print_test()
    i4vec_sort_heap_index_a_test()
    i4vec_sum_test()
    i4vec_uniform_ab_test()

    r8vec_permute_test()
    r8vec_print_test()
    r8vec_uniform_ab_test()

    r8mat_print_test()
    r8mat_print_some_test()
    r8mat_uniform_ab_test()

    perm_uniform_test()

    comp_enum_test()
    comp_next_grlex_test()
    comp_random_grlex_test()
    comp_rank_grlex_test()
    comp_unrank_grlex_test()

    mono_next_grlex_test()
    mono_print_test()
    mono_rank_grlex_test()
    mono_unrank_grlex_test()
    mono_upto_enum_test()
    mono_upto_next_grlex_test()
    mono_upto_random_test()
    mono_value_test()

    polynomial_compress_test()
    polynomial_print_test()
    polynomial_sort_test()
    polynomial_value_test()

    lp_coefficients_test()
    lp_value_test()
    lp_values_test()

    lpp_to_polynomial_test()
    lpp_value_test()
    #
    #  Terminate.
    #
    print ''
    print 'LPP_TEST:'
    print '  Normal end of execution.'
    print ''

    return
def uniform_test ( ):

#*****************************************************************************80
#
## UNIFORM_TEST tests the UNIFORM library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    27 December 2014
#
#  Author:
#
#    John Burkardt
#
  from bvec_print          import bvec_print_test
  from bvec_uniform        import bvec_uniform_test
  from c4_uniform_01       import c4_uniform_01_test
  from c4mat_print         import c4mat_print_test
  from c4mat_print_some    import c4mat_print_some_test
  from c4mat_uniform_01    import c4mat_uniform_01_test
  from c4vec_print         import c4vec_print_test
  from c4vec_uniform_01    import c4vec_uniform_01_test
  from c8_uniform_01       import c8_uniform_01_test
  from c8mat_print         import c8mat_print_test
  from c8mat_print_some    import c8mat_print_some_test
  from c8mat_uniform_01    import c8mat_uniform_01_test
  from c8vec_print         import c8vec_print_test
  from c8vec_uniform_01    import c8vec_uniform_01_test
  from ch_uniform_ab       import ch_uniform_ab_test
  from congruence          import congruence_test
  from get_seed            import get_seed_test
  from i4_gcd              import i4_gcd_test
  from i4_huge             import i4_huge_test
  from i4_modp             import i4_modp_test
  from i4_seed_advance     import i4_seed_advance_test
  from i4_sign             import i4_sign_test
  from i4_uniform_0i       import i4_uniform_0i_test
  from i4_uniform_ab       import i4_uniform_ab_test1
  from i4_uniform_ab       import i4_uniform_ab_test2
  from i4mat_print         import i4mat_print_test
  from i4mat_print_some    import i4mat_print_some_test
  from i4mat_uniform_ab    import i4mat_uniform_ab_test
  from i4vec_print         import i4vec_print_test
  from i4vec_uniform_ab    import i4vec_uniform_ab_test
  from l4_uniform          import l4_uniform_test
  from l4mat_print         import l4mat_print_test
  from l4mat_print_some    import l4mat_print_some_test
  from l4mat_uniform       import l4mat_uniform_test
  from l4vec_print         import l4vec_print_test
  from l4vec_uniform       import l4vec_uniform_test
  from lcrg_anbn           import lcrg_anbn_test
  from lcrg_seed           import lcrg_seed_test
  from power_mod           import power_mod_test
  from r4_uniform_01       import r4_uniform_01_test
  from r4_uniform_ab       import r4_uniform_ab_test
  from r4mat_print         import r4mat_print_test
  from r4mat_print_some    import r4mat_print_some_test
  from r4mat_uniform_01    import r4mat_uniform_01_test
  from r4mat_uniform_ab    import r4mat_uniform_ab_test
  from r4vec_print         import r4vec_print_test
  from r4vec_uniform_01    import r4vec_uniform_01_test
  from r4vec_uniform_ab    import r4vec_uniform_ab_test
  from r8_uniform_01       import r8_uniform_01_test
  from r8_uniform_ab       import r8_uniform_ab_test
  from r8col_uniform_abvec import r8col_uniform_abvec_test
  from r8mat_print         import r8mat_print_test
  from r8mat_print_some    import r8mat_print_some_test
  from r8mat_uniform_01    import r8mat_uniform_01_test
  from r8mat_uniform_ab    import r8mat_uniform_ab_test
  from r8row_uniform_abvec import r8row_uniform_abvec_test
  from r8vec_print         import r8vec_print_test
  from r8vec_uniform_01    import r8vec_uniform_01_test
  from r8vec_uniform_ab    import r8vec_uniform_ab_test
  from r8vec_uniform_abvec import r8vec_uniform_abvec_test
  from timestamp           import timestamp_test

  print ''
  print 'UNIFORM_TEST'
  print '  Python version:'
  print '  Test the UNIFORM library.'
#
#  Support functions:
#
  bvec_print_test ( )
  c4mat_print_test ( )
  c4mat_print_some_test ( )
  c4vec_print_test ( )
  c8mat_print_test ( )
  c8mat_print_some_test ( )
  c8vec_print_test ( )
  congruence_test ( )
  get_seed_test ( )
  i4_gcd_test ( )
  i4_huge_test ( )
  i4_modp_test ( )
  i4_seed_advance_test ( )
  i4_sign_test ( )
  i4mat_print_test ( )
  i4mat_print_some_test ( )
  i4vec_print_test ( )
  l4mat_print_test ( )
  l4mat_print_some_test ( )
  l4mat_uniform_test ( )
  l4vec_print_test ( )
  lcrg_anbn_test ( )
  lcrg_seed_test ( )
  power_mod_test ( )
  r4mat_print_test ( )
  r4mat_print_some_test ( )
  r4vec_print_test ( )
  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8vec_print_test ( )
  timestamp_test ( )
#
#  Main UNIFORM functions.
#
  bvec_uniform_test ( )

  c4_uniform_01_test ( )
  c4mat_uniform_01_test ( )
  c4vec_uniform_01_test ( )

  c8_uniform_01_test ( )
  c8mat_uniform_01_test ( )
  c8vec_uniform_01_test ( )

  ch_uniform_ab_test ( )

  i4_uniform_0i_test ( )
  i4_uniform_ab_test1 ( )
  i4_uniform_ab_test2 ( )
  i4mat_uniform_ab_test ( )
  i4vec_uniform_ab_test ( )

  l4_uniform_test ( )
  l4mat_uniform_test ( )
  l4vec_uniform_test ( )

  r4_uniform_01_test ( )
  r4_uniform_ab_test ( )
  r4mat_uniform_01_test ( )
  r4mat_uniform_ab_test ( )
  r4vec_uniform_01_test ( )
  r4vec_uniform_ab_test ( )
  r4vec_uniform_01_test ( )
  r4vec_uniform_ab_test ( )

  r8_uniform_01_test ( )
  r8_uniform_ab_test ( )
  r8mat_uniform_01_test ( )
  r8mat_uniform_ab_test ( )
  r8vec_uniform_01_test ( )
  r8vec_uniform_ab_test ( )

  r8col_uniform_abvec_test ( )
  r8row_uniform_abvec_test ( )
  r8vec_uniform_abvec_test ( )
#
#  Terminate.
#
  print ''
  print 'UNIFORM_TEST:'
  print '  Normal end of execution.'
Example #8
0
def table_io_test ( ):

#*****************************************************************************80
#
## TABLE_IO_TEST tests the TABLE_IO library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    08 April 2015
#
#  Author:
#
#    John Burkardt
#
  from file_column_count      import file_column_count_test
  from file_row_count         import file_row_count_test
  from i4_log_10              import i4_log_10_test
  from i4mat_data_read        import i4mat_data_read_test
  from i4mat_header_read      import i4mat_header_read_test
  from i4mat_indicator        import i4mat_indicator_test
  from i4mat_print            import i4mat_print_test
  from i4mat_print_some       import i4mat_print_some_test
  from i4mat_write            import i4mat_write_test
  from i4vec_data_read        import i4vec_data_read_test
  from i4vec_header_read      import i4vec_header_read_test
  from i4vec_print            import i4vec_print_test
  from i4vec_write            import i4vec_write_test
  from r8mat_data_read        import r8mat_data_read_test
  from r8mat_header_read      import r8mat_header_read_test
  from r8mat_indicator        import r8mat_indicator_test
  from r8mat_print            import r8mat_print_test
  from r8mat_print_some       import r8mat_print_some_test
  from r8mat_transpose_write  import r8mat_transpose_write_test
  from r8mat_write            import r8mat_write_test
  from r8vec_data_read        import r8vec_data_read_test
  from r8vec_header_read      import r8vec_header_read_test
  from r8vec_print            import r8vec_print_test
  from r8vec_write            import r8vec_write_test
  from timestamp              import timestamp_test

  print ''
  print 'TABLE_IO_TEST'
  print '  Python version:'
  print '  Test the TABLE_IO library.'

  file_column_count_test ( )
  file_row_count_test ( )

  i4_log_10_test ( )

  i4mat_indicator_test ( )
  i4mat_print_test ( )
  i4mat_print_some_test ( )

  i4vec_print_test ( )

  r8mat_indicator_test ( )
  r8mat_print_test ( )
  r8mat_print_some_test ( )

  r8vec_print_test ( )

  timestamp_test ( )
#
#  Write an I4MAT to a file, then read header and data.
#
  i4mat_write_test ( )
  i4mat_header_read_test ( )
  i4mat_data_read_test ( )
#
#  Write an I4VEC to a file, then read header and data.
#
  i4vec_write_test ( )
  i4vec_header_read_test ( )
  i4vec_data_read_test ( )
#
#  Write an R8MAT transposed to a file.
#
  r8mat_transpose_write_test ( )
#
#  Write an R8MAT to a file, then read header and data.
#
  r8mat_write_test ( )
  r8mat_header_read_test ( )
  r8mat_data_read_test ( )
#
#  Write an R8VEC to a file, then read header and data.
#
  r8vec_write_test ( )
  r8vec_header_read_test ( )
  r8vec_data_read_test ( )
#
#  Terminate.
#
  print ''
  print 'TABLE_IO_TEST'
  print '  Normal end of execution.'
Example #9
0
from r8vec_print import r8vec_print_test
from timestamp import timestamp

timestamp()
print ''
print 'POLYNOMIAL_TEST'
print '  Python version:'
print '  Test the POLYNOMIAL library.'

i4_choose_test()
i4_fall_test()
i4_uniform_ab_test()

i4vec_concatenate_test()
i4vec_permute_test()
i4vec_print_test()
i4vec_sort_heap_index_a_test()
i4vec_sum_test()
i4vec_uniform_ab_test()

r8vec_concatenate_test()
r8vec_permute_test()
r8vec_print_test()

perm_uniform_test()

mono_upto_enum_test()
mono_next_grlex_test()
mono_rank_grlex_test()
mono_total_next_grlex_test()
mono_unrank_grlex_test()
Example #10
0
def polpak_test ( ):

#*****************************************************************************80
#
## POLPAK_TEST tests the POLPAK library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    11 April 2015
#
#  Author:
#
#    John Burkardt
#
  from agm_values                       import agm_values_test
  from agud                             import agud_test
  from align_enum                       import align_enum_test
  from bell                             import bell_test
  from bell_values                      import bell_values_test
  from benford                          import benford_test
  from bernoulli_number                 import bernoulli_number_test
  from bernoulli_number2                import bernoulli_number2_test
  from bernoulli_number3                import bernoulli_number3_test
  from bernoulli_number_values          import bernoulli_number_values_test
  from bernoulli_poly                   import bernoulli_poly_test
  from bernoulli_poly2                  import bernoulli_poly2_test
  from bernstein_poly                   import bernstein_poly_test
  from bernstein_poly_01_values         import bernstein_poly_01_values_test
  from beta_values                      import beta_values_test
  from bpab                             import bpab_test
  from cardan_poly                      import cardan_poly_test
  from cardan_poly_coef                 import cardan_poly_coef_test
  from cardinal_cos                     import cardinal_cos_test
  from cardinal_sin                     import cardinal_sin_test
  from catalan                          import catalan_test
  from catalan_row_next                 import catalan_row_next_test
  from catalan_values                   import catalan_values_test
  from charlier                         import charlier_test
  from cheby_t_poly                     import cheby_t_poly_test
  from cheby_t_poly_coef                import cheby_t_poly_coef_test
  from cheby_t_poly_values              import cheby_t_poly_values_test
  from cheby_t_poly_zero                import cheby_t_poly_zero_test
  from cheby_u_poly                     import cheby_u_poly_test
  from cheby_u_poly_coef                import cheby_u_poly_coef_test
  from cheby_u_poly_values              import cheby_u_poly_values_test
  from cheby_u_poly_zero                import cheby_u_poly_zero_test
  from chebyshev_discrete               import chebyshev_discrete_test
  from collatz_count                    import collatz_count_test
  from collatz_count_max                import collatz_count_max_test
  from collatz_count_values             import collatz_count_values_test
  from comb_row_next                    import comb_row_next_test
  from commul                           import commul_test
  from complete_symmetric_poly          import complete_symmetric_poly_test
  from cos_power_int                    import cos_power_int_test
  from cos_power_int_values             import cos_power_int_values_test
  from delannoy                         import delannoy_test
  from erf_values                       import erf_values_test
  from euler_number                     import euler_number_test
  from euler_number2                    import euler_number2_test
  from euler_number_values              import euler_number_values_test
  from euler_poly                       import euler_poly_test
  from eulerian                         import eulerian_test
  from f_hofstadter                     import f_hofstadter_test
  from fibonacci_direct                 import fibonacci_direct_test
  from fibonacci_floor                  import fibonacci_floor_test
  from fibonacci_recursive              import fibonacci_recursive_test
  from g_hofstadter                     import g_hofstadter_test
  from gamma_values                     import gamma_values_test
  from gamma_log_values                 import gamma_log_values_test
  from gegenbauer_poly                  import gegenbauer_poly_test
  from gegenbauer_poly_values           import gegenbauer_poly_values_test
  from gen_hermite_poly                 import gen_hermite_poly_test
  from gen_laguerre_poly                import gen_laguerre_poly_test
  from gud                              import gud_test
  from gud_values                       import gud_values_test
  from h_hofstadter                     import h_hofstadter_test
  from hail                             import hail_test
  from hermite_poly_phys                import hermite_poly_phys_test
  from hermite_poly_phys_coef           import hermite_poly_phys_coef_test
  from hermite_poly_phys_values         import hermite_poly_phys_values_test
  from hyper_2f1_values                 import hyper_2f1_values_test
  from i4_choose                        import i4_choose_test
  from i4_factor                        import i4_factor_test
  from i4_factorial                     import i4_factorial_test
  from i4_factorial_values              import i4_factorial_values_test
  from i4_factorial2                    import i4_factorial2_test
  from i4_factorial2_values             import i4_factorial2_values_test
  from i4_is_prime                      import i4_is_prime_test
  from i4_is_triangular                 import i4_is_triangular_test
  from i4_partition_distinct_count      import i4_partition_distinct_count_test
  from i4_to_triangle                   import i4_to_triangle_test
  from i4_uniform_ab                    import i4_uniform_ab_test
  from i4mat_print                      import i4mat_print_test
  from i4mat_print_some                 import i4mat_print_some_test
  from i4vec_print                      import i4vec_print_test
  from jacobi_poly                      import jacobi_poly_test
  from jacobi_poly_values               import jacobi_poly_values_test
  from jacobi_symbol                    import jacobi_symbol_test
  from krawtchouk                       import krawtchouk_test
  from laguerre_associated              import laguerre_associated_test
  from laguerre_poly                    import laguerre_poly_test
  from laguerre_poly_coef               import laguerre_poly_coef_test
  from laguerre_polynomial_values       import laguerre_polynomial_values_test
  from legendre_associated              import legendre_associated_test
  from legendre_associated_values       import legendre_associated_values_test
  from legendre_associated_normalized   import legendre_associated_normalized_test
  from legendre_associated_normalized_sphere_values  import legendre_associated_normalized_sphere_values_test
  from legendre_function_q              import legendre_function_q_test
  from legendre_function_q_values       import legendre_function_q_values_test
  from legendre_poly                    import legendre_poly_test
  from legendre_poly_coef               import legendre_poly_coef_test
  from legendre_poly_values             import legendre_poly_values_test
  from legendre_symbol                  import legendre_symbol_test
  from lerch                            import lerch_test
  from lerch_values                     import lerch_values_test
  from lock                             import lock_test
  from meixner                          import meixner_test
  from mertens                          import mertens_test
  from mertens_values                   import mertens_values_test
  from moebius                          import moebius_test
  from moebius_values                   import moebius_values_test
  from motzkin                          import motzkin_test
  from normal_01_cdf_inverse            import normal_01_cdf_inverse_test
  from normal_01_cdf_values             import normal_01_cdf_values_test
  from omega                            import omega_test
  from omega_values                     import omega_values_test
  from partition_distinct_count_values  import partition_distinct_count_values_test
  from pentagon_num                     import pentagon_num_test
  from phi                              import phi_test
  from phi_values                       import phi_values_test
  from plane_partition_num              import plane_partition_num_test
  from poly_bernoulli                   import poly_bernoulli_test
  from poly_coef_count                  import poly_coef_count_test
  from prime                            import prime_test
  from psi_values                       import psi_values_test
  from pyramid_num                      import pyramid_num_test
  from pyramid_square_num               import pyramid_square_num_test
  from r8_agm                           import r8_agm_test
  from r8_beta                          import r8_beta_test
  from r8_choose                        import r8_choose_test
  from r8_erf                           import r8_erf_test
  from r8_erf_inverse                   import r8_erf_inverse_test
  from r8_euler_constant                import r8_euler_constant_test
  from r8_factorial                     import r8_factorial_test
  from r8_factorial_values              import r8_factorial_values_test
  from r8_factorial_log                 import r8_factorial_log_test
  from r8_factorial_log_values          import r8_factorial_log_values_test
  from r8_gamma                         import r8_gamma_test
  from r8_gamma_log                     import r8_gamma_log_test
  from r8_huge                          import r8_huge_test
  from r8_hyper_2f1                     import r8_hyper_2f1_test
  from r8_mop                           import r8_mop_test
  from r8_nint                          import r8_nint_test
  from r8_pi                            import r8_pi_test
  from r8_psi                           import r8_psi_test
  from r8_uniform_01                    import r8_uniform_01_test
  from r8_uniform_ab                    import r8_uniform_ab_test
  from r8poly_print                     import r8poly_print_test
  from r8poly_degree                    import r8poly_degree_test
  from r8poly_value_horner              import r8poly_value_horner_test
  from r8vec_print                      import r8vec_print_test
  from sigma                            import sigma_test
  from sigma_values                     import sigma_values_test
  from simplex_num                      import simplex_num_test
  from sin_power_int                    import sin_power_int_test
  from sin_power_int_values             import sin_power_int_values_test
  from slice                            import slice_test
  from spherical_harmonic               import spherical_harmonic_test
  from spherical_harmonic_values        import spherical_harmonic_values_test
  from stirling1                        import stirling1_test
  from stirling2                        import stirling2_test
  from tau                              import tau_test
  from tetrahedron_num                  import tetrahedron_num_test
  from timestamp                        import timestamp_test
  from triangle_num                     import triangle_num_test
  from triangle_to_i4                   import triangle_to_i4_test
  from trinomial                        import trinomial_test
  from v_hofstadter                     import v_hofstadter_test
  from vibonacci                        import vibonacci_test
  from zeckendorf                       import zeckendorf_test
  from zernike_poly                     import zernike_poly_test
  from zernike_poly_coef                import zernike_poly_coef_test
  from zeta                             import zeta_test

  print ''
  print 'POLPAK_TEST'
  print '  Python version:'
  print '  Test the POLPAK library.'
#
#  Utilities.
#
  agm_values_test ( )
  bell_values_test ( )
  bernoulli_number_values_test ( )
  bernstein_poly_01_values_test ( )
  catalan_values_test ( )
  cheby_t_poly_values_test ( )
  cheby_u_poly_values_test ( )
  collatz_count_values_test ( )
  cos_power_int_values_test ( )
  erf_values_test ( )
  euler_number_values_test ( )
  gamma_values_test ( )
  gamma_log_values_test ( )
  gegenbauer_poly_values_test ( )
  gud_values_test ( )
  hermite_poly_phys_values_test ( )
  hyper_2f1_values_test ( )
  i4_factorial_values_test ( )
  i4_factorial2_values_test ( )
  i4_uniform_ab_test ( )
  i4mat_print_test ( )
  i4mat_print_some_test ( )
  i4vec_print_test ( )
  jacobi_poly_values_test ( )
  laguerre_polynomial_values_test ( )
  legendre_associated_values_test ( )
  legendre_associated_normalized_sphere_values_test ( )
  legendre_function_q_values_test ( )
  legendre_poly_values_test ( )
  lerch_values_test ( )
  mertens_values_test ( )
  moebius_values_test ( )
  normal_01_cdf_inverse_test ( )
  normal_01_cdf_values_test ( )
  omega_values_test ( )
  partition_distinct_count_values_test ( )
  phi_values_test ( )
  psi_values_test ( )
  r8_factorial_values_test ( )
  r8_factorial_log_values_test ( )
  r8_huge_test ( )
  r8_mop_test ( )
  r8_nint_test ( )
  r8_pi_test ( )
  r8_uniform_01_test ( )
  r8_uniform_ab_test ( )
  r8poly_degree_test ( )
  r8poly_print_test ( )
  r8poly_value_horner_test ( )
  r8vec_print_test ( )
  sigma_values_test ( )
  sin_power_int_values_test ( )
  spherical_harmonic_values_test ( )
  timestamp_test ( )
#
#  Interesting stuff.
#
  agud_test ( )
  align_enum_test ( )
  bell_test ( )
  benford_test ( )
  bernoulli_number_test ( )
  bernoulli_number2_test ( )
  bernoulli_number3_test ( )
  bernoulli_poly_test ( )
  bernoulli_poly2_test ( )
  bernstein_poly_test ( )
  bpab_test ( )
  cardan_poly_test ( )
  cardan_poly_coef_test ( )
  cardinal_cos_test ( )
  cardinal_sin_test ( )
  catalan_test ( )
  catalan_row_next_test ( )
  charlier_test ( )
  cheby_t_poly_test ( )
  cheby_t_poly_coef_test ( )
  cheby_t_poly_zero_test ( )
  cheby_u_poly_test ( )
  cheby_u_poly_coef_test ( )
  chebyshev_discrete_test ( )
  collatz_count_test ( )
  comb_row_next_test ( )
  commul_test ( )
  complete_symmetric_poly_test ( )
  cos_power_int_test ( )
  delannoy_test ( )
  euler_number_test ( )
  euler_number2_test ( )
  euler_poly_test ( )
  eulerian_test ( )
  f_hofstadter_test ( )
  fibonacci_direct_test ( )
  fibonacci_floor_test ( )
  fibonacci_recursive_test ( )
  g_hofstadter_test ( )
  gegenbauer_poly_test ( )
  gen_hermite_poly_test ( )
  gen_laguerre_poly_test ( )
  gud_test ( )
  h_hofstadter_test ( )
  hail_test ( )
  hermite_poly_phys_test ( )
  hermite_poly_phys_coef_test ( )
  i4_choose_test ( )
  i4_factor_test ( )
  i4_factorial_test ( )
  i4_factorial2_test ( )
  i4_is_prime_test ( )
  i4_is_triangular_test ( )
  i4_partition_distinct_count_test ( )
  i4_to_triangle_test ( )
  jacobi_poly_test ( )
  jacobi_symbol_test ( )
  krawtchouk_test ( )
  laguerre_associated_test ( )
  laguerre_poly_test ( )
  laguerre_poly_coef_test ( )
  legendre_associated_test ( )
  legendre_associated_normalized_test ( )
  legendre_function_q_test ( )
  legendre_poly_test ( )
  legendre_poly_coef_test ( )
  legendre_symbol_test ( )
  lerch_test ( )
  lock_test ( )
  meixner_test ( )
  mertens_test ( )
  moebius_test ( )
  motzkin_test ( )
  omega_test ( )
  pentagon_num_test ( )
  phi_test ( )
  plane_partition_num_test ( )
  poly_bernoulli_test ( )
  poly_coef_count_test ( )
  prime_test ( )
  pyramid_num_test ( )
  pyramid_square_num_test ( )
  r8_agm_test ( )
  r8_beta_test ( )
  r8_choose_test ( )
  r8_erf_test ( )
  r8_erf_inverse_test ( )
  r8_euler_constant_test ( )
  r8_factorial_test ( )
  r8_factorial_log_test ( )
  r8_gamma_test ( )
  r8_gamma_log_test ( )
  r8_hyper_2f1_test ( )
  r8_psi_test ( )
  sigma_test ( )
  simplex_num_test ( )
  sin_power_int_test ( )
  slice_test ( )
  spherical_harmonic_test ( )
  stirling1_test ( )
  stirling2_test ( )
  tau_test ( )
  tetrahedron_num_test ( )
  triangle_num_test ( )
  triangle_to_i4_test ( )
  trinomial_test ( )
  v_hofstadter_test ( )
  vibonacci_test ( )
  zeckendorf_test ( )
  zernike_poly_test ( )
  zernike_poly_coef_test ( )
  zeta_test ( )
#
#  Terminate.
#
  print ''
  print 'POLPAK_TEST:'
  print '  Normal end of execution.'
def simplex_grid_test ( ):

#*****************************************************************************80
#
## SIMPLEX_GRID_TEST tests the SIMPLEX_GRID library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    23 April 2015
#
#  Author:
#
#    John Burkardt
#
  from comp_next_grlex              import comp_next_grlex_test
  from comp_random                  import comp_random_test
  from comp_random_grlex            import comp_random_grlex_test
  from comp_rank_grlex              import comp_rank_grlex_test
  from comp_unrank_grlex            import comp_unrank_grlex_test
  from i4_choose                    import i4_choose_test
  from i4_uniform_ab                import i4_uniform_ab_test
  from i4mat_print                  import i4mat_print_test
  from i4mat_print_some             import i4mat_print_some_test
  from i4vec_print                  import i4vec_print_test
  from i4vec_sum                    import i4vec_sum_test
  from i4vec_uniform_ab             import i4vec_uniform_ab_test
  from ksub_random2                 import ksub_random2_test
  from r8_uniform_01                import r8_uniform_01_test
  from r8mat_print                  import r8mat_print_test
  from r8mat_print_some             import r8mat_print_some_test
  from r8mat_write                  import r8mat_write_test
  from simplex_grid_count           import simplex_grid_count_test
  from simplex_grid_index_all       import simplex_grid_index_all_test
  from simplex_grid_index_next      import simplex_grid_index_next_test
  from simplex_grid_index_sample    import simplex_grid_index_sample_test
  from simplex_grid_index_to_point  import simplex_grid_index_to_point_test01
  from simplex_grid_index_to_point  import simplex_grid_index_to_point_test02
  from timestamp                    import timestamp_test

  print ''
  print 'SIMPLEX_GRID_TEST'
  print '  Python version:'
  print '  Test the SIMPLEX_GRID library.'
#
#  Utilities:
#
  comp_next_grlex_test ( )
  comp_random_test ( )
  comp_random_grlex_test ( )
  comp_rank_grlex_test ( )
  comp_unrank_grlex_test ( )

  i4_choose_test ( )
  i4_uniform_ab_test ( )

  i4mat_print_test ( )
  i4mat_print_some_test ( )

  i4vec_print_test ( )
  i4vec_sum_test ( )
  i4vec_uniform_ab_test ( )

  ksub_random2_test ( )

  r8_uniform_01_test ( )

  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8mat_write_test ( )

  timestamp_test ( )
#
#  Library.
#
  simplex_grid_count_test ( )
  simplex_grid_index_next_test ( )
  simplex_grid_index_sample_test ( )
  simplex_grid_index_all_test ( )
  simplex_grid_index_to_point_test01 ( )
  simplex_grid_index_to_point_test02 ( )
#
#  Terminate.
#
  print ''
  print 'SIMPLEX_GRID_TEST:'
  print '  Normal end of execution.'
Example #12
0
def subset_test():

    #*****************************************************************************80
    #
    ## SUBSET_TEST tests the SUBSET library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    31 May 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from agm_values import agm_values_test
    from asm_enum import asm_enum_test
    from asm_triangle import asm_triangle_test
    from bell import bell_test
    from bell_values import bell_values_test
    from catalan import catalan_test
    from catalan_row_next import catalan_row_next_test
    from catalan_values import catalan_values_test
    from cfrac_to_rat import cfrac_to_rat_test
    from change_greedy import change_greedy_test
    from change_next import change_next_test
    from chinese_check import chinese_check_test
    from chinese_to_i4 import chinese_to_i4_test
    from comb_next import comb_next_test
    from comb_row_next import comb_row_next_test
    from comb_unrank import comb_unrank_test
    from comp_enum import comp_enum_test
    from comp_next import comp_next_test
    from comp_next_grlex import comp_next_grlex_test
    from comp_random_grlex import comp_random_grlex_test
    from comp_rank_grlex import comp_rank_grlex_test
    from comp_to_ksub import comp_to_ksub_test
    from comp_unrank_grlex import comp_unrank_grlex_test
    from compnz_enum import compnz_enum_test
    from compnz_next import compnz_next_test
    from compnz_to_ksub import compnz_to_ksub_test
    from compnz_random import compnz_random_test
    from congruence import congruence_test
    from count_pose_random import count_pose_random_test
    from derange_enum import derange_enum_test
    from derange_enum2 import derange_enum2_test
    from derange_enum3 import derange_enum3_test
    from digraph_arc_print import digraph_arc_print_test
    from dvec_add import dvec_add_test
    from dvec_complementx import dvec_complementx_test
    from dvec_mul import dvec_mul_test
    from dvec_print import dvec_print_test
    from dvec_sub import dvec_sub_test
    from dvec_to_i4 import dvec_to_i4_test
    from equiv_print import equiv_print_test
    from equiv_print2 import equiv_print2_test
    from equiv_random import equiv_random_test
    from euler import euler_test
    from frobenius_number_order2 import frobenius_number_order2_test
    from frobenius_number_order2_values import frobenius_number_order2_values_test
    from gamma_values import gamma_values_test
    from gamma_log_values import gamma_log_values_test
    from gray_rank2 import gray_rank2_test
    from gray_unrank2 import gray_unrank2_test
    from i4_choose import i4_choose_test
    from i4_factorial import i4_factorial_test
    from i4_factorial_values import i4_factorial_values_test
    from i4_fall import i4_fall_test
    from i4_gcd import i4_gcd_test
    from i4_huge import i4_huge_test
    from i4_log_10 import i4_log_10_test
    from i4_modp import i4_modp_test
    from i4_partition_conj import i4_partition_conj_test
    from i4_partition_count import i4_partition_count_test
    from i4_partition_count2 import i4_partition_count2_test
    from i4_partition_count_values import i4_partition_count_values_test
    from i4_partition_print import i4_partition_print_test
    from i4_rise import i4_rise_test
    from i4_sign import i4_sign_test
    from i4_sqrt import i4_sqrt_test
    from i4_sqrt_cf import i4_sqrt_cf_test
    from i4_to_chinese import i4_to_chinese_test
    from i4_to_dvec import i4_to_dvec_test
    from i4_to_i4poly import i4_to_i4poly_test
    from i4_to_van_der_corput import i4_to_van_der_corput_test
    from i4_uniform_ab import i4_uniform_ab_test
    from i4mat_mm import i4mat_mm_test
    from i4mat_print import i4mat_print_test
    from i4mat_print_some import i4mat_print_some_test
    from i4mat_u1_inverse import i4mat_u1_inverse_test
    from i4poly_add import i4poly_add_test
    from i4poly_degree import i4poly_degree_test
    from i4poly_dif import i4poly_dif_test
    from i4poly_mul import i4poly_mul_test
    from i4poly_print import i4poly_print_test
    from i4poly_to_i4 import i4poly_to_i4_test
    from i4vec_ascends import i4vec_ascends_test
    from i4vec_descends import i4vec_descends_test
    from i4vec_frac import i4vec_frac_test
    from i4vec_index import i4vec_index_test
    from i4vec_indicator0 import i4vec_indicator0_test
    from i4vec_indicator1 import i4vec_indicator1_test
    from i4vec_max_index_last import i4vec_max_index_last_test
    from i4vec_pairwise_prime import i4vec_pairwise_prime_test
    from i4vec_print import i4vec_print_test
    from i4vec_product import i4vec_product_test
    from i4vec_reverse import i4vec_reverse_test
    from i4vec_sort_bubble_a import i4vec_sort_bubble_a_test
    from i4vec_sort_heap_index_d import i4vec_sort_heap_index_d_test
    from i4vec_sum import i4vec_sum_test
    from i4vec_transpose_print import i4vec_transpose_print_test
    from i4vec_uniform_ab import i4vec_uniform_ab_test
    from index_box_next_2d import index_box_next_2d_test
    from index_box_next_3d import index_box_next_3d_test
    from inverse_mod_n import inverse_mod_n_test
    from involute_enum import involute_enum_test
    from josephus import josephus_test
    from ksub_random import ksub_random_test
    from ksub_random2 import ksub_random2_test
    from ksub_random3 import ksub_random3_test
    from ksub_random4 import ksub_random4_test
    from ksub_random5 import ksub_random5_test
    from ksub_rank import ksub_rank_test
    from ksub_to_comp import ksub_to_comp_test
    from ksub_to_compnz import ksub_to_compnz_test
    from ksub_unrank import ksub_unrank_test
    from lvec_next import lvec_next_test
    from moebius_values import moebius_values_test
    from monomial_count import monomial_count_test
    from monomial_counts import monomial_counts_test
    from multinomial_coef1 import multinomial_coef1_test
    from multinomial_coef2 import multinomial_coef2_test
    from multiperm_enum import multiperm_enum_test
    from nim_sum import nim_sum_test
    from padovan import padovan_test
    from pent_enum import pent_enum_test
    from perm_fixed_enum import perm_fixed_enum_test
    from perm_print import perm_print_test
    from perm0_check import perm0_check_test
    from perm0_lex_next import perm0_lex_next_test
    from perm0_random import perm0_random_test
    from perm0_random2 import perm0_random2_test
    from perm0_sign import perm0_sign_test
    from perm1_check import perm1_check_test
    from perrin import perrin_test
    from pord_check import pord_check_test
    from power_mod import power_mod_test
    from prime import prime_test
    from pythag_triple_next import pythag_triple_next_test
    from r8_agm import r8_agm_test
    from r8_choose import r8_choose_test
    from r8_fall import r8_fall_test
    from r8_fall_values import r8_fall_values_test
    from r8_gamma import r8_gamma_test
    from r8_rise import r8_rise_test
    from r8_rise_values import r8_rise_values_test
    from r8_to_dec import r8_to_dec_test
    from r8_uniform_01 import r8_uniform_01_test
    from r8_uniform_ab import r8_uniform_ab_test
    from r8mat_print import r8mat_print_test
    from r8mat_print_some import r8mat_print_some_test
    from r8poly_add import r8poly_add_test
    from r8poly_degree import r8poly_degree_test
    from r8poly_dif import r8poly_dif_test
    from r8poly_div import r8poly_div_test
    from r8poly_mul import r8poly_mul_test
    from r8poly_print import r8poly_print_test
    from r8vec_frac import r8vec_frac_test
    from r8vec_indicator1 import r8vec_indicator1_test
    from r8vec_mirror_next import r8vec_mirror_next_test
    from r8vec_print import r8vec_print_test
    from r8vec_uniform_01 import r8vec_uniform_01_test
    from r8vec_uniform_ab import r8vec_uniform_ab_test
    from rat_to_cfrac import rat_to_cfrac_test
    from regro_next import regro_next_test
    from schroeder import schroeder_test
    from subset_gray_rank import subset_gray_rank_test
    from subset_gray_unrank import subset_gray_unrank_test
    from subset_lex_next import subset_lex_next_test
    from subset_random import subset_random_test
    from subtriangle_next import subtriangle_next_test
    from thue_binary_next import thue_binary_next_test
    from thue_ternary_next import thue_ternary_next_test
    from timestamp import timestamp_test
    from tuple_next import tuple_next_test
    from tuple_next2 import tuple_next2_test
    from tuple_next_ge import tuple_next_ge_test
    from ubvec_add import ubvec_add_test
    from ubvec_print import ubvec_print_test
    from ubvec_to_ui4 import ubvec_to_ui4_test
    from ubvec_xor import ubvec_xor_test
    from ui4_to_ubvec import ui4_to_ubvec_test
    from vec_colex_next import vec_colex_next_test
    from vec_colex_next2 import vec_colex_next2_test
    from vec_colex_next3 import vec_colex_next3_test
    from vec_gray_next import vec_gray_next_test
    from vec_gray_rank import vec_gray_rank_test
    from vec_gray_unrank import vec_gray_unrank_test
    from vec_lex_next import vec_lex_next_test
    from vec_random import vec_random_test
    from vector_constrained_next import vector_constrained_next_test
    from vector_constrained_next2 import vector_constrained_next2_test
    from vector_constrained_next3 import vector_constrained_next3_test
    from vector_next import vector_next_test
    from ytb_enum import ytb_enum_test
    from ytb_next import ytb_next_test
    from ytb_print import ytb_print_test
    from ytb_random import ytb_random_test

    print ''
    print 'SUBSET_TEST'
    print '  Python version:'
    print '  Test the SUBSET library.'

    agm_values_test()
    asm_enum_test()
    asm_triangle_test()

    bell_test()
    bell_values_test()

    catalan_test()
    catalan_row_next_test()
    catalan_values_test()

    cfrac_to_rat_test()

    change_greedy_test()
    change_next_test()

    chinese_check_test()
    chinese_to_i4_test()

    comb_next_test()
    comb_row_next_test()
    comb_unrank_test()

    comp_enum_test()
    comp_next_test()
    comp_next_grlex_test()
    comp_random_grlex_test()
    comp_rank_grlex_test()
    comp_to_ksub_test()
    comp_unrank_grlex_test()

    compnz_enum_test()
    compnz_next_test()
    compnz_random_test()
    compnz_to_ksub_test()

    congruence_test()

    count_pose_random_test()

    derange_enum_test()
    derange_enum2_test()
    derange_enum3_test()

    digraph_arc_print_test()

    dvec_add_test()
    dvec_complementx_test()
    dvec_mul_test()
    dvec_print_test()
    dvec_sub_test()
    dvec_to_i4_test()

    equiv_print_test()
    equiv_print2_test()
    equiv_random_test()

    euler_test()

    frobenius_number_order2_test()
    frobenius_number_order2_values_test()

    gamma_values_test()
    gamma_log_values_test()

    gray_rank2_test()
    gray_unrank2_test()

    i4_choose_test()
    i4_factorial_test()
    i4_factorial_values_test()
    i4_fall_test()
    i4_gcd_test()
    i4_huge_test()
    i4_log_10_test()
    i4_modp_test()
    i4_partition_conj_test()
    i4_partition_count_test()
    i4_partition_count2_test()
    i4_partition_count_values_test()
    i4_partition_print_test()
    i4_rise_test()
    i4_sign_test()
    i4_sqrt_test()
    i4_sqrt_cf_test()
    i4_to_chinese_test()
    i4_to_dvec_test()
    i4_to_i4poly_test()
    i4_to_van_der_corput_test()
    i4_uniform_ab_test()

    i4mat_mm_test
    i4mat_print_test()
    i4mat_print_some_test()
    i4mat_u1_inverse_test()

    i4poly_add_test()
    i4poly_degree_test()
    i4poly_dif_test()
    i4poly_mul_test()
    i4poly_print_test()
    i4poly_to_i4_test()

    i4vec_ascends_test()
    i4vec_descends_test()
    i4vec_frac_test()
    i4vec_index_test()
    i4vec_indicator0_test()
    i4vec_indicator1_test()
    i4vec_max_index_last_test()
    i4vec_pairwise_prime_test()
    i4vec_print_test()
    i4vec_product_test()
    i4vec_reverse_test()
    i4vec_sort_bubble_a_test()
    i4vec_sort_heap_index_d_test()
    i4vec_sum_test()
    i4vec_transpose_print_test()
    i4vec_uniform_ab_test()

    index_box_next_2d_test()
    index_box_next_3d_test()

    inverse_mod_n_test()

    involute_enum_test()

    josephus_test()

    ksub_random_test()
    ksub_random2_test()
    ksub_random3_test()
    ksub_random4_test()
    ksub_random5_test()
    ksub_rank_test()
    ksub_to_comp_test()
    ksub_to_compnz_test()
    ksub_unrank_test()

    lvec_next_test()

    moebius_values_test()

    monomial_count_test()
    monomial_counts_test()

    multinomial_coef1_test()
    multinomial_coef2_test()

    multiperm_enum_test()

    nim_sum_test()

    padovan_test()

    pent_enum_test()

    perm_fixed_enum_test()
    perm_print_test()

    perm0_check_test()
    perm0_lex_next_test()
    perm0_random_test()
    perm0_random2_test()
    perm0_sign_test()

    perm1_check_test()

    perrin_test()

    pord_check_test()

    power_mod_test()

    prime_test()

    pythag_triple_next_test()

    r8_agm_test()
    r8_choose_test()
    r8_fall_test()
    r8_fall_values_test()
    r8_gamma_test()
    r8_rise_test()
    r8_rise_values_test()
    r8_to_dec_test()
    r8_uniform_01_test()
    r8_uniform_ab_test()

    r8mat_print_test()
    r8mat_print_some_test()

    r8poly_add_test()
    r8poly_degree_test()
    r8poly_dif_test()
    r8poly_div_test()
    r8poly_mul_test()
    r8poly_print_test()

    r8vec_frac_test()
    r8vec_indicator1_test()
    r8vec_mirror_next_test()
    r8vec_print_test()
    r8vec_uniform_01_test()
    r8vec_uniform_ab_test()

    rat_to_cfrac_test()

    regro_next_test()

    schroeder_test()

    subset_gray_rank_test()
    subset_gray_unrank_test()
    subset_lex_next_test()
    subset_random_test()

    subtriangle_next_test()

    thue_binary_next_test()
    thue_ternary_next_test()

    tuple_next_test()
    tuple_next2_test()
    tuple_next_ge_test()

    timestamp_test()

    tuple_next_test()
    tuple_next2_test()

    ubvec_add_test()
    ubvec_print_test()
    ubvec_to_ui4_test()
    ubvec_xor_test()

    ui4_to_ubvec_test()

    vec_colex_next_test()
    vec_colex_next2_test()
    vec_colex_next3_test()

    vec_gray_next_test()
    vec_gray_rank_test()
    vec_gray_unrank_test()

    vec_lex_next_test()

    vec_random_test()

    vector_constrained_next_test()
    vector_constrained_next2_test()
    vector_constrained_next3_test()
    vector_next_test()

    ytb_enum_test()
    ytb_next_test()
    ytb_print_test()
    ytb_random_test()
    #
    #  Terminate.
    #
    print ''
    print 'SUBSET_TEST:'
    print '  Normal end of execution.'
    print ''

    return
from r8vec_print             import r8vec_print_test
from timestamp               import timestamp

timestamp ( )
print ''
print 'POLYNOMIAL_TEST'
print '  Python version:'
print '  Test the POLYNOMIAL library.'

i4_choose_test ( )
i4_fall_test ( )
i4_uniform_ab_test ( )

i4vec_concatenate_test ( )
i4vec_permute_test ( )
i4vec_print_test ( )
i4vec_sort_heap_index_a_test ( )
i4vec_sum_test ( )
i4vec_uniform_ab_test ( )

r8vec_concatenate_test ( )
r8vec_permute_test ( )
r8vec_print_test ( )

perm_uniform_test ( )

mono_upto_enum_test ( )
mono_next_grlex_test ( )
mono_rank_grlex_test ( )
mono_total_next_grlex_test ( )
mono_unrank_grlex_test ( )
Example #14
0
def polpak_test():

    #*****************************************************************************80
    #
    ## POLPAK_TEST tests the POLPAK library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    11 April 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from agm_values import agm_values_test
    from agud import agud_test
    from align_enum import align_enum_test
    from bell import bell_test
    from bell_values import bell_values_test
    from benford import benford_test
    from bernoulli_number import bernoulli_number_test
    from bernoulli_number2 import bernoulli_number2_test
    from bernoulli_number3 import bernoulli_number3_test
    from bernoulli_number_values import bernoulli_number_values_test
    from bernoulli_poly import bernoulli_poly_test
    from bernoulli_poly2 import bernoulli_poly2_test
    from bernstein_poly import bernstein_poly_test
    from bernstein_poly_01_values import bernstein_poly_01_values_test
    from beta_values import beta_values_test
    from bpab import bpab_test
    from cardan_poly import cardan_poly_test
    from cardan_poly_coef import cardan_poly_coef_test
    from cardinal_cos import cardinal_cos_test
    from cardinal_sin import cardinal_sin_test
    from catalan import catalan_test
    from catalan_row_next import catalan_row_next_test
    from catalan_values import catalan_values_test
    from charlier import charlier_test
    from cheby_t_poly import cheby_t_poly_test
    from cheby_t_poly_coef import cheby_t_poly_coef_test
    from cheby_t_poly_values import cheby_t_poly_values_test
    from cheby_t_poly_zero import cheby_t_poly_zero_test
    from cheby_u_poly import cheby_u_poly_test
    from cheby_u_poly_coef import cheby_u_poly_coef_test
    from cheby_u_poly_values import cheby_u_poly_values_test
    from cheby_u_poly_zero import cheby_u_poly_zero_test
    from chebyshev_discrete import chebyshev_discrete_test
    from collatz_count import collatz_count_test
    from collatz_count_max import collatz_count_max_test
    from collatz_count_values import collatz_count_values_test
    from comb_row_next import comb_row_next_test
    from commul import commul_test
    from complete_symmetric_poly import complete_symmetric_poly_test
    from cos_power_int import cos_power_int_test
    from cos_power_int_values import cos_power_int_values_test
    from delannoy import delannoy_test
    from erf_values import erf_values_test
    from euler_number import euler_number_test
    from euler_number2 import euler_number2_test
    from euler_number_values import euler_number_values_test
    from euler_poly import euler_poly_test
    from eulerian import eulerian_test
    from f_hofstadter import f_hofstadter_test
    from fibonacci_direct import fibonacci_direct_test
    from fibonacci_floor import fibonacci_floor_test
    from fibonacci_recursive import fibonacci_recursive_test
    from g_hofstadter import g_hofstadter_test
    from gamma_values import gamma_values_test
    from gamma_log_values import gamma_log_values_test
    from gegenbauer_poly import gegenbauer_poly_test
    from gegenbauer_poly_values import gegenbauer_poly_values_test
    from gen_hermite_poly import gen_hermite_poly_test
    from gen_laguerre_poly import gen_laguerre_poly_test
    from gud import gud_test
    from gud_values import gud_values_test
    from h_hofstadter import h_hofstadter_test
    from hail import hail_test
    from hermite_poly_phys import hermite_poly_phys_test
    from hermite_poly_phys_coef import hermite_poly_phys_coef_test
    from hermite_poly_phys_values import hermite_poly_phys_values_test
    from hyper_2f1_values import hyper_2f1_values_test
    from i4_choose import i4_choose_test
    from i4_factor import i4_factor_test
    from i4_factorial import i4_factorial_test
    from i4_factorial_values import i4_factorial_values_test
    from i4_factorial2 import i4_factorial2_test
    from i4_factorial2_values import i4_factorial2_values_test
    from i4_is_prime import i4_is_prime_test
    from i4_is_triangular import i4_is_triangular_test
    from i4_partition_distinct_count import i4_partition_distinct_count_test
    from i4_to_triangle import i4_to_triangle_test
    from i4_uniform_ab import i4_uniform_ab_test
    from i4mat_print import i4mat_print_test
    from i4mat_print_some import i4mat_print_some_test
    from i4vec_print import i4vec_print_test
    from jacobi_poly import jacobi_poly_test
    from jacobi_poly_values import jacobi_poly_values_test
    from jacobi_symbol import jacobi_symbol_test
    from krawtchouk import krawtchouk_test
    from laguerre_associated import laguerre_associated_test
    from laguerre_poly import laguerre_poly_test
    from laguerre_poly_coef import laguerre_poly_coef_test
    from laguerre_polynomial_values import laguerre_polynomial_values_test
    from legendre_associated import legendre_associated_test
    from legendre_associated_values import legendre_associated_values_test
    from legendre_associated_normalized import legendre_associated_normalized_test
    from legendre_associated_normalized_sphere_values import legendre_associated_normalized_sphere_values_test
    from legendre_function_q import legendre_function_q_test
    from legendre_function_q_values import legendre_function_q_values_test
    from legendre_poly import legendre_poly_test
    from legendre_poly_coef import legendre_poly_coef_test
    from legendre_poly_values import legendre_poly_values_test
    from legendre_symbol import legendre_symbol_test
    from lerch import lerch_test
    from lerch_values import lerch_values_test
    from lock import lock_test
    from meixner import meixner_test
    from mertens import mertens_test
    from mertens_values import mertens_values_test
    from moebius import moebius_test
    from moebius_values import moebius_values_test
    from motzkin import motzkin_test
    from normal_01_cdf_inverse import normal_01_cdf_inverse_test
    from normal_01_cdf_values import normal_01_cdf_values_test
    from omega import omega_test
    from omega_values import omega_values_test
    from partition_distinct_count_values import partition_distinct_count_values_test
    from pentagon_num import pentagon_num_test
    from phi import phi_test
    from phi_values import phi_values_test
    from plane_partition_num import plane_partition_num_test
    from poly_bernoulli import poly_bernoulli_test
    from poly_coef_count import poly_coef_count_test
    from prime import prime_test
    from psi_values import psi_values_test
    from pyramid_num import pyramid_num_test
    from pyramid_square_num import pyramid_square_num_test
    from r8_agm import r8_agm_test
    from r8_beta import r8_beta_test
    from r8_choose import r8_choose_test
    from r8_erf import r8_erf_test
    from r8_erf_inverse import r8_erf_inverse_test
    from r8_euler_constant import r8_euler_constant_test
    from r8_factorial import r8_factorial_test
    from r8_factorial_values import r8_factorial_values_test
    from r8_factorial_log import r8_factorial_log_test
    from r8_factorial_log_values import r8_factorial_log_values_test
    from r8_gamma import r8_gamma_test
    from r8_gamma_log import r8_gamma_log_test
    from r8_huge import r8_huge_test
    from r8_hyper_2f1 import r8_hyper_2f1_test
    from r8_mop import r8_mop_test
    from r8_nint import r8_nint_test
    from r8_pi import r8_pi_test
    from r8_psi import r8_psi_test
    from r8_uniform_01 import r8_uniform_01_test
    from r8_uniform_ab import r8_uniform_ab_test
    from r8poly_print import r8poly_print_test
    from r8poly_degree import r8poly_degree_test
    from r8poly_value_horner import r8poly_value_horner_test
    from r8vec_print import r8vec_print_test
    from sigma import sigma_test
    from sigma_values import sigma_values_test
    from simplex_num import simplex_num_test
    from sin_power_int import sin_power_int_test
    from sin_power_int_values import sin_power_int_values_test
    from slice import slice_test
    from spherical_harmonic import spherical_harmonic_test
    from spherical_harmonic_values import spherical_harmonic_values_test
    from stirling1 import stirling1_test
    from stirling2 import stirling2_test
    from tau import tau_test
    from tetrahedron_num import tetrahedron_num_test
    from timestamp import timestamp_test
    from triangle_num import triangle_num_test
    from triangle_to_i4 import triangle_to_i4_test
    from trinomial import trinomial_test
    from v_hofstadter import v_hofstadter_test
    from vibonacci import vibonacci_test
    from zeckendorf import zeckendorf_test
    from zernike_poly import zernike_poly_test
    from zernike_poly_coef import zernike_poly_coef_test
    from zeta import zeta_test

    print ''
    print 'POLPAK_TEST'
    print '  Python version:'
    print '  Test the POLPAK library.'
    #
    #  Utilities.
    #
    agm_values_test()
    bell_values_test()
    bernoulli_number_values_test()
    bernstein_poly_01_values_test()
    catalan_values_test()
    cheby_t_poly_values_test()
    cheby_u_poly_values_test()
    collatz_count_values_test()
    cos_power_int_values_test()
    erf_values_test()
    euler_number_values_test()
    gamma_values_test()
    gamma_log_values_test()
    gegenbauer_poly_values_test()
    gud_values_test()
    hermite_poly_phys_values_test()
    hyper_2f1_values_test()
    i4_factorial_values_test()
    i4_factorial2_values_test()
    i4_uniform_ab_test()
    i4mat_print_test()
    i4mat_print_some_test()
    i4vec_print_test()
    jacobi_poly_values_test()
    laguerre_polynomial_values_test()
    legendre_associated_values_test()
    legendre_associated_normalized_sphere_values_test()
    legendre_function_q_values_test()
    legendre_poly_values_test()
    lerch_values_test()
    mertens_values_test()
    moebius_values_test()
    normal_01_cdf_inverse_test()
    normal_01_cdf_values_test()
    omega_values_test()
    partition_distinct_count_values_test()
    phi_values_test()
    psi_values_test()
    r8_factorial_values_test()
    r8_factorial_log_values_test()
    r8_huge_test()
    r8_mop_test()
    r8_nint_test()
    r8_pi_test()
    r8_uniform_01_test()
    r8_uniform_ab_test()
    r8poly_degree_test()
    r8poly_print_test()
    r8poly_value_horner_test()
    r8vec_print_test()
    sigma_values_test()
    sin_power_int_values_test()
    spherical_harmonic_values_test()
    timestamp_test()
    #
    #  Interesting stuff.
    #
    agud_test()
    align_enum_test()
    bell_test()
    benford_test()
    bernoulli_number_test()
    bernoulli_number2_test()
    bernoulli_number3_test()
    bernoulli_poly_test()
    bernoulli_poly2_test()
    bernstein_poly_test()
    bpab_test()
    cardan_poly_test()
    cardan_poly_coef_test()
    cardinal_cos_test()
    cardinal_sin_test()
    catalan_test()
    catalan_row_next_test()
    charlier_test()
    cheby_t_poly_test()
    cheby_t_poly_coef_test()
    cheby_t_poly_zero_test()
    cheby_u_poly_test()
    cheby_u_poly_coef_test()
    chebyshev_discrete_test()
    collatz_count_test()
    comb_row_next_test()
    commul_test()
    complete_symmetric_poly_test()
    cos_power_int_test()
    delannoy_test()
    euler_number_test()
    euler_number2_test()
    euler_poly_test()
    eulerian_test()
    f_hofstadter_test()
    fibonacci_direct_test()
    fibonacci_floor_test()
    fibonacci_recursive_test()
    g_hofstadter_test()
    gegenbauer_poly_test()
    gen_hermite_poly_test()
    gen_laguerre_poly_test()
    gud_test()
    h_hofstadter_test()
    hail_test()
    hermite_poly_phys_test()
    hermite_poly_phys_coef_test()
    i4_choose_test()
    i4_factor_test()
    i4_factorial_test()
    i4_factorial2_test()
    i4_is_prime_test()
    i4_is_triangular_test()
    i4_partition_distinct_count_test()
    i4_to_triangle_test()
    jacobi_poly_test()
    jacobi_symbol_test()
    krawtchouk_test()
    laguerre_associated_test()
    laguerre_poly_test()
    laguerre_poly_coef_test()
    legendre_associated_test()
    legendre_associated_normalized_test()
    legendre_function_q_test()
    legendre_poly_test()
    legendre_poly_coef_test()
    legendre_symbol_test()
    lerch_test()
    lock_test()
    meixner_test()
    mertens_test()
    moebius_test()
    motzkin_test()
    omega_test()
    pentagon_num_test()
    phi_test()
    plane_partition_num_test()
    poly_bernoulli_test()
    poly_coef_count_test()
    prime_test()
    pyramid_num_test()
    pyramid_square_num_test()
    r8_agm_test()
    r8_beta_test()
    r8_choose_test()
    r8_erf_test()
    r8_erf_inverse_test()
    r8_euler_constant_test()
    r8_factorial_test()
    r8_factorial_log_test()
    r8_gamma_test()
    r8_gamma_log_test()
    r8_hyper_2f1_test()
    r8_psi_test()
    sigma_test()
    simplex_num_test()
    sin_power_int_test()
    slice_test()
    spherical_harmonic_test()
    stirling1_test()
    stirling2_test()
    tau_test()
    tetrahedron_num_test()
    triangle_num_test()
    triangle_to_i4_test()
    trinomial_test()
    v_hofstadter_test()
    vibonacci_test()
    zeckendorf_test()
    zernike_poly_test()
    zernike_poly_coef_test()
    zeta_test()
    #
    #  Terminate.
    #
    print ''
    print 'POLPAK_TEST:'
    print '  Normal end of execution.'
Example #15
0
def triangle01_integrals_test ( ):

#*****************************************************************************80
#
## TRIANGLE01_INTEGRALS_TEST tests the TRIANGLE01_INTEGRALS library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    18 April 2015
#
#  Author:
#
#    John Burkardt
#
  from i4vec_print                   import i4vec_print_test
  from i4vec_uniform_ab              import i4vec_uniform_ab_test
  from monomial_value                import monomial_value_test
  from r8mat_print                   import r8mat_print_test
  from r8mat_print_some              import r8mat_print_some_test
  from r8mat_transpose_print         import r8mat_transpose_print_test
  from r8mat_transpose_print_some    import r8mat_transpose_print_some_test
  from r8mat_uniform_01              import r8mat_uniform_01_test
  from r8vec_print                   import r8vec_print_test
  from r8vec_uniform_01              import r8vec_uniform_01_test
  from timestamp                     import timestamp_test
  from triangle01_monomial_integral  import triangle01_monomial_integral_test01
  from triangle01_monomial_integral  import triangle01_monomial_integral_test02
  from triangle01_sample             import triangle01_sample_test

  print ''
  print 'TRIANGLE01_INTEGRALS_TEST'
  print '  Python version:'
  print '  Test the TRIANGLE01_INTEGRALS library.'
#
#  Utilities:
#
  i4vec_print_test ( )
  i4vec_uniform_ab_test ( )
  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8mat_transpose_print_test ( )
  r8mat_transpose_print_some_test ( )
  r8mat_uniform_01_test ( )
  r8vec_print_test ( )
  r8vec_uniform_01_test ( )
  timestamp_test ( )
#
#  Library functions:
#
  monomial_value_test ( )
  triangle01_sample_test ( )
  triangle01_monomial_integral_test01 ( )
  triangle01_monomial_integral_test02 ( )
#
#  Terminate.
#
  print ''
  print 'TRIANGLE01_INTEGRALS_TEST:'
  print '  Normal end of execution.'
def i4lib_test ( ):

#*****************************************************************************80
#
## I4LIB_TEST tests the I4LIB library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    27 May 2015
#
#  Author:
#
#    John Burkardt
#
  from i4_abs                     import i4_abs_test
  from i4_bit_hi1                 import i4_bit_hi1_test
  from i4_bit_lo0                 import i4_bit_lo0_test
  from i4_bit_lo1                 import i4_bit_lo1_test
  from i4_bit_reverse             import i4_bit_reverse_test
  from i4_ceiling                 import i4_ceiling_test
  from i4_characteristic          import i4_characteristic_test
  from i4_choose                  import i4_choose_test
  from i4_div_rounded             import i4_div_rounded_test
  from i4_division                import i4_division_test
  from i4_divp                    import i4_divp_test
  from i4_factorial               import i4_factorial_test
  from i4_factorial2              import i4_factorial2_test
  from i4_fall                    import i4_fall_test
  from i4_floor                   import i4_floor_test
  from i4_gcd                     import i4_gcd_test
  from i4_gcdb                    import i4_gcdb_test
  from i4_huge                    import i4_huge_test
  from i4_huge_normalizer         import i4_huge_normalizer_test
  from i4_is_even                 import i4_is_even_test
  from i4_is_odd                  import i4_is_odd_test
  from i4_is_prime                import i4_is_prime_test
  from i4_lcm                     import i4_lcm_test
  from i4_log_10                  import i4_log_10_test
  from i4_log_2                   import i4_log_2_test
  from i4_log_i4                  import i4_log_i4_test
  from i4_log_r8                  import i4_log_r8_test
  from i4_mant                    import i4_mant_test
  from i4_max                     import i4_max_test
  from i4_min                     import i4_min_test
  from i4_mod_inv                 import i4_mod_inv
  from i4_moddiv                  import i4_moddiv_test
  from i4_modp                    import i4_modp_test
  from i4_mop                     import i4_mop_test
  from i4_power                   import i4_power_test
  from i4_rise                    import i4_rise_test
  from i4_sign                    import i4_sign_test
  from i4_sign3                   import i4_sign3_test
  from i4_swap                    import i4_swap_test
  from i4_swap3                   import i4_swap3_test
  from i4_to_angle                import i4_to_angle_test
  from i4_to_halton               import i4_to_halton_test
  from i4_to_isbn                 import i4_to_isbn_test
  from i4_to_l4                   import i4_to_l4_test
  from i4_to_pascal               import i4_to_pascal_test
  from i4_to_pascal_degree        import i4_to_pascal_degree_test
  from i4_to_triangle             import i4_to_triangle_test
  from i4_uniform_ab              import i4_uniform_ab_test
  from i4_unswap3                 import i4_unswap3_test
  from i4_walsh_1d                import i4_walsh_1d_test
  from i4_width                   import i4_width_test
  from i4_wrap                    import i4_wrap_test
  from i4_xor                     import i4_xor_test

  from i4mat_indicator            import i4mat_indicator_test
  from i4mat_max                  import i4mat_max_test
  from i4mat_min                  import i4mat_min_test
  from i4mat_mm                   import i4mat_mm_test
  from i4mat_print                import i4mat_print_test
  from i4mat_print_some           import i4mat_print_some_test
  from i4mat_transpose_print      import i4mat_transpose_print_test
  from i4mat_transpose_print_some import i4mat_transpose_print_some_test
  from i4mat_u1_inverse           import i4mat_u1_inverse_test
  from i4mat_uniform_ab           import i4mat_uniform_ab_test

  from i4vec_add                  import i4vec_add_test
  from i4vec_amax                 import i4vec_amax_test
  from i4vec_amin                 import i4vec_amin_test
  from i4vec_concatenate          import i4vec_concatenate_test
  from i4vec_copy                 import i4vec_copy_test
  from i4vec_cum                  import i4vec_cum_test
  from i4vec_cum0                 import i4vec_cum0_test
  from i4vec_decrement            import i4vec_decrement_test
  from i4vec_frac                 import i4vec_frac_test
  from i4vec_increment            import i4vec_increment_test
  from i4vec_index                import i4vec_index_test
  from i4vec_indicator0           import i4vec_indicator0_test
  from i4vec_indicator1           import i4vec_indicator1_test
  from i4vec_max                  import i4vec_max_test
  from i4vec_max_index_last       import i4vec_max_index_last_test
  from i4vec_min                  import i4vec_min_test
  from i4vec_pairwise_prime       import i4vec_pairwise_prime_test
  from i4vec_permute              import i4vec_permute_test
  from i4vec_permute_uniform      import i4vec_permute_uniform_test
  from i4vec_print                import i4vec_print_test
  from i4vec_product              import i4vec_product_test
  from i4vec_reverse              import i4vec_reverse_test
  from i4vec_sort_heap_index_a    import i4vec_sort_heap_index_a_test
  from i4vec_sort_heap_index_d    import i4vec_sort_heap_index_d_test
  from i4vec_sum                  import i4vec_sum_test
  from i4vec_transpose_print      import i4vec_transpose_print_test
  from i4vec_uniform_ab           import i4vec_uniform_ab_test

  from pascal_to_i4               import pascal_to_i4_test

  from perm0_check                import perm0_check_test
  from perm0_uniform              import perm0_uniform_test

  from perm1_check                import perm1_check_test
  from perm1_uniform              import perm1_uniform_test

  from prime                      import prime_test

  from r8_uniform_ab              import r8_uniform_ab_test

  from timestamp                  import timestamp_test

  from triangle_to_i4             import triangle_to_i4_test

  print ''
  print 'I4LIB_TEST'
  print '  Python version:'
  print '  Test the I4LIB library.'

  i4_abs_test ( )
  i4_bit_hi1_test ( )
  i4_bit_lo0_test ( )
  i4_bit_lo1_test ( )
  i4_bit_reverse_test ( )
  i4_ceiling_test ( )
  i4_characteristic_test ( )
  i4_choose_test ( )
  i4_div_rounded_test ( )
  i4_division_test ( )
  i4_divp_test ( )
  i4_factorial_test ( )
  i4_factorial2_test ( )
  i4_fall_test ( )
  i4_floor_test ( )
  i4_gcd_test ( )
  i4_gcdb_test ( )
  i4_huge_test ( )
  i4_huge_normalizer_test ( )
  i4_is_even_test ( )
  i4_is_odd_test ( )
  i4_is_prime_test ( )
  i4_lcm_test ( )
  i4_log_10_test ( )
  i4_log_2_test ( )
  i4_log_i4_test ( )
  i4_log_r8_test ( )
  i4_mant_test ( )
  i4_max_test ( )
  i4_min_test ( )
  i4_moddiv_test ( )
  i4_modp_test ( )
  i4_mop_test ( )
  i4_power_test ( )
  i4_rise_test ( )
  i4_sign_test ( )
  i4_sign3_test ( )
  i4_swap_test ( )
  i4_swap3_test ( )
  i4_to_angle_test ( )
  i4_to_halton_test ( )
  i4_to_isbn_test ( )
  i4_to_l4_test ( )
  i4_to_pascal_test ( )
  i4_to_pascal_degree_test ( )
  i4_to_triangle_test ( )
  i4_uniform_ab_test ( )
  i4_unswap3_test ( )
  i4_walsh_1d_test ( )
  i4_width_test ( )
  i4_wrap_test ( )
  i4_xor_test ( )

  i4mat_indicator_test ( )
  i4mat_max_test ( )
  i4mat_min_test ( )
  i4mat_mm_test ( )
  i4mat_print_test ( )
  i4mat_print_some_test ( )
  i4mat_transpose_print_test ( )
  i4mat_transpose_print_some_test ( )
  i4mat_u1_inverse_test ( )
  i4mat_uniform_ab_test ( )

  i4vec_add_test ( )
  i4vec_amax_test ( )
  i4vec_amin_test ( )
  i4vec_concatenate_test ( )
  i4vec_copy_test ( )
  i4vec_cum_test ( )
  i4vec_cum0_test ( )
  i4vec_decrement_test ( )
  i4vec_frac_test ( )
  i4vec_increment_test ( )
  i4vec_index_test ( )
  i4vec_indicator0_test ( )
  i4vec_indicator1_test ( )
  i4vec_max_test ( )
  i4vec_max_index_last_test ( )
  i4vec_min_test ( )
  i4vec_pairwise_prime_test ( )
  i4vec_permute_test ( )
  i4vec_permute_uniform_test ( )
  i4vec_print_test ( )
  i4vec_product_test ( )
  i4vec_reverse_test ( )
  i4vec_sort_heap_index_a_test ( )
  i4vec_sort_heap_index_d_test ( )
  i4vec_sum_test ( )
  i4vec_transpose_print_test ( )
  i4vec_uniform_ab_test ( )

  pascal_to_i4_test ( ) 

  perm0_check_test ( )
  perm0_uniform_test ( )

  perm1_check_test ( )
  perm1_uniform_test ( )

  prime_test ( )

  r8_uniform_ab_test ( )

  timestamp_test ( )

  triangle_to_i4_test ( )
#
#  Terminate.
#
  print ''
  print 'I4LIB_TEST:'
  print '  Normal end of execution.'
Example #17
0
def simplex_grid_test():

    #*****************************************************************************80
    #
    ## SIMPLEX_GRID_TEST tests the SIMPLEX_GRID library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    23 April 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from comp_next_grlex import comp_next_grlex_test
    from comp_random import comp_random_test
    from comp_random_grlex import comp_random_grlex_test
    from comp_rank_grlex import comp_rank_grlex_test
    from comp_unrank_grlex import comp_unrank_grlex_test
    from i4_choose import i4_choose_test
    from i4_uniform_ab import i4_uniform_ab_test
    from i4mat_print import i4mat_print_test
    from i4mat_print_some import i4mat_print_some_test
    from i4vec_print import i4vec_print_test
    from i4vec_sum import i4vec_sum_test
    from i4vec_uniform_ab import i4vec_uniform_ab_test
    from ksub_random2 import ksub_random2_test
    from r8_uniform_01 import r8_uniform_01_test
    from r8mat_print import r8mat_print_test
    from r8mat_print_some import r8mat_print_some_test
    from r8mat_write import r8mat_write_test
    from simplex_grid_count import simplex_grid_count_test
    from simplex_grid_index_all import simplex_grid_index_all_test
    from simplex_grid_index_next import simplex_grid_index_next_test
    from simplex_grid_index_sample import simplex_grid_index_sample_test
    from simplex_grid_index_to_point import simplex_grid_index_to_point_test01
    from simplex_grid_index_to_point import simplex_grid_index_to_point_test02
    from timestamp import timestamp_test

    print ''
    print 'SIMPLEX_GRID_TEST'
    print '  Python version:'
    print '  Test the SIMPLEX_GRID library.'
    #
    #  Utilities:
    #
    comp_next_grlex_test()
    comp_random_test()
    comp_random_grlex_test()
    comp_rank_grlex_test()
    comp_unrank_grlex_test()

    i4_choose_test()
    i4_uniform_ab_test()

    i4mat_print_test()
    i4mat_print_some_test()

    i4vec_print_test()
    i4vec_sum_test()
    i4vec_uniform_ab_test()

    ksub_random2_test()

    r8_uniform_01_test()

    r8mat_print_test()
    r8mat_print_some_test()
    r8mat_write_test()

    timestamp_test()
    #
    #  Library.
    #
    simplex_grid_count_test()
    simplex_grid_index_next_test()
    simplex_grid_index_sample_test()
    simplex_grid_index_all_test()
    simplex_grid_index_to_point_test01()
    simplex_grid_index_to_point_test02()
    #
    #  Terminate.
    #
    print ''
    print 'SIMPLEX_GRID_TEST:'
    print '  Normal end of execution.'
Example #18
0
def subset_test ( ):

#*****************************************************************************80
#
## SUBSET_TEST tests the SUBSET library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    31 May 2015
#
#  Author:
#
#    John Burkardt
#
  from agm_values                     import agm_values_test
  from asm_enum                       import asm_enum_test
  from asm_triangle                   import asm_triangle_test
  from bell                           import bell_test
  from bell_values                    import bell_values_test
  from catalan                        import catalan_test
  from catalan_row_next               import catalan_row_next_test
  from catalan_values                 import catalan_values_test
  from cfrac_to_rat                   import cfrac_to_rat_test
  from change_greedy                  import change_greedy_test
  from change_next                    import change_next_test
  from chinese_check                  import chinese_check_test
  from chinese_to_i4                  import chinese_to_i4_test
  from comb_next                      import comb_next_test
  from comb_row_next                  import comb_row_next_test
  from comb_unrank                    import comb_unrank_test
  from comp_enum                      import comp_enum_test
  from comp_next                      import comp_next_test
  from comp_next_grlex                import comp_next_grlex_test
  from comp_random_grlex              import comp_random_grlex_test
  from comp_rank_grlex                import comp_rank_grlex_test
  from comp_to_ksub                   import comp_to_ksub_test
  from comp_unrank_grlex              import comp_unrank_grlex_test
  from compnz_enum                    import compnz_enum_test
  from compnz_next                    import compnz_next_test
  from compnz_to_ksub                 import compnz_to_ksub_test
  from compnz_random                  import compnz_random_test
  from congruence                     import congruence_test
  from count_pose_random              import count_pose_random_test
  from derange_enum                   import derange_enum_test
  from derange_enum2                  import derange_enum2_test
  from derange_enum3                  import derange_enum3_test
  from digraph_arc_print              import digraph_arc_print_test
  from dvec_add                       import dvec_add_test
  from dvec_complementx               import dvec_complementx_test
  from dvec_mul                       import dvec_mul_test
  from dvec_print                     import dvec_print_test
  from dvec_sub                       import dvec_sub_test
  from dvec_to_i4                     import dvec_to_i4_test
  from equiv_print                    import equiv_print_test
  from equiv_print2                   import equiv_print2_test
  from equiv_random                   import equiv_random_test
  from euler                          import euler_test
  from frobenius_number_order2        import frobenius_number_order2_test
  from frobenius_number_order2_values import frobenius_number_order2_values_test
  from gamma_values                   import gamma_values_test
  from gamma_log_values               import gamma_log_values_test
  from gray_rank2                     import gray_rank2_test
  from gray_unrank2                   import gray_unrank2_test
  from i4_choose                      import i4_choose_test
  from i4_factorial                   import i4_factorial_test
  from i4_factorial_values            import i4_factorial_values_test
  from i4_fall                        import i4_fall_test
  from i4_gcd                         import i4_gcd_test
  from i4_huge                        import i4_huge_test
  from i4_log_10                      import i4_log_10_test
  from i4_modp                        import i4_modp_test
  from i4_partition_conj              import i4_partition_conj_test
  from i4_partition_count             import i4_partition_count_test
  from i4_partition_count2            import i4_partition_count2_test
  from i4_partition_count_values      import i4_partition_count_values_test
  from i4_partition_print             import i4_partition_print_test
  from i4_rise                        import i4_rise_test
  from i4_sign                        import i4_sign_test
  from i4_sqrt                        import i4_sqrt_test
  from i4_sqrt_cf                     import i4_sqrt_cf_test
  from i4_to_chinese                  import i4_to_chinese_test
  from i4_to_dvec                     import i4_to_dvec_test
  from i4_to_i4poly                   import i4_to_i4poly_test
  from i4_to_van_der_corput           import i4_to_van_der_corput_test
  from i4_uniform_ab                  import i4_uniform_ab_test
  from i4mat_mm                       import i4mat_mm_test
  from i4mat_print                    import i4mat_print_test
  from i4mat_print_some               import i4mat_print_some_test
  from i4mat_u1_inverse               import i4mat_u1_inverse_test
  from i4poly_add                     import i4poly_add_test
  from i4poly_degree                  import i4poly_degree_test
  from i4poly_dif                     import i4poly_dif_test
  from i4poly_mul                     import i4poly_mul_test
  from i4poly_print                   import i4poly_print_test
  from i4poly_to_i4                   import i4poly_to_i4_test
  from i4vec_ascends                  import i4vec_ascends_test
  from i4vec_descends                 import i4vec_descends_test
  from i4vec_frac                     import i4vec_frac_test
  from i4vec_index                    import i4vec_index_test
  from i4vec_indicator0               import i4vec_indicator0_test
  from i4vec_indicator1               import i4vec_indicator1_test
  from i4vec_max_index_last           import i4vec_max_index_last_test
  from i4vec_pairwise_prime           import i4vec_pairwise_prime_test
  from i4vec_print                    import i4vec_print_test
  from i4vec_product                  import i4vec_product_test
  from i4vec_reverse                  import i4vec_reverse_test
  from i4vec_sort_bubble_a            import i4vec_sort_bubble_a_test
  from i4vec_sort_heap_index_d        import i4vec_sort_heap_index_d_test
  from i4vec_sum                      import i4vec_sum_test
  from i4vec_transpose_print          import i4vec_transpose_print_test
  from i4vec_uniform_ab               import i4vec_uniform_ab_test
  from index_box_next_2d              import index_box_next_2d_test
  from index_box_next_3d              import index_box_next_3d_test
  from inverse_mod_n                  import inverse_mod_n_test
  from involute_enum                  import involute_enum_test
  from josephus                       import josephus_test
  from ksub_random                    import ksub_random_test
  from ksub_random2                   import ksub_random2_test
  from ksub_random3                   import ksub_random3_test
  from ksub_random4                   import ksub_random4_test
  from ksub_random5                   import ksub_random5_test
  from ksub_rank                      import ksub_rank_test
  from ksub_to_comp                   import ksub_to_comp_test
  from ksub_to_compnz                 import ksub_to_compnz_test
  from ksub_unrank                    import ksub_unrank_test
  from lvec_next                      import lvec_next_test
  from moebius_values                 import moebius_values_test
  from monomial_count                 import monomial_count_test
  from monomial_counts                import monomial_counts_test
  from multinomial_coef1              import multinomial_coef1_test
  from multinomial_coef2              import multinomial_coef2_test
  from multiperm_enum                 import multiperm_enum_test
  from nim_sum                        import nim_sum_test
  from padovan                        import padovan_test
  from pent_enum                      import pent_enum_test
  from perm_fixed_enum                import perm_fixed_enum_test
  from perm_print                     import perm_print_test
  from perm0_check                    import perm0_check_test
  from perm0_lex_next                 import perm0_lex_next_test
  from perm0_random                   import perm0_random_test
  from perm0_random2                  import perm0_random2_test
  from perm0_sign                     import perm0_sign_test
  from perm1_check                    import perm1_check_test
  from perrin                         import perrin_test
  from pord_check                     import pord_check_test
  from power_mod                      import power_mod_test
  from prime                          import prime_test
  from pythag_triple_next             import pythag_triple_next_test
  from r8_agm                         import r8_agm_test
  from r8_choose                      import r8_choose_test
  from r8_fall                        import r8_fall_test
  from r8_fall_values                 import r8_fall_values_test
  from r8_gamma                       import r8_gamma_test
  from r8_rise                        import r8_rise_test
  from r8_rise_values                 import r8_rise_values_test
  from r8_to_dec                      import r8_to_dec_test
  from r8_uniform_01                  import r8_uniform_01_test
  from r8_uniform_ab                  import r8_uniform_ab_test
  from r8mat_print                    import r8mat_print_test
  from r8mat_print_some               import r8mat_print_some_test
  from r8poly_add                     import r8poly_add_test
  from r8poly_degree                  import r8poly_degree_test
  from r8poly_dif                     import r8poly_dif_test
  from r8poly_div                     import r8poly_div_test
  from r8poly_mul                     import r8poly_mul_test
  from r8poly_print                   import r8poly_print_test
  from r8vec_frac                     import r8vec_frac_test
  from r8vec_indicator1               import r8vec_indicator1_test
  from r8vec_mirror_next              import r8vec_mirror_next_test
  from r8vec_print                    import r8vec_print_test
  from r8vec_uniform_01               import r8vec_uniform_01_test
  from r8vec_uniform_ab               import r8vec_uniform_ab_test
  from rat_to_cfrac                   import rat_to_cfrac_test
  from regro_next                     import regro_next_test
  from schroeder                      import schroeder_test
  from subset_gray_rank               import subset_gray_rank_test
  from subset_gray_unrank             import subset_gray_unrank_test
  from subset_lex_next                import subset_lex_next_test
  from subset_random                  import subset_random_test
  from subtriangle_next               import subtriangle_next_test
  from thue_binary_next               import thue_binary_next_test
  from thue_ternary_next              import thue_ternary_next_test
  from timestamp                      import timestamp_test
  from tuple_next                     import tuple_next_test
  from tuple_next2                    import tuple_next2_test
  from tuple_next_ge                  import tuple_next_ge_test
  from ubvec_add                      import ubvec_add_test
  from ubvec_print                    import ubvec_print_test
  from ubvec_to_ui4                   import ubvec_to_ui4_test
  from ubvec_xor                      import ubvec_xor_test
  from ui4_to_ubvec                   import ui4_to_ubvec_test
  from vec_colex_next                 import vec_colex_next_test
  from vec_colex_next2                import vec_colex_next2_test
  from vec_colex_next3                import vec_colex_next3_test
  from vec_gray_next                  import vec_gray_next_test
  from vec_gray_rank                  import vec_gray_rank_test
  from vec_gray_unrank                import vec_gray_unrank_test
  from vec_lex_next                   import vec_lex_next_test
  from vec_random                     import vec_random_test
  from vector_constrained_next        import vector_constrained_next_test
  from vector_constrained_next2       import vector_constrained_next2_test
  from vector_constrained_next3       import vector_constrained_next3_test
  from vector_next                    import vector_next_test
  from ytb_enum                       import ytb_enum_test
  from ytb_next                       import ytb_next_test
  from ytb_print                      import ytb_print_test
  from ytb_random                     import ytb_random_test

  print ''
  print 'SUBSET_TEST'
  print '  Python version:'
  print '  Test the SUBSET library.'

  agm_values_test ( )
  asm_enum_test ( )
  asm_triangle_test ( )

  bell_test ( )
  bell_values_test ( )

  catalan_test ( )
  catalan_row_next_test ( )
  catalan_values_test ( )

  cfrac_to_rat_test ( )

  change_greedy_test ( )
  change_next_test ( )

  chinese_check_test ( )
  chinese_to_i4_test ( )

  comb_next_test ( )
  comb_row_next_test ( )
  comb_unrank_test ( )

  comp_enum_test ( )
  comp_next_test ( )
  comp_next_grlex_test ( )
  comp_random_grlex_test ( )
  comp_rank_grlex_test ( )
  comp_to_ksub_test ( )
  comp_unrank_grlex_test ( )

  compnz_enum_test ( )
  compnz_next_test ( )
  compnz_random_test ( )
  compnz_to_ksub_test ( )

  congruence_test ( )

  count_pose_random_test ( )

  derange_enum_test ( )
  derange_enum2_test ( )
  derange_enum3_test ( )

  digraph_arc_print_test ( )

  dvec_add_test ( )
  dvec_complementx_test ( )
  dvec_mul_test ( )
  dvec_print_test ( )
  dvec_sub_test ( )
  dvec_to_i4_test ( )

  equiv_print_test ( )
  equiv_print2_test ( )
  equiv_random_test ( )

  euler_test ( )

  frobenius_number_order2_test ( )
  frobenius_number_order2_values_test ( )

  gamma_values_test ( )
  gamma_log_values_test ( )

  gray_rank2_test ( )
  gray_unrank2_test ( )

  i4_choose_test ( )
  i4_factorial_test ( )
  i4_factorial_values_test ( )
  i4_fall_test ( )
  i4_gcd_test ( )
  i4_huge_test ( )
  i4_log_10_test ( )
  i4_modp_test ( )
  i4_partition_conj_test ( )
  i4_partition_count_test ( )
  i4_partition_count2_test ( )
  i4_partition_count_values_test ( )
  i4_partition_print_test ( )
  i4_rise_test ( )
  i4_sign_test ( )
  i4_sqrt_test ( )
  i4_sqrt_cf_test ( )
  i4_to_chinese_test ( )
  i4_to_dvec_test ( )
  i4_to_i4poly_test ( )
  i4_to_van_der_corput_test ( )
  i4_uniform_ab_test ( )

  i4mat_mm_test
  i4mat_print_test ( )
  i4mat_print_some_test ( )
  i4mat_u1_inverse_test ( )

  i4poly_add_test ( )
  i4poly_degree_test ( )
  i4poly_dif_test ( )
  i4poly_mul_test ( )
  i4poly_print_test ( )
  i4poly_to_i4_test ( )

  i4vec_ascends_test ( )
  i4vec_descends_test ( )
  i4vec_frac_test ( )
  i4vec_index_test ( )
  i4vec_indicator0_test ( )
  i4vec_indicator1_test ( )
  i4vec_max_index_last_test ( )
  i4vec_pairwise_prime_test ( )
  i4vec_print_test ( )
  i4vec_product_test ( )
  i4vec_reverse_test ( )
  i4vec_sort_bubble_a_test ( )
  i4vec_sort_heap_index_d_test ( )
  i4vec_sum_test ( )
  i4vec_transpose_print_test ( )
  i4vec_uniform_ab_test ( )

  index_box_next_2d_test ( )
  index_box_next_3d_test ( )

  inverse_mod_n_test ( )

  involute_enum_test ( )

  josephus_test ( )

  ksub_random_test ( )
  ksub_random2_test ( )
  ksub_random3_test ( )
  ksub_random4_test ( )
  ksub_random5_test ( )
  ksub_rank_test ( )
  ksub_to_comp_test ( )
  ksub_to_compnz_test ( )
  ksub_unrank_test ( )

  lvec_next_test ( )

  moebius_values_test ( )

  monomial_count_test ( )
  monomial_counts_test ( )

  multinomial_coef1_test ( )
  multinomial_coef2_test ( )

  multiperm_enum_test ( )

  nim_sum_test ( )

  padovan_test ( )

  pent_enum_test ( )

  perm_fixed_enum_test ( )
  perm_print_test ( )

  perm0_check_test ( )
  perm0_lex_next_test ( )
  perm0_random_test ( )
  perm0_random2_test ( )
  perm0_sign_test ( )

  perm1_check_test ( )

  perrin_test ( )

  pord_check_test ( )

  power_mod_test ( )

  prime_test ( )

  pythag_triple_next_test ( )

  r8_agm_test ( )
  r8_choose_test ( )
  r8_fall_test ( )
  r8_fall_values_test ( )
  r8_gamma_test ( )
  r8_rise_test ( )
  r8_rise_values_test ( )
  r8_to_dec_test ( )
  r8_uniform_01_test ( )
  r8_uniform_ab_test ( )

  r8mat_print_test ( )
  r8mat_print_some_test ( )

  r8poly_add_test ( )
  r8poly_degree_test ( )
  r8poly_dif_test ( )
  r8poly_div_test ( )
  r8poly_mul_test ( )
  r8poly_print_test ( )

  r8vec_frac_test ( )
  r8vec_indicator1_test ( )
  r8vec_mirror_next_test ( )
  r8vec_print_test ( )
  r8vec_uniform_01_test ( )
  r8vec_uniform_ab_test ( )

  rat_to_cfrac_test ( )

  regro_next_test ( )

  schroeder_test ( )

  subset_gray_rank_test ( )
  subset_gray_unrank_test ( )
  subset_lex_next_test ( )
  subset_random_test ( )

  subtriangle_next_test ( )

  thue_binary_next_test ( )
  thue_ternary_next_test ( )

  tuple_next_test ( )
  tuple_next2_test ( )
  tuple_next_ge_test ( )

  timestamp_test ( )

  tuple_next_test ( )
  tuple_next2_test ( )

  ubvec_add_test ( )
  ubvec_print_test ( )
  ubvec_to_ui4_test ( )
  ubvec_xor_test ( )

  ui4_to_ubvec_test ( )

  vec_colex_next_test ( )
  vec_colex_next2_test ( )
  vec_colex_next3_test ( )

  vec_gray_next_test ( )
  vec_gray_rank_test ( )
  vec_gray_unrank_test ( )

  vec_lex_next_test ( )

  vec_random_test ( )

  vector_constrained_next_test ( )
  vector_constrained_next2_test ( )
  vector_constrained_next3_test ( )
  vector_next_test ( )

  ytb_enum_test ( )
  ytb_next_test ( )
  ytb_print_test ( )
  ytb_random_test ( )
#
#  Terminate.
#
  print ''
  print 'SUBSET_TEST:'
  print '  Normal end of execution.'
  print ''

  return
Example #19
0
def uniform_test():

    #*****************************************************************************80
    #
    ## UNIFORM_TEST tests the UNIFORM library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    27 December 2014
    #
    #  Author:
    #
    #    John Burkardt
    #
    from bvec_print import bvec_print_test
    from bvec_uniform import bvec_uniform_test
    from c4_uniform_01 import c4_uniform_01_test
    from c4mat_print import c4mat_print_test
    from c4mat_print_some import c4mat_print_some_test
    from c4mat_uniform_01 import c4mat_uniform_01_test
    from c4vec_print import c4vec_print_test
    from c4vec_uniform_01 import c4vec_uniform_01_test
    from c8_uniform_01 import c8_uniform_01_test
    from c8mat_print import c8mat_print_test
    from c8mat_print_some import c8mat_print_some_test
    from c8mat_uniform_01 import c8mat_uniform_01_test
    from c8vec_print import c8vec_print_test
    from c8vec_uniform_01 import c8vec_uniform_01_test
    from ch_uniform_ab import ch_uniform_ab_test
    from congruence import congruence_test
    from get_seed import get_seed_test
    from i4_gcd import i4_gcd_test
    from i4_huge import i4_huge_test
    from i4_modp import i4_modp_test
    from i4_seed_advance import i4_seed_advance_test
    from i4_sign import i4_sign_test
    from i4_uniform_0i import i4_uniform_0i_test
    from i4_uniform_ab import i4_uniform_ab_test1
    from i4_uniform_ab import i4_uniform_ab_test2
    from i4mat_print import i4mat_print_test
    from i4mat_print_some import i4mat_print_some_test
    from i4mat_uniform_ab import i4mat_uniform_ab_test
    from i4vec_print import i4vec_print_test
    from i4vec_uniform_ab import i4vec_uniform_ab_test
    from l4_uniform import l4_uniform_test
    from l4mat_print import l4mat_print_test
    from l4mat_print_some import l4mat_print_some_test
    from l4mat_uniform import l4mat_uniform_test
    from l4vec_print import l4vec_print_test
    from l4vec_uniform import l4vec_uniform_test
    from lcrg_anbn import lcrg_anbn_test
    from lcrg_seed import lcrg_seed_test
    from power_mod import power_mod_test
    from r4_uniform_01 import r4_uniform_01_test
    from r4_uniform_ab import r4_uniform_ab_test
    from r4mat_print import r4mat_print_test
    from r4mat_print_some import r4mat_print_some_test
    from r4mat_uniform_01 import r4mat_uniform_01_test
    from r4mat_uniform_ab import r4mat_uniform_ab_test
    from r4vec_print import r4vec_print_test
    from r4vec_uniform_01 import r4vec_uniform_01_test
    from r4vec_uniform_ab import r4vec_uniform_ab_test
    from r8_uniform_01 import r8_uniform_01_test
    from r8_uniform_ab import r8_uniform_ab_test
    from r8col_uniform_abvec import r8col_uniform_abvec_test
    from r8mat_print import r8mat_print_test
    from r8mat_print_some import r8mat_print_some_test
    from r8mat_uniform_01 import r8mat_uniform_01_test
    from r8mat_uniform_ab import r8mat_uniform_ab_test
    from r8row_uniform_abvec import r8row_uniform_abvec_test
    from r8vec_print import r8vec_print_test
    from r8vec_uniform_01 import r8vec_uniform_01_test
    from r8vec_uniform_ab import r8vec_uniform_ab_test
    from r8vec_uniform_abvec import r8vec_uniform_abvec_test
    from timestamp import timestamp_test

    print ''
    print 'UNIFORM_TEST'
    print '  Python version:'
    print '  Test the UNIFORM library.'
    #
    #  Support functions:
    #
    bvec_print_test()
    c4mat_print_test()
    c4mat_print_some_test()
    c4vec_print_test()
    c8mat_print_test()
    c8mat_print_some_test()
    c8vec_print_test()
    congruence_test()
    get_seed_test()
    i4_gcd_test()
    i4_huge_test()
    i4_modp_test()
    i4_seed_advance_test()
    i4_sign_test()
    i4mat_print_test()
    i4mat_print_some_test()
    i4vec_print_test()
    l4mat_print_test()
    l4mat_print_some_test()
    l4mat_uniform_test()
    l4vec_print_test()
    lcrg_anbn_test()
    lcrg_seed_test()
    power_mod_test()
    r4mat_print_test()
    r4mat_print_some_test()
    r4vec_print_test()
    r8mat_print_test()
    r8mat_print_some_test()
    r8vec_print_test()
    timestamp_test()
    #
    #  Main UNIFORM functions.
    #
    bvec_uniform_test()

    c4_uniform_01_test()
    c4mat_uniform_01_test()
    c4vec_uniform_01_test()

    c8_uniform_01_test()
    c8mat_uniform_01_test()
    c8vec_uniform_01_test()

    ch_uniform_ab_test()

    i4_uniform_0i_test()
    i4_uniform_ab_test1()
    i4_uniform_ab_test2()
    i4mat_uniform_ab_test()
    i4vec_uniform_ab_test()

    l4_uniform_test()
    l4mat_uniform_test()
    l4vec_uniform_test()

    r4_uniform_01_test()
    r4_uniform_ab_test()
    r4mat_uniform_01_test()
    r4mat_uniform_ab_test()
    r4vec_uniform_01_test()
    r4vec_uniform_ab_test()
    r4vec_uniform_01_test()
    r4vec_uniform_ab_test()

    r8_uniform_01_test()
    r8_uniform_ab_test()
    r8mat_uniform_01_test()
    r8mat_uniform_ab_test()
    r8vec_uniform_01_test()
    r8vec_uniform_ab_test()

    r8col_uniform_abvec_test()
    r8row_uniform_abvec_test()
    r8vec_uniform_abvec_test()
    #
    #  Terminate.
    #
    print ''
    print 'UNIFORM_TEST:'
    print '  Normal end of execution.'
Example #20
0
def r8lib_test():

    #*****************************************************************************80
    #
    ## R8LIB_TEST tests the R8LIB library.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    24 May 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from agm_values import agm_values_test

    from gamma_values import gamma_values_test
    from gamma_log_values import gamma_log_values_test

    from i4_log_10 import i4_log_10_test
    from i4_sign import i4_sign_test
    from i4_uniform_ab import i4_uniform_ab_test

    from i4vec_indicator0 import i4vec_indicator0_test
    from i4vec_indicator1 import i4vec_indicator1_test
    from i4vec_print import i4vec_print_test
    from i4vec_transpose_print import i4vec_transpose_print_test

    from perm0_check import perm0_check_test
    from perm0_uniform import perm0_uniform_test

    from perm1_check import perm1_check_test
    from perm1_uniform import perm1_uniform_test

    from r8_abs import r8_abs_test
    from r8_acos import r8_acos_test
    from r8_acosh import r8_acosh_test
    from r8_add import r8_add_test
    from r8_agm import r8_agm_test
    from r8_asinh import r8_asinh_test
    from r8_atan import r8_atan_test
    from r8_atanh import r8_atanh_test
    from r8_big import r8_big_test
    from r8_cas import r8_cas_test
    from r8_ceiling import r8_ceiling_test
    from r8_choose import r8_choose_test
    from r8_cosd import r8_cosd_test
    from r8_cotd import r8_cotd_test
    from r8_cscd import r8_cscd_test
    from r8_cube_root import r8_cube_root_test
    from r8_diff import r8_diff_test
    from r8_digit import r8_digit_test
    from r8_e import r8_e_test
    from r8_epsilon import r8_epsilon_test
    from r8_epsilon_compute import r8_epsilon_compute_test
    from r8_factorial import r8_factorial_test
    from r8_factorial_values import r8_factorial_values_test
    from r8_factorial2 import r8_factorial2_test
    from r8_factorial2_values import r8_factorial2_values_test
    from r8_fall import r8_fall_test
    from r8_fall_values import r8_fall_values_test
    from r8_fractional import r8_fractional_test
    from r8_gamma import r8_gamma_test
    from r8_gamma_log import r8_gamma_log_test
    from r8_huge import r8_huge_test
    from r8_log_2 import r8_log_2_test
    from r8_log_b import r8_log_b_test
    from r8_mant import r8_mant_test
    from r8_max import r8_max_test
    from r8_min import r8_min_test
    from r8_mod import r8_mod_test
    from r8_modp import r8_modp_test
    from r8_mop import r8_mop_test
    from r8_nint import r8_nint_test
    from r8_normal_01 import r8_normal_01_test
    from r8_normal_ab import r8_normal_ab_test
    from r8_pi import r8_pi_test
    from r8_power import r8_power_test
    from r8_power_fast import r8_power_fast_test
    from r8_rise import r8_rise_test
    from r8_rise_values import r8_rise_values_test
    from r8_round2 import r8_round2_test
    from r8_roundb import r8_roundb_test
    from r8_roundx import r8_roundx_test
    from r8_secd import r8_secd_test
    from r8_sign import r8_sign_test
    from r8_sind import r8_sind_test
    from r8_swap import r8_swap_test
    from r8_swap3 import r8_swap3_test
    from r8_tand import r8_tand_test
    from r8_to_i4 import r8_to_i4_test
    from r8_to_r8_discrete import r8_to_r8_discrete_test
    from r8_uniform_01 import r8_uniform_01_test
    from r8_uniform_ab import r8_uniform_ab_test
    from r8_walsh_1d import r8_walsh_1d_test
    from r8_wrap import r8_wrap_test

    from r82col_print_part import r82col_print_part_test

    from r82row_print_part import r82row_print_part_test

    from r83col_print_part import r83col_print_part_test

    from r83row_print_part import r83row_print_part_test

    from r8col_swap import r8col_swap_test

    from r8mat_house_axh import r8mat_house_axh_test
    from r8mat_house_form import r8mat_house_form_test
    from r8mat_indicator import r8mat_indicator_test
    from r8mat_mm import r8mat_mm_test
    from r8mat_mtm import r8mat_mtm_test
    from r8mat_mtv import r8mat_mtv_test
    from r8mat_mv import r8mat_mv_test
    from r8mat_nint import r8mat_nint_test
    from r8mat_nonzeros import r8mat_nonzeros_test
    from r8mat_norm_fro import r8mat_norm_fro_test
    from r8mat_norm_l1 import r8mat_norm_l1_test
    from r8mat_norm_li import r8mat_norm_li_test
    from r8mat_print import r8mat_print_test
    from r8mat_print_some import r8mat_print_some_test
    from r8mat_sub import r8mat_sub_test
    from r8mat_transpose import r8mat_transpose_test
    from r8mat_transpose_print import r8mat_transpose_print_test
    from r8mat_transpose_print_some import r8mat_transpose_print_some_test
    from r8mat_uniform_01 import r8mat_uniform_01_test
    from r8mat_uniform_ab import r8mat_uniform_ab_test

    from r8poly_degree import r8poly_degree_test
    from r8poly_print import r8poly_print_test
    from r8poly_value_horner import r8poly_value_horner_test

    from r8vec_amax import r8vec_amax_test
    from r8vec_amin import r8vec_amin_test
    from r8vec_asum import r8vec_asum_test
    from r8vec_concatenate import r8vec_concatenate_test
    from r8vec_copy import r8vec_copy_test
    from r8vec_direct_product import r8vec_direct_product_test
    from r8vec_house_column import r8vec_house_column_test
    from r8vec_indicator0 import r8vec_indicator0_test
    from r8vec_indicator1 import r8vec_indicator1_test
    from r8vec_linspace import r8vec_linspace_test
    from r8vec_max import r8vec_max_test
    from r8vec_mean import r8vec_mean_test
    from r8vec_min import r8vec_min_test
    from r8vec_nint import r8vec_nint_test
    from r8vec_norm_l0 import r8vec_norm_l0_test
    from r8vec_norm_l2 import r8vec_norm_l2_test
    from r8vec_norm_li import r8vec_norm_li_test
    from r8vec_permute import r8vec_permute_test
    from r8vec_permute_uniform import r8vec_permute_uniform_test
    from r8vec_print import r8vec_print_test
    from r8vec_product import r8vec_product_test
    from r8vec_sum import r8vec_sum_test
    from r8vec_uniform_01 import r8vec_uniform_01_test
    from r8vec_uniform_ab import r8vec_uniform_ab_test
    from r8vec_variance import r8vec_variance_test

    from roots_to_r8poly import roots_to_r8poly_test

    from timestamp import timestamp_test

    print ''
    print 'R8LIB_TEST'
    print '  Python version:'
    print '  Test the R8LIB library.'

    agm_values_test()

    gamma_values_test()
    gamma_log_values_test()

    i4_log_10_test()
    i4_sign_test()
    i4_uniform_ab_test()

    i4vec_indicator0_test()
    i4vec_indicator1_test()
    i4vec_print_test()
    i4vec_transpose_print_test()

    perm0_check_test()
    perm0_uniform_test()

    perm1_check_test()
    perm1_uniform_test()

    r8_abs_test()
    r8_acos_test()
    r8_acosh_test()
    r8_add_test()
    r8_agm_test()
    r8_asinh_test()
    r8_atan_test()
    r8_atanh_test()
    r8_big_test()
    r8_cas_test()
    r8_ceiling_test()
    r8_choose_test()
    r8_cosd_test()
    r8_cotd_test()
    r8_cscd_test()
    r8_cube_root_test()
    r8_diff_test()
    r8_digit_test()
    r8_e_test()
    r8_epsilon_test()
    r8_epsilon_compute_test()
    r8_factorial_test()
    r8_factorial_values_test()
    r8_factorial2_test()
    r8_factorial2_values_test()
    r8_fall_test()
    r8_fall_values_test()
    r8_fractional_test()
    r8_gamma_test()
    r8_gamma_log_test()
    r8_huge_test()
    r8_log_2_test()
    r8_log_b_test()
    r8_mant_test()
    r8_max_test()
    r8_min_test()
    r8_mod_test()
    r8_modp_test()
    r8_mop_test()
    r8_nint_test()
    r8_normal_01_test()
    r8_normal_ab_test()
    r8_pi_test()
    r8_power_test()
    r8_power_fast_test()
    r8_rise_test()
    r8_rise_values_test()
    r8_round2_test()
    r8_roundb_test()
    r8_roundx_test()
    r8_secd_test()
    r8_sign_test()
    r8_sind_test()
    r8_swap_test()
    r8_swap3_test()
    r8_tand_test()
    r8_to_i4_test()
    r8_to_r8_discrete_test()
    r8_uniform_01_test()
    r8_uniform_ab_test()
    r8_walsh_1d_test()
    r8_wrap_test()

    r82col_print_part_test()

    r82row_print_part_test()

    r83col_print_part_test()

    r83row_print_part_test()

    r8col_swap_test()

    r8mat_house_axh_test()
    r8mat_house_form_test()
    r8mat_indicator_test()
    r8mat_mm_test()
    r8mat_mtm_test()
    r8mat_mtv_test()
    r8mat_mv_test()
    r8mat_nint_test()
    r8mat_nonzeros_test()
    r8mat_norm_fro_test()
    r8mat_norm_l1_test()
    r8mat_print_test()
    r8mat_print_some_test()
    r8mat_sub_test()
    r8mat_transpose_test()
    r8mat_transpose_print_test()
    r8mat_transpose_print_some_test()
    r8mat_uniform_01_test()
    r8mat_uniform_ab_test()

    r8poly_degree_test()
    r8poly_print_test()
    r8poly_value_horner_test()

    r8vec_amax_test()
    r8vec_amin_test()
    r8vec_asum_test()
    r8vec_concatenate_test()
    r8vec_copy_test()
    r8vec_direct_product_test()
    r8vec_house_column_test()
    r8vec_indicator0_test()
    r8vec_linspace_test()
    r8vec_max_test()
    r8vec_mean_test()
    r8vec_min_test()
    r8vec_nint_test()
    r8vec_norm_l0_test()
    r8vec_norm_l2_test()
    r8vec_norm_li_test()
    r8vec_permute_test()
    r8vec_permute_uniform_test()
    r8vec_print_test()
    r8vec_product_test()
    r8vec_sum_test()
    r8vec_uniform_01_test()
    r8vec_uniform_ab_test()
    r8vec_variance_test()

    roots_to_r8poly_test()

    timestamp_test()
    #
    #  Terminate.
    #
    print ''
    print 'R8LIB_TEST:'
    print '  Normal end of execution.'
Example #21
0
def lpp_test ( ):

#*****************************************************************************80
#
## LPP_TEST tests the LPP library.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license. 
#
#  Modified:
#
#    31 October 2014
#
#  Author:
#
#    John Burkardt
#
  from comp_enum               import comp_enum_test
  from comp_next_grlex         import comp_next_grlex_test
  from comp_random_grlex       import comp_random_grlex_test
  from comp_rank_grlex         import comp_rank_grlex_test
  from comp_unrank_grlex       import comp_unrank_grlex_test
  from i4_choose               import i4_choose_test
  from i4_uniform_ab           import i4_uniform_ab_test
  from i4vec_permute           import i4vec_permute_test
  from i4vec_print             import i4vec_print_test
  from i4vec_sort_heap_index_a import i4vec_sort_heap_index_a_test
  from i4vec_sum               import i4vec_sum_test
  from i4vec_uniform_ab        import i4vec_uniform_ab_test
  from lp_coefficients         import lp_coefficients_test
  from lp_value                import lp_value_test
  from lp_values               import lp_values_test
  from lpp_to_polynomial       import lpp_to_polynomial_test
  from lpp_value               import lpp_value_test
  from mono_next_grlex         import mono_next_grlex_test
  from mono_print              import mono_print_test
  from mono_rank_grlex         import mono_rank_grlex_test
  from mono_unrank_grlex       import mono_unrank_grlex_test
  from mono_upto_enum          import mono_upto_enum_test
  from mono_upto_next_grlex    import mono_upto_next_grlex_test
  from mono_upto_random        import mono_upto_random_test
  from mono_value              import mono_value_test
  from perm_uniform            import perm_uniform_test
  from polynomial_compress     import polynomial_compress_test
  from polynomial_print        import polynomial_print_test
  from polynomial_sort         import polynomial_sort_test
  from polynomial_value        import polynomial_value_test
  from r8mat_print             import r8mat_print_test
  from r8mat_print_some        import r8mat_print_some_test
  from r8mat_uniform_ab        import r8mat_uniform_ab_test
  from r8vec_permute           import r8vec_permute_test
  from r8vec_print             import r8vec_print_test
  from r8vec_uniform_ab        import r8vec_uniform_ab_test
  from timestamp               import timestamp

  print ''
  print 'LPP_TEST'
  print '  Python version:'
  print '  Test the LPP library.'

  i4_choose_test ( )
  i4_uniform_ab_test ( )

  i4vec_permute_test ( )
  i4vec_print_test ( )
  i4vec_sort_heap_index_a_test ( )
  i4vec_sum_test ( )
  i4vec_uniform_ab_test ( )

  r8vec_permute_test ( )
  r8vec_print_test ( )
  r8vec_uniform_ab_test ( )

  r8mat_print_test ( )
  r8mat_print_some_test ( )
  r8mat_uniform_ab_test ( )

  perm_uniform_test ( )

  comp_enum_test ( )
  comp_next_grlex_test ( )
  comp_random_grlex_test ( )
  comp_rank_grlex_test ( )
  comp_unrank_grlex_test ( )

  mono_next_grlex_test ( )
  mono_print_test ( )
  mono_rank_grlex_test ( )
  mono_unrank_grlex_test ( )
  mono_upto_enum_test ( )
  mono_upto_next_grlex_test ( )
  mono_upto_random_test ( )
  mono_value_test ( )

  polynomial_compress_test ( )
  polynomial_print_test ( )
  polynomial_sort_test ( )
  polynomial_value_test ( )

  lp_coefficients_test ( )
  lp_value_test ( )
  lp_values_test ( )

  lpp_to_polynomial_test ( )
  lpp_value_test ( )
#
#  Terminate.
#
  print ''
  print 'LPP_TEST:'
  print '  Normal end of execution.'
  print ''

  return