function subset_test ( )

%*****************************************************************************80
%
%% subset_test tests subset.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    23 March 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../subset' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'subset_test\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test subset.\n' );

  asm_enum_test ( );
  asm_triangle_test ( );

  bell_test ( );

  catalan_test ( );
  catalan_row_next_test ( );

  cfrac_to_rat_test ( );
  cfrac_to_rfrac_test ( );

  ch_to_digit_test ( );

  change_greedy_test ( );
  change_next_test ( );

  chinese_check_test ( );
  chinese_to_i4_test ( );

  comb_next_test ( );
  comb_row_next_test ( );

  comp_enum_test ( );
  comp_next_test ( );
  comp_random_test ( );
  comp_to_ksub_test ( )
  comb_unrank_test ( );

  comp_next_grlex_test ( );
  comp_random_grlex_test ( );
  comp_rank_grlex_test ( );
  comp_unrank_grlex_test ( );

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

  congruence_test ( );

  count_pose_random_test ( );

  debruijn_test ( );

  dec_add_test ( );
  dec_div_test ( );
  dec_mul_test ( );
  dec_round_test ( );
  dec_to_r8_test ( );
  dec_to_rat_test ( );
  dec_to_s_test ( );
  dec_width_test ( );

  decmat_det_test ( );
  decmat_print_test ( );

  derange_enum_test ( );
  derange_enum2_test ( );
  derange_enum3_test ( );

  derange1_back_next_test ( );
  derange1_check_test ( );
  derange1_weed_next_test ( );

  digit_to_ch_test ( );

  digraph_arc_euler_test ( );
  digraph_arc_print_test ( );

  diophantine_test ( );
  diophantine_solution_minimize_test ( );

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

  equiv_next_test ( );
  equiv_next2_test ( );
  equiv_print_test ( );
  equiv_print2_test ( );
  equiv_random_test ( );

  euler_row_test ( );

  frobenius_number_order2_test ( );

  gray_next_test ( );
  gray_rank2_test ( );
  gray_unrank2_test ( );

  i4_bclr_test ( );
  i4_bset_test ( );
  i4_btest_test ( );
  i4_choose_test ( );
  i4_factor_test ( );
  i4_fall_test ( );
  i4_gcd_test ( );
  i4_huge_test ( );
  i4_log_10_test ( );
  i4_modp_test ( );
  i4_moebius_test ( );
  i4_partition_conj_test ( );
  i4_partition_count_test ( );
  i4_partition_count2_test ( );
  i4_partition_next_test ( );
  i4_partition_next2_test ( );
  i4_partition_print_test ( );
  i4_partition_random_test ( );
  i4_partitions_next_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_01_rowcolsum_test ( );
  i4mat_perm1_test ( );
  i4mat_2perm1_test ( );
  i4mat_u1_inverse_test ( );
  i4mat_print_test ( );
  i4mat_print_some_test ( );

  i4poly_test ( );
  i4poly_add_test ( );
  i4poly_cyclo_test ( );
  i4poly_degree_test ( );
  i4poly_dif_test ( );
  i4poly_div_test ( );
  i4poly_mul_test ( );
  i4poly_print_test ( );
  i4poly_to_i4_test ( );

  i4vec_ascends_test ( );
  i4vec_backtrack_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_reverse_test ( );
  i4vec_sort_bubble_a_test ( );
  i4vec_sort_heap_index_d_test ( );
  i4vec_transpose_print_test ( );
  i4vec_uniform_ab_test ( );

  index_box_next_2d_test ( );
  index_box_next_3d_test ( );
  index_box2_next_2d_test ( );
  index_box2_next_3d_test ( );
  index_next0_test ( );
  index_next1_test ( );
  index_next2_test ( );
  index_rank0_test ( );
  index_rank1_test ( );
  index_rank2_test ( );
  index_unrank0_test ( );
  index_unrank1_test ( );
  index_unrank2_test ( );

  inverse_mod_n_test ( )

  inversion_to_perm1_test ( );

  involute_enum_test ( );

  jfrac_to_rfrac_test ( );

  josephus_test ( );

  ksub_next_test ( );
  ksub_next2_test ( );
  ksub_next3_test ( );
  ksub_next4_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 ( );

  l4vec_next_test ( );

  matrix_product_opt_test ( );
  moebius_matrix_test ( );

  monomial_count_test ( );
  monomial_counts_test ( );

  morse_thue_test ( );

  multinomial_coef1_test ( );
  multinomial_coef2_test ( );

  multiperm_enum_test ( );
  multiperm_next_test ( );
  nim_sum_test ( );
  padovan_test ( );

  pell_basic_test ( );
  pell_next_test ( );

  pent_enum_test ( );

  perm_ascend_test ( );
  perm_fixed_enum_test ( );

  perm0_check_test ( );
  perm0_lex_next_test ( );
  perm0_print_test ( );

  perm1_break_count_test ( );
  perm1_canon_to_cycle_test ( );
  perm1_check_test ( );
  perm1_cycle_test ( );
  perm1_cycle_to_canon_test ( );
  perm1_cycle_to_index_test ( );
  perm1_distance_test ( );
  perm1_free_test ( );
  perm1_index_to_cycle_test ( );
  perm1_inverse_test ( );
  perm1_inverse2_test ( );
  perm1_inverse3_test ( );
  perm1_lex_next_test ( );
  perm1_mul_test ( );
  perm1_next_test ( );
  perm1_next2_test ( );
  perm1_next3_test ( );
  perm1_print_test ( );
  perm1_random_test ( );
  perm1_random2_test ( );
  perm1_rank_test ( );
  perm1_sign_test ( );
  perm1_to_equiv_test ( );
  perm1_to_inversion_test ( );
  perm1_to_ytb_test ( );
  perm1_unrank_test ( );

  perrin_test ( );

  pord_check_test ( );

  power_mod_test ( );

  power_series1_test ( );
  power_series2_test ( );
  power_series3_test ( );
  power_series4_test ( );

  prime_test ( );

  pythag_triple_next_test ( );

  r8_agm_test ( );
  r8_choose_test ( );
  r8_fall_test ( );
  r8_rise_test ( );
  r8_to_cfrac_test ( );
  r8_to_dec_test ( );
  r8_to_rat_test ( );
  r8_uniform_01_test ( );
  r8_uniform_ab_test ( );

  r8mat_det_test ( );
  r8mat_perm1_test ( );
  r8mat_2perm1_test ( );
  r8mat_permanent_test ( );
  r8mat_print_test ( );
  r8mat_print_some_test ( );

  r8poly_test ( );
  r8poly_add_test ( );
  r8poly_degree_test ( );
  r8poly_dif_test ( );
  r8poly_div_test ( );
  r8poly_f2p_test ( );
  r8poly_fval_test ( );
  r8poly_mul_test( );
  r8poly_n2p_test ( );
  r8poly_nval_test ( );
  r8poly_nx_test ( );
  r8poly_p2f_test ( );
  r8poly_p2n_test ( );
  r8poly_p2t_test ( );
  r8poly_power_test ( );
  r8poly_print_test ( );
  r8poly_pval_test ( );
  r8poly_t2p_test ( );

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

% random_initialize_test ( );

  rat_add_test ( );
  rat_div_test ( );
  rat_farey_test ( );
  rat_farey2_test ( );
  rat_mul_test ( );
  rat_normalize_test ( );
  rat_sum_formula_test ( );
  rat_to_cfrac_test ( );
  rat_to_dec_test ( );
  rat_to_r8_test ( );
  rat_to_s_test ( );
  rat_width_test ( );

  ratmat_det_test ( );
  ratmat_print_test ( );

  regro_next_test ( );

  rfrac_to_cfrac_test ( );
  rfrac_to_jfrac_test ( );

  schroeder_test ( );

  sort_heap_external_test ( );

  subset_by_size_next_test ( );
  subset_gray_next_test ( );
  subset_gray_rank_test ( );
  subset_gray_unrank_test ( );
  subset_lex_next_test ( );
  subset_random_test ( );

  subcomp_next_test ( );

  subcompnz_next_test ( );
  subcompnz2_next_test( );

  subtriangle_next_test ( );

  thue_binary_next_test ( );
  thue_ternary_next_test ( );

  triang_test ( );

  tuple_next_test ( );
  tuple_next_fast_test ( );
  tuple_next_ge_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_constrained_next4_test ( );
  vector_constrained_next5_test ( );
  vector_constrained_next6_test ( );
  vector_constrained_next7_test ( );
  vector_next_test ( );

  ytb_enum_test ( );
  ytb_next_test ( );
  ytb_print_test ( );
  ytb_random_test ( );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'subset_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../subset' );

  return
end
