I4LIB
A Single Precision Integer Arithmetic Utility Library
I4LIB
is a C library which
contains many utility routines for "I4" or "single precision integer"
arithmetic.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
I4LIB is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Programs:
C4LIB,
a C library which
implements certain elementary functions for "C4" or
single precision complex variables;
C8LIB,
a C library which
implements certain elementary functions for "C8" or
double precision complex variables;
I8LIB,
a C library which
contains many utility routines, using "I8" or "double precision integer"
arithmetic.
R4LIB,
a C library which
contains many utility routines, using "R4" or
"single precision real" arithmetic.
R8LIB,
a C library which
contains many utility routines, using "R8" or
"double precision real" arithmetic.
SUBPAK,
a C library which
contains many utility routines;
Reference:
-
Milton Abramowitz, Irene Stegun,
Handbook of Mathematical Functions,
National Bureau of Standards, 1964,
ISBN: 0-486-61272-4,
LC: QA47.A34.
-
Thomas Cormen, Charles Leiserson, Ronald Rivest,
Introduction to Algorithms,
MIT Press, 2001,
ISBN: 0262032937,
LC: QA76.C662.
-
Albert Nijenhuis, Herbert Wilf,
Combinatorial Algorithms for Computers and Calculators,
Second Edition,
Academic Press, 1978,
ISBN: 0-12-519260-6,
LC: QA164.N54.
Source Code:
Examples and Tests:
List of Routines:
-
I4_ABS returns the absolute value of an I4.
-
I4_AND calculates the AND of two I4's.
-
I4_BCLR returns a copy of an I4 in which the POS-th bit is set to 0.
-
I4_BIT_HI1 returns the position of the high 1 bit base 2 in an I4.
-
I4_BIT_LO0 returns the position of the low 0 bit base 2 in an I4.
-
I4_BIT_LO1 returns the position of the low 1 bit base 2 in an I4.
-
I4_BIT_REVERSE reverses the bits in an I4.
-
I4_BSET returns a copy of an I4 in which the POS-th bit is set to 1.
-
I4_BTEST returns TRUE if the POS-th bit of an I4 is 1.
-
I4_CEILING rounds an R8 up to the nearest I4.
-
I4_CHARACTERISTIC gives the characteristic for an I4.
-
I4_CHOOSE computes the binomial coefficient C(N,K).
-
I4_CHOOSE_CHECK reports whether the binomial coefficient can be computed.
-
I4_CHOOSE_LOG computes the logarithm of the Binomial coefficient.
-
I4_DIV_ROUNDED computes the rounded result of I4 division.
-
I4_DIVISION returns the result of integer division.
-
I4_DIVP returns the smallest multiple of J greater than or equal to an I4.
-
I4_FACTORIAL computes the factorial of N.
-
I4_FACTORIAL_LOG returns the logarithm of N factorial.
-
I4_FACTORIAL_VALUES returns values of the factorial function.
-
I4_FACTORIAL2 computes the double factorial function.
-
I4_FACTORIAL2_VALUES returns values of the double factorial function.
-
I4_FALL computes the falling factorial function [X]_N.
-
I4_FALL_VALUES returns values of the integer falling factorial function.
-
I4_FLOOR rounds an R8 down to the nearest I4.
-
I4_FRACTION computes a ratio and returns an integer result.
-
I4_GCD finds the greatest common divisor of two I4's.
-
I4_GCDB finds the greatest common divisor of the form K^N of two I4's.
-
I4_HUGE returns a "huge" I4.
-
I4_HUGE_NORMALIZER returns the "normalizer" for I4_HUGE.
-
I4_IS_EVEN returns TRUE if an I4 is even.
-
I4_IS_ODD returns TRUE if an I4 is odd.
-
I4_IS_POWER_OF_2 reports whether an I4 is a power of 2.
-
I4_IS_POWER_OF_10 reports whether an I4 is a power of 10.
-
I4_IS_PRIME reports whether an I4 is prime.
-
I4_LCM computes the least common multiple of two I4's.
-
I4_LCM_12N computes the least common multiple of the integers 1 through N.
-
I4_LOG_10 returns the integer part of the logarithm base 10 of an I4.
-
I4_LOG_2 returns the integer part of the logarithm base 2 of an I4.
-
I4_LOG_I4 returns the logarithm of an I4 to an I4 base.
-
I4_LOG_R8 returns the integer part of the logarithm base B of an I4.
-
I4_MANT computes the "mantissa" of an R4.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the smaller of two I4's.
-
I4_MOD_INV calculates the inverse of B mod N.
-
I4_MODDIV breaks an I4 into a multiple of a divisor and remainder.
-
I4_MODP returns the nonnegative remainder of I4 division.
-
I4_MOP returns the I-th power of -1 as an I4 value.
-
I4_NORMAL_AB returns a scaled pseudonormal I4.
-
I4_NORMAL_AB_TEST tests I4_NORMAL_AB.
-
I4_NOT calculates the NOT of an I4 with respect to a maximum value.
-
I4_OR calculates the inclusive OR of two I4's.
-
I4_POWER returns the value of I^J.
-
I4_REVERSE_BYTES reverses the bytes in an I4.
-
I4_RISE computes the rising factorial function [X]^N.
-
I4_RISE_VALUES returns values of the integer rising factorial function.
-
I4_SIGN returns the sign of an I4.
-
I4_SIGN3 returns the three-way sign of an I4.
-
I4_SWAP switches two I4's.
-
I4_SWAP3 swaps three I4's.
-
I4_TO_ANGLE maps I4's to points on a circle.
-
I4_TO_DIGITS_BINARY produces the binary digits of an I4.
-
I4_TO_DIGITS_DECIMAL determines the last N decimal digits of an I4.
-
I4_TO_FAC converts an I4 into a product of prime factors.
-
I4_TO_HALTON computes one element of a leaped Halton subsequence.
-
I4_TO_ISBN converts an I4 to an ISBN digit.
-
I4_TO_L4 converts an I4 to an L4.
-
I4_TO_PASCAL converts a linear index to Pascal triangle coordinates.
-
I4_TO_PASCAL_DEGREE converts a linear index to a Pascal triangle degree.
-
I4_TO_TRIANGLE_LOWER converts an integer to lower triangular coordinates.
-
I4_TO_TRIANGLE_UPPER converts an integer to upper triangular coordinates.
-
I4_UNIFORM_AB returns a scaled pseudorandom I4 between A and B.
-
I4_UNSWAP3 unswaps three I4's.
-
I4_WALSH_1D evaluates the Walsh function of a real scalar argument.
-
I4_WIDTH returns the printing width of an I4.
-
I4_WRAP forces an I4 to lie between given limits by wrapping.
-
I4_XOR calculates the exclusive OR of two I4's.
-
I43MAT_FLIP_COLS swaps the columns of an I43MAT.
-
I43MAT_FLIP_ROWS swaps the rows of an I43MAT.
-
I4BLOCK_DELETE frees memory associated with an I4BLOCK.
-
I4BLOCK_NEW allocates a new I4BLOCK.
-
I4BLOCK_PRINT prints an I4BLOCK.
-
I4BLOCK_ZEROS_NEW returns a new zeroed I4BLOCK.
-
I4CMAT_DELETE frees the memory set aside by I4CMAT_NEW.
-
I4CMAT_NEW sets up an I4CMAT of the desired dimensions.
-
I4COL_COMPARE compares columns I and J of an I4COL.
-
I4COL_FIND seeks a table column equal to an I4COL.
-
I4COL_FIND_ITEM searches an I4COL for a given value.
-
I4COL_FIND_PAIR_WRAP wrap searches an I4COL for a pair of items.
-
I4COL_FIRST_INDEX indexes the first occurrence of values in an I4COL.
-
I4COL_SORT_A ascending sorts the columns of an I4COL.
-
I4COL_SORT_D descending sorts the columns of an I4COL.
-
I4COL_SORT2_A ascending sorts the elements of each column of an I4COL.
-
I4COL_SORT2_D descending sorts the elements of each column of an I4COL.
-
I4COL_SORTED_SINGLETON_COUNT counts singletons in an I4COL.
-
I4COL_SORTED_UNIQUE keeps unique elements in a sorted I4COL.
-
I4COL_SORTED_UNIQUE_COUNT counts unique elements in an I4COL.
-
I4COL_SWAP swaps two columns of an I4COL.
-
I4COL_UNIQUE_INDEX indexes the unique occurrence of values in an I4COL.
-
I4I4_SORT_A ascending sorts a pair of I4's.
-
I4I4I4_SORT_A ascending sorts a triple of I4's.
-
I4INT_TO_R8INT maps an I4 interval to an R4 interval.
-
I4INT_TO_R8INT maps an I4 interval to an R8 interval.
-
I4LIST_PRINT prints an I4LIST.
-
I4MAT_BORDER_ADD adds a "border" to an I4MAT.
-
I4MAT_BORDER_CUT cuts the "border" of an I4MAT.
-
I4MAT_COPY copies one I4MAT to another.
-
I4MAT_COPY_NEW copies an I4MAT to a "new" I4MAT.
-
I4MAT_ELIM carries out exact Gauss elimination on an I4MAT.
-
I4MAT_FLIP_COLS swaps the columns of an I4MAT.
-
I4MAT_FLIP_ROWS swaps the rows of an I4MAT.
-
I4MAT_HISTOGRAM computes a histogram of the elements of an I4MAT.
-
I4MAT_INDICATOR_NEW sets up an "indicator" I4MAT.
-
I4MAT_IS_BINARY is true if the entries in an I4MAT are all 0 or 1.
-
I4MAT_L1_INVERSE inverts a unit lower triangular I4MAT.
-
I4MAT_MAX returns the maximum of an I4MAT.
-
I4MAT_MAX_INDEX returns the location of the maximum of an I4MAT.
-
I4MAT_MIN returns the minimum of an I4MAT.
-
I4MAT_MIN_INDEX returns the location of the minimum of an I4MAT.
-
I4MAT_MM multiplies two I4MAT's.
-
I4MAT_PERM_UNIFORM selects a random permutation of an I4MAT.
-
I4MAT_PERM2_UNIFORM selects a random permutation of an I4MAT.
-
I4MAT_PRINT prints an I4MAT.
-
I4MAT_PRINT_SOME prints some of an I4MAT.
-
I4MAT_PRODUCT_ELEMENTWISE returns the elementwise produce to two I4MAT's.
-
I4MAT_RANK computes the rank of an I4MAT.
-
I4MAT_REF computes the integer row echelon form (IREF) of an I4MAT.
-
I4MAT_ROW_REDUCE divides out common factors in row I of an I4MAT.
-
I4MAT_ROW_SWAP swaps rows in an I4MAT.
-
I4MAT_RREF: the integer row reduced echelon form (IRREF) of an I4MAT.
-
I4MAT_SUM sums the entries of an I4MAT.
-
I4MAT_TRANSPOSE transposes an I4MAT.
-
I4MAT_TRANSPOSE_NEW transposes an I4MAT.
-
I4MAT_TRANSPOSE_PRINT prints an I4MAT, transposed.
-
I4MAT_TRANSPOSE_PRINT_SOME prints some of an I4MAT, transposed.
-
I4MAT_U_SOLVE solves an upper triangular linear system with I4MAT matrix.
-
I4MAT_U1_INVERSE inverts a unit upper triangular I4MAT.
-
I4MAT_UNIFORM_AB returns a scaled pseudorandom I4MAT.
-
I4MAT_UNIFORM_AB_NEW returns a scaled pseudorandom I4MAT.
-
I4MAT_WIDTH returns the printing width of an I4MAT.
-
I4MAT_ZEROS zeroes an I4MAT.
-
I4MAT_ZEROS_NEW returns a new zeroed I4MAT.
-
I4RMAT_DELETE frees the memory set aside by I4RMAT_NEW.
-
I4RMAT_NEW sets up an I4RMAT of the desired dimensions.
-
I4ROW_COMPARE compares two rows of a integer array.
-
I4ROW_FIND_ITEM searches the rows of an I4ROW for a given value.
-
I4ROW_MAX returns the maximums of an I4ROW.
-
I4ROW_MEAN returns the means of an I4ROW.
-
I4ROW_MIN returns the minimums of an I4ROW.
-
I4ROW_SORT_A ascending sorts the rows of an I4ROW.
-
I4ROW_SORT_D descending sorts the rows of an I4ROW.
-
I4ROW_SORT2_D descending sorts the elements of each row of an I4ROW.
-
I4ROW_SUM returns the sums of the rows of an I4ROW.
-
I4ROW_SWAP swaps two rows of an I4ROW.
-
I4ROW_VARIANCE returns the variances of an I4ROW.
-
I4ROWS_TO_I4MAT converts a row-major vector to an I4MAT.
-
I4VEC_ADD computes C = A + B for I4VEC's.
-
I4VEC_ADD_NEW computes C = A + B for I4VEC's.
-
I4VEC_AMAX returns the largest magnitude in an I4VEC.
-
I4VEC_AMAX_INDEX returns the index of the maximum absolute value in an I4VEC.
-
I4VEC_AMIN returns the smallest magnitude in an I4VEC.
-
I4VEC_AMIN_INDEX returns the index of the minimum absolute value in an I4VEC.
-
I4VEC_AMINZ returns the smallest nonzero magnitude in an I4VEC.
-
I4VEC_AMINZ_INDEX returns the smallest nonzero magnitude in an I4VEC.
-
I4VEC_APPEND appends an entry to an I4VEC.
-
I4VEC_APPEND_NEW appends a value to an I4VEC.
-
I4VEC_ASCEND_SUB computes the longest ascending subsequence of vector.
-
I4VEC_AXPY adds IA times the vector IX to the vector IY.
-
I4VEC_BINARY_NEXT generates the next binary vector.
-
I4VEC_BRACKET searches a sorted I4VEC for successive brackets of a value.
-
I4VEC_CHOOSE computes the generalized binomial coefficient C(M,N,K).
-
I4VEC_COMPARE compares two I4VEC's.
-
I4VEC_CONCATENATE concatenates two I4VEC's.
-
I4VEC_CONCATENATE_NEW concatenates two I4VEC's.
-
I4VEC_COPY copies an I4VEC.
-
I4VEC_COPY_NEW copies an I4VEC.
-
I4VEC_CUM_NEW computes the cumulative sum of the entries of an I4VEC.
-
I4VEC_CUM0_NEW computes the cumulative sum of the entries of an I4VEC.
-
I4VEC_DECREMENT decrements an I4VEC.
-
I4VEC_DIRECT_PRODUCT creates a direct product of I4VEC's.
-
I4VEC_DIRECT_PRODUCT2 creates a direct product of I4VEC's.
-
I4VEC_DISTANCES computes a pairwise distance table.
-
I4VEC_DOT_PRODUCT computes the dot product of two I4VEC's.
-
I4VEC_FIND finds the first occurrence of a value in an I4VEC.
-
I4VEC_FIRST_INDEX indexes the first occurrence of values in an I4VEC.
-
I4VEC_FRAC searches for the K-th smallest entry in an I4VEC.
-
I4VEC_GCD returns the greatest common divisor of an I4VEC.
-
I4VEC_HEAP_A reorders an I4VEC into a ascending heap.
-
I4VEC_HEAP_D reorders an I4VEC into a descending heap.
-
I4VEC_HEAP_D_EXTRACT extracts the maximum value from a descending heap.
-
I4VEC_HEAP_D_INSERT inserts a new value into a descending heap.
-
I4VEC_HEAP_D_MAX returns the maximum value in a descending heap of integers.
-
I4VEC_HISTOGRAM computes a histogram of the elements of an I4VEC.
-
I4VEC_HISTOGRAM_MASKED computes a histogram of the elements of an I4VEC.
-
I4VEC_IDENTITY_ROW_NEW sets an I4VEC to the I-th row of the identity.
-
I4VEC_INCREMENT increments an I4VEC.
-
I4VEC_INDEX returns the location of the first occurrence of a given value.
-
I4VEC_INDEX_DELETE_ALL deletes all occurrences of a value from an indexed sorted list.
-
I4VEC_INDEX_DELETE_DUPES deletes duplicates from an indexed sorted I4VEC.
-
I4VEC_INDEX_DELETE_ONE deletes one copy of an I4 from an indexed sorted I4VEC.
-
I4VEC_INDEX_INSERT inserts an I4 into an indexed sorted I4VEC.
-
I4VEC_INDEX_INSERT_UNIQUE inserts a unique I4 in an indexed sorted I4VEC.
-
I4VEC_INDEX_ORDER sorts an I4VEC using an index vector.
-
I4VEC_INDEX_SEARCH searches for an I4 in an indexed sorted I4VEC.
-
I4VEC_INDEX_SORT_UNIQUE creates a sort index for an I4VEC.
-
I4VEC_INDEXED_HEAP_D creates a descending heap from an indexed I4VEC.
-
I4VEC_INDEXED_HEAP_D_EXTRACT: extract from heap descending indexed I4VEC.
-
I4VEC_INDEXED_HEAP_D_INSERT: insert value into heap descending indexed I4VEC.
-
I4VEC_INDEXED_HEAP_D_MAX: maximum value in heap descending indexed I4VEC.
-
I4VEC_INDICATOR0 sets an I4VEC to the indicator vector (0,1,2,...).
-
I4VEC_INDICATOR0_NEW sets an I4VEC to the indicator vector (0,1,2,...).
-
I4VEC_INDICATOR1 sets an I4VEC to the indicator vector (1,2,3,...).
-
I4VEC_INDICATOR1_NEW sets an I4VEC to the indicator vector (1,2,3,...).
-
I4VEC_INSERT inserts a value into an I4VEC.
-
I4VEC_IS_ASCENDING determines if an I4VEC is (weakly) ascending.
-
I4VEC_IS_BINARY is true if the entries in an I4VEC are all 0 or 1.
-
I4VEC_IS_DESCENDING determines if an I4VEC is (weakly) descending.
-
I4VEC_IS_DISTINCT is true if the entries in an I4VEC are distinct.
-
I4VEC_IS_EQUAL is true if two I4VEC's are equal.
-
I4VEC_IS_EVEN_ALL is TRUE if all entries of an I4VEC are even.
-
I4VEC_IS_EVEN_ANY is TRUE if any entry of an I4VEC is even.
-
I4VEC_IS_LT_ANY: ( any ( A < B ) ) for I4VEC's.
-
I4VEC_IS_NEGATIVE_ANY: ( any A < 0 ) for I4VEC's.
-
I4VEC_IS_NONPOSITIVE_ALL: ( all ( A <= 0 ) ) for I4VEC's.
-
I4VEC_ANY_NONZERO: ( any A nonzero ) for I4VEC's.
-
I4VEC_IS_ODD_ALL is TRUE if all entries of an I4VEC are odd.
-
I4VEC_IS_ODD_ANY is TRUE if any entry of an I4VEC is odd.
-
I4VEC_IS_ONE is true if the entries in an I4VEC are all 1.
-
I4VEC_IS_PAIRWISE_PRIME checks whether an I4VEC is pairwise prime.
-
I4VEC_IS_ZERO is true if the entries in an I4VEC are all zero.
-
I4VEC_LCM returns the least common multiple of an I4VEC.
-
I4VEC_MAX returns the value of the maximum element in an I4VEC.
-
I4VEC_MAX_INDEX returns the index of the maximum value in an I4VEC.
-
I4VEC_MAX_INDEX_LAST: index of the last maximum value in an I4VEC.
-
I4VEC_MAX_LAST moves the maximum I4VEC entry to the last position.
-
I4VEC_MEAN returns the mean of an I4VEC.
-
I4VEC_MEAN_I4 returns the I4 mean of an I4VEC.
-
I4VEC_MEDIAN returns the median of an unsorted I4VEC.
-
I4VEC_MERGE_A merges two ascending sorted I4VEC's.
-
I4VEC_MIN returns the minimum element in an I4VEC.
-
I4VEC_MIN_INDEX returns the index of the minimum value in an I4VEC.
-
I4VEC_MIN_MV determines U(1:N) /\ V for vectors U and a single vector V.
-
I4VEC_NEGONE sets an I4VEC to -1.
-
I4VEC_NEGONE_NEW creates an I4VEC and sets it to -1.
-
I4VEC_NONZERO_COUNT counts the nonzero entries in an I4VEC.
-
I4VEC_NONZERO_FIRST left-shifts all nonzeros in an I4VEC.
-
I4VEC_NORM_L0 returns the l0 "norm" of an I4VEC.
-
I4VEC_ONE_NEW creates an I4VEC whose entries are 1.
-
I4VEC_ORDER_TYPE: is an I4VEC is (non)strictly ascending/descending?
-
I4VEC_PART partitions an int NVAL into N nearly equal parts.
-
I4VEC_PART_QUICK_A reorders an I4VEC as part of a quick sort.
-
I4VEC_PERMUTE permutes an I4VEC in place.
-
I4VEC_PERMUTE_UNIFORM randomly permutes an I4VEC.
-
I4VEC_PRINT prints an I4VEC.
-
I4VEC_PRINT_MASK prints masked elements of an I4VEC.
-
I4VEC_PRINT_PART prints "part" of an I4VEC.
-
I4VEC_PRINT_SOME prints "some" of an I4VEC.
-
I4VEC_PRODUCT multiplies the entries of an I4VEC.
-
I4VEC_RED divides out common factors in an I4VEC.
-
I4VEC_REVERSE reverses the elements of an I4VEC.
-
I4VEC_ROTATE rotates an I4VEC in place.
-
I4VEC_RUN_COUNT counts runs of equal values in an I4VEC.
-
I4VEC_SEARCH_BINARY_A searches an ascending sorted I4VEC for a value.
-
I4VEC_SEARCH_BINARY_D searches a descending sorted I4VEC for a value.
-
I4VEC_SORT_BUBBLE_A ascending sorts an I4VEC using bubble sort.
-
I4VEC_SORT_BUBBLE_D descending sorts an I4VEC using bubble sort.
-
I4VEC_SORT_HEAP_A ascending sorts an I4VEC using heap sort.
-
I4VEC_SORT_HEAP_D descending sorts an I4VEC using heap sort.
-
I4VEC_SORT_HEAP_INDEX_A does an indexed heap ascending sort of an I4VEC.
-
I4VEC_SORT_HEAP_INDEX_D does an indexed heap descending sort of an I4VEC.
-
I4VEC_SORT_INSERT_A uses an ascending insertion sort on an I4VEC.
-
I4VEC_SORT_INSERT_D uses a descending insertion sort on an I4VEC.
-
I4VEC_SORT_QUICK_A ascending sorts an I4VEC using quick sort.
-
I4VEC_SORT_SHELL_A ascending sorts an I4VEC using Shell's sort.
-
I4VEC_SORTED_UNDEX returns unique sorted indexes for a sorted I4VEC.
-
I4VEC_SORTED_UNIQUE finds the unique elements in a sorted I4VEC.
-
I4VEC_SORTED_UNIQUE_COUNT counts unique elements in a sorted I4VEC.
-
I4VEC_SORTED_UNIQUE_HIST histograms the unique elements of a sorted I4VEC.
-
I4VEC_SPLIT "splits" an unsorted I4VEC based on a splitting value.
-
I4VEC_STD returns the standard deviation of an I4VEC.
-
I4VEC_SUM sums the entries of an I4VEC.
-
I4VEC_SUM_VEC does a pairwise sum of two I4VEC's.
-
I4VEC_SWAP swaps two I4VEC's.
-
I4VEC_TRANSPOSE_PRINT prints an I4VEC "transposed".
-
I4VEC_UNDEX returns unique sorted indexes for an I4VEC.
-
I4VEC_UNIFORM_AB returns a scaled pseudorandom I4VEC.
-
I4VEC_UNIFORM_AB_NEW returns a scaled pseudorandom I4VEC.
-
I4VEC_UNIQUE_COUNT counts the unique elements in an unsorted I4VEC.
-
I4VEC_UNIQUE_INDEX indexes the unique occurrence of values in an I4VEC.
-
I4VEC_VALUE_INDEX indexes I4VEC entries equal to a given value.
-
I4VEC_VALUE_NUM counts I4VEC entries equal to a given value.
-
I4VEC_VARIANCE returns the variance of an I4VEC.
-
I4VEC_WIDTH returns the printing width of an I4VEC.
-
I4VEC_ZEROS zeroes an I4VEC.
-
I4VEC_ZEROS_NEW creates and zeroes an I4VEC.
-
I4VEC2_COMPARE compares pairs of integers stored in two vectors.
-
I4VEC2_PRINT prints an I4VEC2.
-
I4VEC2_SORT_A ascending sorts an I4VEC2.
-
I4VEC2_SORT_D descending sorts an I4VEC2.
-
I4VEC2_SORTED_UNIQUE keeps the unique elements in an I4VEC2.
-
I4VEC2_SORTED_UNIQUE_COUNT counts unique elements in an I4VEC2.
-
KSUB_NEXT4 generates the subsets of size K from a set of size N.
-
L4_TO_I4 converts an L4 to an I4.
-
L4_XOR returns the exclusive OR of two L4's.
-
PASCAL_TO_I4 converts Pacal triangle coordinates to a linear index.
-
PERM_CYCLE analyzes a permutation.
-
PERM0_CHECK checks a permutation of (0,...,N-1)
-
PERM0_UNIFORM_NEW selects a random permutation of 0,...,N-1.
-
PERM1_CHECK checks a permutation of (1,...,N).
-
PERM1_UNIFORM_NEW selects a random permutation of 1,...,N.
-
PRIME returns any of the first PRIME_MAX prime numbers.
-
R8_GAMMA_LOG evaluates the logarithm of the gamma function.
-
R8_NINT returns the nearest integer to an R8.
-
R8_UNIFORM_01 returns a pseudorandom R8 scaled to [0,1].
-
R8_UNIFORM_AB returns a pseudorandom R8 scaled to [A,B].
-
R8VEC_PRINT prints an R8VEC.
-
SORT_HEAP_EXTERNAL externally sorts a list of items into ascending order.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TRIANGLE_LOWER_TO_I4 converts a lower triangular coordinate to an integer.
-
TRIANGLE_UPPER_TO_I4 converts an upper triangular coordinate to an integer.
You can go up one level to
the C source codes.
Last revised on 10 September 2018.