BINS
Order, Sort and Search Data using Bins
BINS
is a FORTRAN90 library which
sorts data into order, or lumps
it into bins, or selects an item of particular rank, or finds
the unique elements in a list.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
BINS is available in
a C++ version and
a FORTRAN90 version.
Related Data and Programs:
SUBPAK,
a FORTRAN90 library which
contains many routines for sorting and searching data.
Reference:
-
Jon Bentley, Bruce Weide, Andrew Yao,
Optimal Expected Time Algorithms for Closest Point Problems,
ACM Transactions on Mathematical Software,
Volume 6, Number 4, December 1980, pages 563-580.
-
Thomas Cormen, Charles Leiserson, Ronald Rivest,
Introduction to Algorithms,
MIT Press, 2001,
ISBN: 0262032937,
LC: QA76.C662.
-
Barry Joe,
GEOMPACK - a software package for the generation of meshes
using geometric algorithms,
Advances in Engineering Software,
Volume 13, pages 325-331, 1991.
-
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:
-
BIN_SEARCH_ONE_2D searches one cell in a 2D array of bins.
-
BIN_TO_R8_EVEN returns the limits for a given "bin" in [A,B].
-
BIN_TO_R8_EVEN2 returns the limits for a given "bin" in [A,B].
-
BIN_TO_R82_EVEN returns the limits for a given R82 "bin" in [A,B].
-
BIN_TO_R82_EVEN2 returns the limits for a given R82 "bin" in [A,B].
-
BIN_TO_R82_EVEN3 returns the limits for a given R82 "bin" in [A,B].
-
BIN_TO_R83_EVEN2 returns the limits for a given R83 "bin" in [A,B].
-
BIN_TO_R83_EVEN3 returns the limits for a given R83 "bin" in [A,B].
-
BIN_TO_R8VEC_EVEN3 returns the limits for a given R8VEC "bin" in [A,B].
-
DIAEDG chooses a diagonal edge.
-
DTRIS2 constructs a Delaunay triangulation of 2D vertices.
-
GET_SEED returns a seed for the random number generator.
-
I4_MODP returns the nonnegative remainder of integer division.
-
I4_SWAP switches two integer values.
-
I4_WRAP forces an integer to lie between given limits by wrapping.
-
I4MAT_PRINT prints an integer matrix.
-
I4MAT_PRINT_SOME prints some of an integer matrix.
-
I4MAT_TRANSPOSE_PRINT prints an IMAT, transposed.
-
I4MAT_TRANSPOSE_PRINT_SOME prints some of the transpose of an integer matrix.
-
I4VEC_HEAP_D reorders an I4VEC into a descending heap.
-
I4VEC_INDICATOR sets an I4VEC to the indicator vector.
-
I4VEC_PRINT prints an I4VEC.
-
I4VEC_SORT_HEAP_A ascending sorts an I4VEC using heap sort.
-
I4VEC_SORTED_UNIQUE finds the number of unique elements in a sorted I4VEC.
-
I4VEC2_COMPARE compares pairs of integers stored in two vectors.
-
I4VEC2_SORT_A ascending sorts a vector of pairs of integers.
-
I4VEC2_SORTED_UNIQUE keeps the unique elements in a array of pairs of integers.
-
INDEX_BOX2_NEXT_2D produces indices on the surface of a box in 2D.
-
INDEX_BOX2_NEXT_3D produces indices on the surface of a box in 3D.
-
LRLINE determines where a point lies in relation to a directed line.
-
PERM_INV inverts a permutation "in place".
-
POINTS_NEAREST_POINT_BINS_2D finds the nearest point to a given point in 2D.
-
POINTS_NEAREST_POINT_BINS_2D_2 finds the nearest point to a given point in 2D.
-
POINTS_NEAREST_POINT_BINS_2D_3 finds the nearest point to a given point in 2D.
-
POINTS_NEAREST_POINT_DEL_2D: nearest neighbor in a Delaunay triangulation.
-
POINTS_NEAREST_POINT_NAIVE_2D finds the nearest point to a given point in 2D.
-
POINTS_NEAREST_POINT_NAIVE_3D finds the nearest point to a given point in 3D.
-
POINTS_NEAREST_POINTS_BINS_2D finds the nearest point to given points in 2D.
-
POINTS_NEAREST_POINTS_BINS_2D_2 finds the nearest point to given points in 2D.
-
POINTS_NEAREST_POINTS_BINS_2D_3 finds the nearest point to given points in 2D.
-
POINTS_NEAREST_POINTS_BINS_2D_4 finds the nearest point to given points in 2D.
-
POINTS_NEAREST_POINTS_BINS_3D_2 finds the nearest point to given points in 3D.
-
POINTS_NEAREST_POINTS_BINS_3D_3 finds the nearest point to given points in 3D.
-
POINTS_NEAREST_POINTS_NAIVE_2D finds the nearest point to given points in 2D.
-
POINTS_NEAREST_POINTS_NAIVE_3D finds the nearest point to given points in 3D.
-
POINTS_NEAREST_POINT_NAIVE_ND finds the nearest point to a given point in ND.
-
R8_TO_BIN_EVEN determines the appropriate "bin" for C in [A,B].
-
R8_TO_BIN_EVEN2 determines the appropriate "bin" for C in [A,B].
-
R8_TO_BIN_UNEVEN places X in one of several unevenly spaced bins.
-
R8_UNIFORM returns a scaled pseudorandom R8.
-
R8_UNIFORM_01 returns a unit pseudorandom R8.
-
R82_TO_BIN_EVEN determines the appropriate "bin" for an R82 value.
-
R82_TO_BIN_EVEN2 determines the appropriate "bin" for an R82 value.
-
R82_TO_BIN_EVEN3 determines the appropriate "bin" for an R82 value.
-
R82_UNIFORM returns a random R82 value in a given range.
-
R82VEC_BIN_EVEN bins an R82VEC into evenly spaced bins.
-
R82VEC_BIN_EVEN2 bins an R82VEC into evenly spaced bins.
-
R82VEC_BIN_EVEN3 bins an R82VEC into evenly spaced bins.
-
R82VEC_BINNED_REORDER reorders a binned R82 data vector.
-
R82VEC_BINNED_REORDER2 reorders a binned R82VEC.
-
R82VEC_BINNED_SORT_A sorts each bin of a binned R82VEC.
-
R82VEC_BINNED_SORT_A2 sorts each bin of a binned R82VEC.
-
R82VEC_PART_QUICK_A reorders an R82VEC as part of a quick sort.
-
R82VEC_PERMUTE permutes an R82VEC in place.
-
R82VEC_PRINT prints an R82VEC.
-
R82VEC_SORT_HEAP_INDEX_A does an indexed heap ascending sort of an R82VEC.
-
R82VEC_SORT_QUICK_A ascending sorts an R82VEC using quick sort.
-
R82VEC_UNIFORM returns a random R82VEC in a given range.
-
R83_TO_BIN_EVEN2 determines the appropriate "bin" for an R83 value.
-
R83_TO_BIN_EVEN3 determines the appropriate "bin" for an R83 value.
-
R83VEC_BIN_EVEN2 bins an R83VEC into evenly spaced bins.
-
R83VEC_BIN_EVEN3 bins an R83 array into evenly spaced bins.
-
R83VEC_BINNED_REORDER reorders a binned R83 data vector.
-
R83VEC_BINNED_REORDER2 reorders a binned R83 data vector.
-
R83VEC_BINNED_SORT_A sorts each bin of a binned R83VEC.
-
R83VEC_BINNED_SORT_A2 sorts each bin of an R83 binned data vector.
-
R83VEC_PART_QUICK_A reorders an R83VEC as part of a quick sort.
-
R83VEC_PRINT prints an R83VEC.
-
R83VEC_SORT_QUICK_A ascending sorts an R83VEC using quick sort.
-
R83VEC_UNIFORM returns a random R83VEC in a given range.
-
R8MAT_PRINT prints an R8MAT.
-
R8MAT_PRINT_SOME prints some of an R8MAT.
-
R8MAT_TRANSPOSE_PRINT prints an R8MAT, transposed.
-
R8MAT_TRANSPOSE_PRINT_SOME prints some of an R8MAT, transposed.
-
R8VEC_BIN bins an R8VEC, returning the population of each bin.
-
R8VEC_BIN_EVEN bins an R8VEC into evenly spaced bins.
-
R8VEC_BINNED_REORDER reorders a binned R8VEC.
-
R8VEC_BINNED_SORT_A ascending sorts a binned reordered R8VEC.
-
R8VEC_BRACKET searches a sorted array for successive brackets of a value.
-
R8VEC_EQ is true if every pair of entries in two vectors is equal.
-
R8VEC_GT == ( A1 > A2 ) for real vectors.
-
R8VEC_LT == ( A1 < A2 ) for real vectors.
-
R8VEC_PART_QUICK_A reorders an R8VEC as part of a quick sort.
-
R8VEC_PRINT prints an R8VEC.
-
R8VEC_SORT_QUICK_A ascending sorts an R8VEC using quick sort.
-
R8VEC_SWAP swaps the entries of two real vectors.
-
R8VEC_TO_BIN_EVEN3 determines the appropriate "bin" for an R8VEC.
-
R8VEC_UNIFORM returns a random R8VEC in a given range.
-
SORT_HEAP_EXTERNAL externally sorts a list of items into ascending order.
-
SWAPEC swaps diagonal edges until all triangles are Delaunay.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TRIANGLE_AREA_2D computes the area of a triangle in 2D.
-
TRIANGLE_SAMPLE_2D returns a random point in a triangle.
-
TRIANGULATION_NABE_NODES determines the neighbors of triangulation nodes.
-
TRIANGULATION_PRINT prints out information defining a Delaunay triangulation.
-
TRIANGULATION_SAMPLE_2D returns random points in a triangulation.
-
TUPLE_NEXT2 computes the next element of an integer tuple space.
-
VBEDG determines which boundary edges are visible to a point.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 26 July 2008.