int i4_abs ( int i ); int i4_bit_hi1 ( int n ); int i4_bit_lo0 ( int n ); int i4_bit_lo1 ( int n ); int i4_bit_reverse ( int i, int n ); int i4_ceiling ( double x ); int i4_characteristic ( int q ); int i4_choose ( int n, int k ); int i4_div_rounded ( int a, int b ); int i4_division ( int a, int b ); int i4_divp ( int i, int j ); int i4_factorial ( int n ); int i4_factorial2 ( int n ); void i4_factorial2_values ( int &n_data, int &n, int &fn ); int i4_fall ( int x, int n ); void i4_fall_values ( int &n_data, int &m, int &n, int &fmn ); int i4_floor ( double x ); int i4_fraction ( int i, int j ); int i4_gcd ( int i, int j ); int i4_gcdb ( int i, int j, int k ); int i4_huge ( ); double i4_huge_normalizer ( ); bool i4_is_even ( int i ); bool i4_is_odd ( int i ); bool i4_is_power_of_2 ( int n ); bool i4_is_prime ( int n ); int i4_lcm ( int i, int j ); int i4_log_2 ( int i ); int i4_log_10 ( int i ); int i4_log_i4 ( int i4, int j4 ); int i4_log_r8 ( int x, double b ); void i4_mant ( double x, int &s, int &j, int &k, int &l ); int i4_max ( int i1, int i2 ); int i4_min ( int i1, int i2 ); int i4_mod_inv ( int b, int n ); void i4_moddiv ( int n, int d, int &m, int &r ); int i4_modp ( int i, int j ); int i4_mop ( int i ); int i4_power ( int i, int j ); int i4_reverse_bytes ( int x ); int i4_rise ( int x, int n ); void i4_rise_values ( int &n_data, int &m, int &n, int &fmn ); int i4_sign ( int i ); int i4_sign3 ( int i ); void i4_swap ( int &i, int &j ); void i4_swap3 ( int &i, int &j, int &k ); double i4_to_angle ( int i ); int *i4_to_digits_binary ( int i, int n ); int *i4_to_digits_decimal ( int i, int n ); int *i4_to_fac ( int i, int nprime ); void i4_to_halton ( int dim_num, int step, int seed[], int leap[], int base[], double r[] ); char i4_to_isbn ( int i ); bool i4_to_l4 ( int i4 ); void i4_to_pascal ( int k, int &i, int &j ); int i4_to_pascal_degree ( int k ); void i4_to_triangle ( int k, int &i, int &j ); int i4_uniform_ab ( int b, int c, int &seed );; void i4_unswap3 ( int &i, int &j, int &k ); int i4_walsh_1d ( double x, int digit ); int i4_width ( int i ); int i4_wrap ( int ival, int ilo, int ihi ); unsigned int i4_xor ( unsigned int i, unsigned int j ); void i43mat_flip_cols ( int m, int n, int a[] ); void i43mat_flip_rows ( int m, int n, int a[] ); void i4block_delete ( int ***a, int l, int m, int n ); int ***i4block_new ( int l, int m, int n ); void i4block_print ( int l, int m, int n, int a[], string title ); int *i4block_zero_new ( int l, int m, int n ); void i4cmat_delete ( int **a, int m, int n ); int **i4cmat_new ( int m, int n ); int i4col_compare ( int m, int n, int a[], int i, int j ); int i4col_find ( int m, int n, int a[], int ivec[] ); void i4col_find_item ( int m, int n, int a[], int item, int &row, int &col ); void i4col_find_pair_wrap ( int m, int n, int a[], int item1, int item2, int &row, int &col ); int *i4col_first_index ( int m, int n, int a[] ); void i4col_sort_a ( int m, int n, int a[] ); void i4col_sort_d ( int m, int n, int a[] ); void i4col_sort2_a ( int m, int n, int a[] ); void i4col_sort2_d ( int m, int n, int a[] ); int i4col_sorted_singleton_count ( int m, int n, int a[] ); void i4col_sorted_unique ( int m, int n, int a[], int &unique_num ); int i4col_sorted_unique_count ( int m, int n, int a[] ); void i4col_swap ( int m, int n, int a[], int icol1, int icol2 ); int *i4col_unique_index ( int m, int n, int a[] ); void i4i4_sort_a ( int i1, int i2, int &j1, int &j2 ); void i4i4i4_sort_a ( int i1, int i2, int i3, int &j1, int &j2, int &j3 ); float i4int_to_r4int ( int imin, int imax, int i, float rmin, float rmax ); double i4int_to_r8int ( int imin, int imax, int i, double rmin, double rmax ); void i4list_print ( int n, int first[], int list_num, int list[], string title ); int *i4mat_border_add ( int m, int n, int table[] ); int *i4mat_border_cut ( int m, int n, int table[] );; void i4mat_copy ( int m, int n, int a1[], int a2[] ); int *i4mat_copy_new ( int m, int n, int a1[] ); void i4mat_elim ( int m, int n, int a[] ); void i4mat_flip_cols ( int m, int n, int a[] ); void i4mat_flip_rows ( int m, int n, int a[] ); int *i4mat_histogram ( int m, int n, int a[], int histo_num ); int *i4mat_indicator_new ( int m, int n ); int *i4mat_l1_inverse ( int n, int a[] ); int i4mat_max ( int m, int n, int a[] ); void i4mat_max_index ( int m, int n, int a[], int &i_max, int &j_max ); int i4mat_min ( int m, int n, int a[] ); void i4mat_min_index ( int m, int n, int a[], int &i_min, int &j_min ); int *i4mat_mm ( int n1, int n2, int n3, int a[], int b[] ); void i4mat_perm_uniform ( int n, int a[], int &seed ); void i4mat_perm2_uniform ( int m, int n, int a[], int &seed ); void i4mat_print ( int m, int n, int a[], string title ); void i4mat_print_some ( int m, int n, int a[], int ilo, int jlo, int ihi, int jhi, string title ); void i4mat_red ( int m, int n, int a[], int row[], int col[] ); void i4mat_transpose_print ( int m, int n, int a[], string title ); void i4mat_transpose_print_some ( int m, int n, int a[], int ilo, int jlo, int ihi, int jhi, string title ); int *i4mat_u1_inverse ( int n, int a[] ); void i4mat_uniform_ab ( int m, int n, int a, int b, int &seed, int x[] ); int *i4mat_uniform_ab_new ( int m, int n, int a, int b, int &seed ); void i4rmat_delete ( int **a, int m, int n ); int **i4rmat_new ( int m, int n ); int i4row_compare ( int m, int n, int a[], int i, int j ); void i4row_find_item ( int m, int n, int a[], int item, int &row, int &col ); int *i4row_max ( int m, int n, int a[] ); double *i4row_mean ( int m, int n, int a[] ); int *i4row_min ( int m, int n, int a[] ); void i4row_sort_a ( int m, int n, int a[] ); void i4row_sort_d ( int m, int n, int a[] ); void i4row_sort2_d ( int m, int n, int a[] ); int *i4row_sum ( int m, int n, int a[] ); void i4row_swap ( int m, int n, int a[], int irow1, int irow2 ); double *i4row_variance ( int m, int n, int a[] ); void i4vec_add ( int n, int a[], int b[], int c[] ); int *i4vec_add_new ( int n, int a[], int b[] ); bool i4vec_all_nonpositive ( int n, int a[] ); int i4vec_amax ( int n, int a[] ); int i4vec_amax_index ( int n, int a[] ); int i4vec_amin ( int n, int a[] ); int i4vec_amin_index ( int n, int a[] ); int i4vec_aminz ( int n, int a[] ); int i4vec_aminz_index ( int n, int a[] ); bool i4vec_any_lt ( int n, int a[], int b[] ); bool i4vec_any_negative ( int n, int a[] ); bool i4vec_any_nonzero ( int n, int a[] ); int *i4vec_ascend_sub ( int n, int a[], int &length ); bool i4vec_ascends ( int n, int a[] ); void i4vec_axpy ( int n, int ia, int ix[], int incx, int iy[], int incy ); void i4vec_bracket ( int n, int x[], int xval, int &left, int &right ); int i4vec_compare ( int n, int a1[], int a2[] ); void i4vec_concatenate ( int n1, int a[], int n2, int b[], int c[] ); int *i4vec_concatenate_new ( int n1, int a[], int n2, int b[] ); void i4vec_copy ( int n, int a1[], int a2[] ); int *i4vec_copy_new ( int n, int a1[] ); int *i4vec_cum_new ( int n, int a[] ); int *i4vec_cum0_new ( int n, int a[] ); void i4vec_decrement ( int n, int a[] ); bool i4vec_descends ( int n, int x[] ); void i4vec_direct_product ( int factor_index, int factor_order, int factor_value[], int factor_num, int point_num, int x[] ); void i4vec_direct_product2 ( int factor_index, int factor_order, int factor_value[], int factor_num, int point_num, int w[] ); int i4vec_dot_product ( int n, int x[], int y[] ); bool i4vec_eq ( int n, int a1[], int a2[] ); bool i4vec_even_all ( int n, int a[] ); bool i4vec_even_any ( int n, int a[] ); int i4vec_find ( int n, int a[], int value ); int *i4vec_first_index ( int n, int a[] ); int i4vec_frac ( int n, int a[], int k ); int i4vec_gcd ( int n, int a[] ); void i4vec_heap_a ( int n, int a[] ); void i4vec_heap_d ( int n, int a[] ); int i4vec_heap_d_extract ( int &n, int a[] ); void i4vec_heap_d_insert ( int &n, int a[], int value ); int i4vec_heap_d_max ( int n, int a[] ); int *i4vec_histogram ( int n, int a[], int histo_num ); int *i4vec_histogram_masked ( int n, int a[], int histo_num, int mask[] ); void i4vec_increment ( int n, int a[] ); int i4vec_index ( int n, int a[], int aval ); void i4vec_index_delete_all ( int n, int x[], int indx[], int xval, int &n2, int x2[], int indx2[] ); void i4vec_index_delete_dupes ( int n, int x[], int indx[], int &n2, int x2[], int indx2[] ); void i4vec_index_delete_one ( int n, int x[], int indx[], int xval, int &n2, int x2[], int indx2[] ); void i4vec_index_insert ( int &n, int x[], int indx[], int xval ); void i4vec_index_insert_unique ( int &n, int x[], int indx[], int xval ); void i4vec_index_order ( int n, int x[], int indx[] ); void i4vec_index_search ( int n, int x[], int indx[], int xval, int &less, int &equal, int &more ); void i4vec_index_sort_unique ( int n, int x[], int &n2, int x2[], int indx2[] ); void i4vec_indexed_heap_d ( int n, int a[], int indx[] ); int i4vec_indexed_heap_d_extract ( int &n, int a[], int indx[] ); void i4vec_indexed_heap_d_insert ( int &n, int a[], int indx[], int indx_insert ); int i4vec_indexed_heap_d_max ( int n, int a[], int indx[] ); void i4vec_indicator0 ( int n, int a[] ); int *i4vec_indicator0_new ( int n ); void i4vec_indicator1 ( int n, int a[] ); int *i4vec_indicator1_new ( int n ); void i4vec_insert ( int n, int a[], int pos, int value ); int i4vec_lcm ( int n, int a[] ); int i4vec_max ( int n, int ivec[] ); int i4vec_max_index ( int n, int a[] ); int i4vec_max_index_last ( int n, int a[] ); double i4vec_mean ( int n, int x[] ); int i4vec_median ( int n, int a[] ); int *i4vec_merge_a ( int na, int a[], int nb, int b[] ); int i4vec_min ( int n, int ivec[] ); int i4vec_min_index ( int n, int a[] ); void i4vec_min_mv ( int m, int n, int u[], int v[], int w[] ); void i4vec_negone ( int n, int a[] ); int *i4vec_negone_new ( int n ); int i4vec_nonzero_count ( int n, int a[] ); void i4vec_nonzero_first ( int n, int x[], int &nz, int indx[] ); int i4vec_norm_l0 ( int n, int a[] ); bool i4vec_odd_all ( int n, int a[] ); bool i4vec_odd_any ( int n, int a[] ); int i4vec_order_type ( int n, int x[] ); bool i4vec_pairwise_prime ( int n, int a[] ); void i4vec_part ( int n, int nval, int x[] ); void i4vec_part_quick_a ( int n, int a[], int &l, int &r ); void i4vec_permute ( int n, int p[], int a[] ); void i4vec_permute_uniform ( int n, int a[], int &seed ); void i4vec_print ( int n, int a[], string title ); void i4vec_print_part ( int n, int a[], int max_print, string title ); void i4vec_print_some ( int n, int a[], int i_lo, int i_hi, string title ); int i4vec_product ( int n, int a[] ); int i4vec_red ( int n, int a[] ); void i4vec_reverse ( int n, int x[] ); void i4vec_rotate ( int n, int m, int x[] ); int i4vec_run_count ( int n, int a[] ); int i4vec_search_binary_a ( int n, int a[], int b ); int i4vec_search_binary_d ( int n, int a[], int b ); void i4vec_sort_bubble_a ( int n, int a[] ); void i4vec_sort_bubble_d ( int n, int a[] ); void i4vec_sort_heap_a ( int n, int a[] ); void i4vec_sort_heap_d ( int n, int a[] ); int *i4vec_sort_heap_index_a ( int n, int a[] ); int *i4vec_sort_heap_index_d ( int n, int a[] ); void i4vec_sort_insert_a ( int n, int a[] ); void i4vec_sort_insert_d ( int n, int a[] ); void i4vec_sort_quick_a ( int n, int a[] ); void i4vec_sort_shell_a ( int n, int a[] ); void i4vec_sorted_undex ( int x_num, int x_val[], int x_unique_num, int undx[], int xdnu[] ); int i4vec_sorted_unique ( int n, int a[] ); int i4vec_sorted_unique_count ( int n, int a[] ); void i4vec_sorted_unique_hist ( int n, int a[], int maxuniq, int &unique_num, int auniq[], int acount[] ); int i4vec_split ( int n, int a[], int split ); double i4vec_std ( int n, int x[] ); int i4vec_sum ( int n, int a[] ); void i4vec_swap ( int n, int iarray1[], int iarray2[] ); void i4vec_transpose_print ( int n, int a[], string title ); void i4vec_undex ( int x_num, int x_val[], int x_unique_num, int undx[], int xdnu[] ); void i4vec_uniform_ab ( int n, int a, int b, int &seed, int x[] ); int *i4vec_uniform_ab_new ( int n, int a, int b, int &seed ); int i4vec_unique_count ( int n, int a[] ); int *i4vec_unique_index ( int n, int a[] ); int *i4vec_value_index ( int n, int a[], int value, int max_index, int &n_index ); int i4vec_value_num ( int n, int a[], int value ); double i4vec_variance ( int n, int x[] ); int i4vec_width ( int n, int a[] ); void i4vec_zero ( int n, int a[] ); int *i4vec_zero_new ( int n ); int i4vec2_compare ( int n, int a1[], int a2[], int i, int j ); void i4vec2_print ( int n, int a1[], int a2[], string title ); void i4vec2_sort_a ( int n, int a1[], int a2[] ); void i4vec2_sort_d ( int n, int a1[], int a2[] ); void i4vec2_sorted_unique ( int n, int a1[], int a2[], int &unique_num ); int i4vec2_sorted_unique_count ( int n, int a1[], int a2[] ); int l4_to_i4 ( bool l ); bool l4_xor ( bool l1, bool l2 ); int pascal_to_i4 ( int i, int j ); void perm_cycle ( int n, int p[], int &isgn, int &ncycle, int iopt ); bool perm0_check ( int n, int p[] ); int *perm0_uniform_new ( int n, int &seed ); bool perm1_check ( int n, int p[] ); int *perm1_uniform_new ( int n, int &seed ); int prime ( int n ); int r8_nint ( double x ); double r8_uniform_ab ( double a, double b, int &seed ); void r8vec_print ( int n, double a[], string title ); void sort_heap_external ( int n, int &indx, int &i, int &j, int isgn ); void timestamp ( ); int triangle_to_i4 ( int i, int j );