Python Source


  1. allen_cahn_pde, a Python code which sets up and solves the Allen-Cahn reaction-diffusion partial differential equations (PDE) in one space dimension and time.
  2. alpert_rule, a Python code which sets up an Alpert quadrature rule to approximate the integrals of functions which are regular, log(x) singular, or 1/sqrt(x) singular.
  3. analemma, a Python code which evaluates the equation of time, a formula for the difference between the uniform 24 hour day and the actual position of the sun, based on a C program by Brian Tung.
  4. animation_test, a Python code which computes a sequence of solutions to a partial differential equation, using matplotlib(), displaying each solution to the screen WITHOUT requiring the user to hit RETURN to see the next image.
  5. annulus_monte_carlo, a Python code which uses the Monte Carlo method to estimate the integral of a function over the interior of a circular annulus in 2D.
  6. annulus_rule, a Python code which computes a quadrature rule for estimating integrals of a function over the interior of a circular annulus in 2D.
  7. arenstorf_ode, a Python code which sets up and solves an ordinary differential equation (ODE) which defines a stable periodic orbit of a spacecraft around the Earth and the Moon.
  8. args, a Python code which reports the command line arguments with which it was invoked;
  9. atbash, a Python code which applies the Atbash substitution cipher to a string of text.
  10. axon_ode, a Python code which sets up and solves the ordinary differential equations (ODE) for the Hodgkin-Huxley model of an axon.
  11. backtrack_binary_rc, a Python code which carries out a backtrack search for a set of binary decisions, using reverse communication (RC).
  12. backward_euler, a Python code which solves one or more ordinary differential equations (ODE) using the (implicit) backward Euler method, using fsolve() for the implicit equation.
  13. backward_euler_fixed, a Python code which solves one or more ordinary differential equations (ODE) using the (implicit) backward Euler method, using fixed point iteration for the implicit equation.
  14. ball_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected from the interior of the unit ball in 3D.
  15. ball_grid, a Python code which computes grid points inside a 3D ball.
  16. ball_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit ball in 3D.
  17. ball_monte_carlo, a Python code which applies a Monte Carlo method to estimate integrals of a function over the interior of the unit ball in 3D;
  18. bank, a Python code which computes the check digit associated with a US Bank Routing Number check digit, or reports whether a 9-digit code is actually valid.
  19. barycentric_interp_1d, a Python code which defines and evaluates the barycentric Lagrange polynomial p(x) which interpolates a set of data, so that p(x(i)) = y(i). The barycentric approach means that very high degree polynomials can safely be used.
  20. bellman_ford, a Python code which implements the Bellman-Ford algorithm for finding the shortest distance from a given node to all other nodes in a directed graph whose edges have been assigned real-valued lengths.
  21. bernstein_polynomial, a Python code which evaluates the Bernstein polynomials;
  22. besselj, a Python code which evaluates Bessel J functions of noninteger order;
  23. bicycle_lock, a Python code which simulates the process of determining the secret combination of a bicycle lock, an integer between 000 and 999.
  24. biochemical_linear_ode, a Python code which sets up and solves a linear biochemical ordinary differential equation (ODE).
  25. biochemical_nonlinear_ode, a Python code which sets up and solves a nonlinear biochemical ordinary differential equation (ODE).
  26. bisect, a Python code which seeks a solution to the equation F(X)=0 using bisection within a user-supplied change of sign interval [A,B]. The procedure is written using classes.
  27. bisection_rc, a Python code which seeks a solution to the nonlinear equation F(X)=0 using bisection within a user-supplied change of sign interval [A,B]. The procedure is written using reverse communication (RC).
  28. black_scholes, a Python code which implements some simple approaches to the Black-Scholes option valuation theory, by Desmond Higham.
  29. blowup_ode, a Python code which sets up and solves an ordinary differential equation (ODE) y'=y^2. whose solution "blows up" in finite time.
  30. boundary_word_square, a Python code which describes the outline of an object on a grid of squares, using a string of symbols that represent the sequence of steps tracing out the boundary.
  31. brownian_motion_simulation, a Python code which simulates Brownian motion in an M dimensional region.
  32. brusselator_ode, a Python code which sets up and solves the Brusselator ordinary differential equation (ODE) system.
  33. burgers_solution, a Python code which evaluates exact solutions of the time-dependent 1D viscous Burgers equation.
  34. bvec, a Python code which demonstrates how signed integers can be stored as binary vectors, and arithmetic can be performed on them.
  35. c8lib, a Python code which implements certain elementary functions for double precision complex (C8) variables;
  36. caesar, a Python code which applies a Caesar Shift Cipher to a string of text.
  37. calpak, a Python code which makes various calendar calculations;
  38. cauchy_principal_value, a Python code which uses Gauss-Legendre quadrature to estimate the Cauchy Principal Value (CPV) of certain singular integrals.
  39. cfd_barba, a Python code which contains some of the iPython workbooks associated with the "12 Steps to Navier-Stokes" presentation by Lorena Barba.
  40. cg, a Python code which implements a simple version of the conjugate gradient (CG) method for solving a system of linear equations of the form A*x=b, suitable for situations in which the matrix A is positive definite, having only real, positive eigenvalues, and symmetric.
  41. cg_rc, a Python code which implements the conjugate gradient (CG) method for solving a positive definite sparse linear system A*x=b, using reverse communication (RC).
  42. change_making, a Python code which considers the change making problem, in which a given sum is to be formed using coins of various denominations.
  43. chebyshev_interp_1d, a Python code which determines the combination of Chebyshev polynomials which interpolates a set of data, so that p(x(i)) = y(i).
  44. chebyshev_polynomial, a Python code which considers the Chebyshev polynomials T(i,x), U(i,x), V(i,x) and W(i,x). Functions are provided to evaluate the polynomials, determine their zeros, produce their polynomial coefficients, produce related quadrature rules, project other functions onto these polynomial bases, and integrate double and triple products of the polynomials.
  45. chinese_remainder_theorem, a Python code which demonstrates the Chinese remainder theorem, for reconstructing a number based on its remainders against a set of bases.
  46. chrpak, a Python code which manipulates characters and strings;
  47. chuckaluck_simulation, a Python code which simulates the Chuck-a-Luck gambling game.
  48. circle_arc_grid, a Python code which computes grid points along a circular arc.
  49. circle_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected on the circumference of the unit circle.
  50. circle_integrals, a Python code which returns the exact value of the integral of any monomial over the circumference of the unit circle in 2D.
  51. circle_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function along the circumference of the unit circle in 2D;
  52. clausen, a Python code which evaluates a Chebyshev interpolant to the Clausen function Cl2(x).
  53. cobweb_plot, a Python library which displays a cobweb plot illustrating the process of function iteration, by John D Cook.
  54. collatz_recursive, a Python code which demonstrates recursive programming by considering the simple Collatz 3n+1 problem.
  55. combination_lock, a Python code which simulates the process of determining the secret combination of a lock.
  56. combo, a Python code which includes routines for ranking, unranking, enumerating and randomly selecting balanced sequences, cycles, graphs, Gray codes, subsets, partitions, permutations, restricted growth functions, Pruefer codes and trees.
  57. compass_search, a Python code which seeks the minimizer of a scalar function of several variables using compass search, a direct search algorithm that does not use derivatives.
  58. complex_numbers_test, demonstrates some of the features of using complex numbers.
  59. condition, a Python code which implements methods of computing or estimating the condition number of a matrix.
  60. conservation_ode, a Python code which monitors the conservation of a quantity that should be constant, during the solution of an ordinary differential equation (ODE).
  61. continued_fraction a Python code which implements some simple algorithms for dealing with simple and generalized continued fractions.
  62. cordic, a Python code which computes a few special functions using the CORDIC algorithm.
  63. cosine_transform, a Python code which demonstrates some simple properties of the discrete cosine transform (DCT).
  64. counterfeit_detection, a Python code which considers problems in which one or more counterfeit coins are to be identified by the fact that they do not have the standard weight.
  65. csv_test, a Python code which tests the csv() library for reading and writing Comma Separated Value (CSV) data files.
  66. cube_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected in the interior of the unit cube in 3D.
  67. cube_grid, a Python code which computes a grid of points over the interior of a cube in 3D.
  68. cube_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit cube in 3D.
  69. cube_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function over the interior of the unit cube in 3D.
  70. cuda_loop, a Python code which shows how, in a CUDA program, the choice of block and thread factors determines the allocation of tasks to processors.
  71. cvt_1d_lloyd, a Python code which computes an N-point Centroidal Voronoi Tessellation (CVT) within the interval [0,1], under a uniform density, using the Lloyd iteration to compute the Voronoi regions exactly.
  72. cvt_2d_sampling, a Python code which computes an N-point Centroidal Voronoi Tessellation (CVT) within the unit square [0,1]x[0,1], under a uniform density, using sampling to estimate the Voronoi regions.
  73. cvxopt_svm, a Python code which solves a support vector machine (SVM) problem by formulating it as a quadratic programming problem to be solved by cvxopt().
  74. cvxopt_test, a Python code which calls cvxopt(), which solves problems in convex optimization and quadratic programming.
  75. cycle_brent, a Python code which carries out an iterated function evaluation, and seeks to determine the nearest element of a cycle, and the cycle length, using the Brent method.
  76. cycle_floyd, a Python code which carries out an iterated function evaluation, and seeks to determine the nearest element of a cycle, and the cycle length, using the Floyd method.
  77. delaunay_test, a Python code which demonstrates the use of the scipy.spatial function Delaunay(), to compute a Voronoi diagram, and matplotlib.pyplot.triplot(), to display it.
  78. dg1d_poisson, a Python code which applies the discontinuous Galerkin method (DG) to a 1D version of the Poisson equation, based on a code by Beatrice Riviere.
  79. dijkstra, a Python code which implements a simple version of the Dijkstra minimum distance algorithm for graphs.
  80. diophantine_nd, a Python code which is given a Diophantine equation in N variables, and returns all nonnegative solutions, or all strictly positive solutions.
  81. disk_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected inside the unit disk.
  82. disk_grid, a Python code which computes grid points within the interior of a disk of user specified radius and center in 2D, using matplotlib() to create an image of the grid.
  83. disk_monte_carlo, a Python code which applies a Monte Carlo (MC) method to estimate integrals of a function over the interior of the general disk in 2D;
  84. disk_rule, a Python code which computes a quadrature rule over the interior of the general disk in 2D.
  85. disk01_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit disk in 2D.
  86. disk01_monte_carlo, a Python code which applies a Monte Carlo method to estimate integrals of a function over the interior of the unit disk in 2D;
  87. disk01_quarter_monte_carlo, a Python code which applies a Monte Carlo method to estimate integrals of a function over the interior of the unit quarter disk in 2D;
  88. disk01_rule, a Python code which computes a quadrature rule to approximate the integral of a function over the interior of the unit disk in 2D, with radius 1 and center (0,0).
  89. dolfin-convert, a Python code which converts mesh file from gmsh(), medit(), METIS or SCOTCH format to an XML format suitable for use by dolfin() or fenics(), by Anders Logg.
  90. doomsday, a Python code which is given the year, month and day of a date, and uses John Conway's doomsday algorithm to determine the corresponding day of the week.
  91. dosage_ode, a Python code which sets up and solves a system of ordinary differential equations (ODE) to simulate the blood levels of a medicinal drug that should stay between medicinal and toxic limits.
  92. double_well_ode, a Python code which sets up and solves an ordinary differential equation (ODE) which models the motion of a particle in a double well potential.
  93. duel_simulation, a Python code which simulates N repetitions of a duel between two players, each of whom has a known firing accuracy.
  94. duffing_ode, a Python code which sets up and solves a second-order ordinary differential equation (ODE) whose solution can exhibit chaotic behavior.
  95. e_spigot, a Python code which produces N digits of the decimal expansion of e.
  96. ellipse_grid, a Python code which computes grid points over the interior of an ellipse in 2D.
  97. ellipse_monte_carlo, a Python code which uses the Monte Carlo method to estimate the value of integrals over the interior of an ellipse in 2D.
  98. ellipsoid_grid, a Python code which computes a grid of points over the interior of an ellipsoid in 3D.
  99. ellipsoid_monte_carlo, a Python code which uses the Monte Carlo method to estimate the value of integrals over the interior of an ellipsoid in M dimensions.
  100. elliptic_integral, a Python code which evaluates complete elliptic integrals of first, second and third kind, using the Carlson elliptic integral functions.
  101. euler, a Python code which solves one or more ordinary differential equations (ODE) using the forward Euler method.
  102. exactness, a Python code which investigates the exactness of quadrature rules that estimate the integral of a function with a density, such as 1, exp(-x) or exp(-x^2), over an interval such as [-1,+1], [0,+oo) or (-oo,+oo).
  103. exp_ode, a Python code which sets up and solves an ordinary differential equation (ODE) whose solution is an exponential function.
  104. fastgl, a Python code which carries out the rapid computation of the Kth value and weight of an N point Gauss-Legendre quadrature rule for approximating the integral of a function over the interval [-1,+1], by Ignace Bogaert.
  105. fd_predator_prey, a Python code which solves a time-dependent predator prey system using the finite difference method (FDM).
  106. fd1d_advection_lax_wendroff, a Python code which applies the finite difference method (FDM) to solve the time-dependent advection equation ut = - c * ux in one spatial dimension, with a constant velocity, using the Lax-Wendroff method to approximate the time derivative, creating a graphics file with matplotlib().
  107. fd1d_bvp, a Python code which applies the finite difference method (FDM) to a two point boundary value problem (BVP) in one spatial dimension.
  108. fd1d_heat_explicit, a Python code which implements a finite difference method (FDM), explicit in time, to solve the time dependent 1D heat equation;
  109. fd1d_heat_implicit, a Python code which implements a finite difference method (FDM), implicit in time, to solve the time dependent 1D heat equation;
  110. fd2d_heat_steady, a Python code which implements a finite difference method (FDM) for the steady time-independent 2D heat equation;
  111. fem_basis, a Python code which defines and evaluates finite element method (FEM) basis functions for any degree in an M dimensional simplex (1D interval, 2D triangle, 3D tetrahedron, and higher dimensional generalizations.)
  112. fem_to_xml, a Python code which reads a pair of FEM files defining node coordinates and elements, of a 1D, 2D or 3D mesh, namely a file of node coordinates and a file of elements defined by node indices, and creates a corresponding XML file for input to dolfin() or fenics().
  113. fem1d, a Python code which applies the finite element method (FEM) to a boundary value problem (BVP) in one spatial dimension, using a procedural approach.
  114. fem1d_bvp_linear, a Python code which applies the finite element method (FEM), with piecewise linear elements, to a two point boundary value problem (BVP) in one spatial dimension, and compares the computed and exact solutions with the L2 and seminorm errors.
  115. fem1d_bvp_quadratic, a Python code which applies the finite element method (FEM), with piecewise quadratic elements, to a two point boundary value problem (BVP) in one spatial dimension, and compares the computed and exact solutions with the L2 and seminorm errors.
  116. fem1d_heat_explicit, a Python code which uses the finite element method (FEM) and explicit time stepping to solve the time dependent heat equation in 1D.
  117. fem1d_model, a Python code which applies the finite element method (FEM) to a boundary value problem (BVP) in one spatial dimension, using a procedural approach.
  118. fem2d_bvp_linear, a Python code which applies the finite element method (FEM), with piecewise bilinear elements, to a 2D boundary value problem (BVP) in a rectangle.
  119. file_name_sequence, a Python code which generates a sequence of filenames, which can be useful when generating a sequence of still snapshots to be animated later.
  120. filum, a Python code which performs various operations on files;
  121. fire_simulation, a Python code which simulates a forest fire over a rectangular array of trees, starting at a single random location. It is intended as a starting point for the development of a parallel version.
  122. fitzhugh_nagumo_ode, a Python code which sets up and solves the Fitzhugh-Nagumo system of ordinary differential equations (ODE).
  123. flame_ode, a Python code which sets up and solves an ordinary differential equation (ODE) which models the growth of a ball of flame in a combustion process.
  124. florida_cvt_geo, Python codes which explore the creation of a centroidal Voronoi Tessellation (CVT) of the state of Florida, based solely on geometric considerations.
  125. florida_cvt_pop, Python codes which explore the creation of a centroidal Voronoi Tessellation (CVT) of the state of Florida, based on population considerations.
  126. fn, a Python code which evaluates elementary and special functions using Chebyshev polynomials; functions include Airy, Bessel I, J, K and Y, beta, confluent hypergeometric, error, gamma, log gamma, Pochhammer, Spence; integrals include hyperbolic cosine, cosine, Dawson, exponential, logarithmic, hyperbolic sine, sine; by Wayne Fullerton.
  127. four_fifths, a Python code which searches for a solution to the problem of finding four fifth powers that sum to a fifth power, that is, integers a, b, c, d and e such that a^5+b^5+c^5+d^5=e^5. Euler conjectured that no solution was possible. The code is by Brian Hayes.
  128. freefem_msh_io, a Python code which reads and writes files used by the FreeFem++ finite element program to store mesh information.
  129. fsolve_test, a Python code which calls fsolve() which seeks the solution x of one or more nonlinear equations f(x)=0.
  130. gegenbauer_cc, a Python code which computes the Gegenbauer weighted integral of a function f(x) using a Clenshaw-Curtis approach.
  131. gegenbauer_polynomial, a Python code which evaluates the Gegenbauer polynomial and associated functions.
  132. geometry, a Python code which performs geometric calculations in 2, 3 and M dimensional space, including the computation of angles, areas, containment, distances, intersections, lengths, and volumes.
  133. glomin, a Python code which finds a global minimum of a scalar function of a scalar argument, without the use of derivative information, by Richard Brent.
  134. gmgsolve, a Python code which applies one step of the V-cycle of the geometric multigrid method, by Mike Sussman.
  135. graphics_test, Python codes which illustrate how various kinds of data can be displayed and analyzed graphically, using matplotlib().
  136. graphviz_test, a Python code which calls graphiviz(), which displays representations of graphs.
  137. grazing_ode, a Python code which sets up and solves ordinary differential equations (ODE) that model the populations of an edible plant, and the herbivore that grazes on it.
  138. haar, a Python code which computes the Haar transform of data.
  139. halton, a Python code which computes elements of a Halton Quasi Monte Carlo (QMC) sequence, using a simple interface.
  140. hammersley, a Python code which computes elements of a Hammersley Quasi Monte Carlo (QMC) sequence, using a simple interface.
  141. hankel_cholesky, a Python code which computes the upper Cholesky factor R of a nonnegative definite symmetric H matrix so that H = R' * R.
  142. hankel_cholesky, a Python code which computes the upper Cholesky factor R of a nonnegative definite symmetric Hankel matrix so that H = R' * R.
  143. hankel_spd, a Python code which computes a lower triangular matrix L which is the Cholesky factor of a symmetric positive definite (SPD) Hankel matrix H, that is, H = L * L'.
  144. hdf5_test, a Python code which demonstrates the use of the HDF5 library and file format.
  145. hello, a Python code which prints "Hello, world!".
  146. hello_mpi, a Python code which prints out "Hello, world!", carried out in parallel using MPI and MPI4PY.
  147. henon_heiles_ode, a Python code which sets up and solves the Henon-Heiles system of ordinary differential equations (ODE) which model the motion of a star around the galactic center.
  148. hilbert_curve, a Python code which computes the sequence of discrete Hilbert curves whose limit is a space-filling curve.
  149. humps_ode, a Python code which sets up and solves an ordinary differential equation (ODE) whose solution is a double hump curve.
  150. hyperball_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected from the interior of the unit hyperball in M dimensions.
  151. hyperball_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit hyperball in M dimensions.
  152. hyperball_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function over the interior of the unit ball in M dimensions;
  153. hypercube_grid, a Python code which computes a grid of points over the interior of a hypercube in M dimensions.
  154. hypercube_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit hypercube in M dimensions.
  155. hypercube_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function over the interior of the unit hypercube in M dimensions.
  156. hypersphere_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected from the surface of the unit hypersphere in M dimensions.
  157. hypersphere_integrals, a Python code which returns the exact value of the integral of any monomial over the surface of the unit hypersphere in M dimensions.
  158. hypersphere_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function on the surface of the unit sphere in M dimensions;
  159. i4lib, a Python code which contains many utility routines, using single precision integer (I4) arithmetic.
  160. isbn, a Python code which determines the check digit for an International Standard Book Number (ISBN), or reports whether a given ISBN is valid.
  161. jacobi, a Python code which implements the Jacobi iteration for the iterative solution of linear systems.
  162. jacobi_eigenvalue, a Python code which implements the Jacobi iteration for the iterative determination of the eigenvalues and eigenvectors of a real symmetric matrix.
  163. kepler_ode, a Python code which sets up and solves the ordinary differential equations (ODE) for a Kepler two-body gravitational system.
  164. knapsack_01, a Python code which uses brute force to solve small versions of the 0/1 knapsack problem;
  165. kronrod, a Python code which computes a Gauss and Gauss-Kronrod pair of quadrature rules of arbitrary order for the approximation of the integral of a function over the interval [-1,+1], by Robert Piessens, Maria Branders.
  166. lagrange_interp_1d, a Python code which defines and evaluates the Lagrange polynomial p(x) which interpolates a set of data depending on a 1D argument, so that p(x(i)) = y(i).
  167. latin_random, a Python code which computes Latin Random Squares of N points in M dimensions;
  168. leapfrog, a Python code which uses the leapfrog method to solve a second order ordinary differential equation (ODE) of the form y''=f(t,y).
  169. lebesgue, a Python code which is given a set of nodes in 1D, and plots the Lebesgue function, and estimates the Lebesgue constant, which measures the maximum magnitude of the potential error of Lagrange polynomial interpolation.
  170. legendre_polynomial, a Python code which evaluates the Legendre polynomial and associated functions.
  171. legendre_product_polynomial, a Python code which defines Legendre product polynomials, creating a multivariate polynomial as the product of univariate Legendre polynomials.
  172. legendre_shifted_polynomial, a Python code which evaluates the shifted Legendre polynomial, with the domain [0,1].
  173. levenshtein, a Python code which returns the Levenshtein distance between two strings.
  174. line_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected in the unit line segment.
  175. line_grid, a Python code which computes a grid of points over the interior of a line segment in 1D.
  176. line_integrals, a Python code which returns the exact value of the integral of any monomial over the length of the unit line in 1D.
  177. line_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function over the length of the unit line in 1D.
  178. line_ncc_rule, a Python code which computes a Newton Cotes Closed (NCC) quadrature rule, using equally spaced points, over the interior of a line segment in 1D.
  179. linplus_c8, a Python code which carries out some linear algebra operations on complex matrices.
  180. llsq, a Python code which solves the simple linear least squares (LLS) problem of finding the formula of a straight line y=a*x+b which minimizes the root mean square error to a set of N data points.
  181. loadtxt_test, a Python program which calls the numpy() function loadtxt() to extract numeric data from a text file.
  182. local_min, a MATLAB code which finds a local minimum of a scalar function of a scalar variable, without the use of derivative information, by Richard Brent.
  183. local_min_rc, a Python code which finds a local minimum of a scalar function of a scalar variable, without the use of derivative information, using reverse communication (RC), by Richard Brent.
  184. log_normal, a Python code which returns quantities related to the log normal Probability Distribution Function (PDF).
  185. log_normal_truncated_ab, a Python code which returns quantities related to the log normal Probability Distribution Function (PDF) truncated to the interval [A,B].
  186. logistic_bifurcation, a Python code which computes the bifurcation diagram for the logistic equation, by John Cook.
  187. lorenz_ode, a Python code which sets up and solves the Lorenz system of ordinary differential equations (ODE), creating graphics files using matplotlib().
  188. lorenz_ode_sensitivity_test, a Python code which demonstrates sensitivity to initial conditions in the Lorenz system of ordinary differential equations (ODE), using an approach suggested by John D Cook.
  189. luhn, a Python code which computes the Luhn check digit for a string, or verifies a string, as used for error detection in credit card numbers.
  190. machar, a Python code which dynamically computes the values of various machine characteristic constants, by William Cody;
  191. machine, a Python code which returns tabulated values of the constants associated with computer arithmetic;
  192. mandelbrot, a Python code which generates a Portable Network Graphics (PNG) image of the Mandelbrot set;
  193. mario, a Python code which creates a sort of needlepoint image of Mario, as an array of colored squares.
  194. markov_text, a Python code which uses a Markov chain process to sample an existing text file and create a new text that is randomized, but retains some of the structure of the original one.
  195. matrix_exponential, a Python code which demonstrates some simple approaches to the problem of computing the exponential of a matrix.
  196. md, a Python code which carries out a molecular dynamics (MD) simulation, intended as a starting point for implementing a parallel version.
  197. midpoint, a Python code which solves one or more ordinary differential equations (ODE) using the implicit midpoint method.
  198. midpoint_explicit, a Python code which solves one or more ordinary differential equations (ODE) using the explicit midpoint method, also called the modified Euler method.
  199. midpoint_fixed, a Python code which solves one or more ordinary differential equations (ODE) using the implicit midpoint method, using a simple fixed-point iteration to solve the implicit equation.
  200. monomial, a Python code which enumerates, lists, ranks, unranks and randomizes multivariate monomials in a space of M dimensions, with total degree less than N, equal to N, or in a given range.
  201. monomial_value, a Python code which evaluates a monomial in M dimensions.
  202. movie_test, a Python code which creates a movie file from a sequence of solutions to a partial differential equation, using matplotlib().
  203. naca, a Python code which takes the parameters of certain NACA airfoils and returns the coordinates of a sequence of points that outline the wing shape.
  204. navier_stokes_2d_exact, a Python code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 2D.
  205. navier_stokes_3d_exact, a Python code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 3D.
  206. nearest_interp_1d, a Python code which interpolates a set of data using a piecewise constant interpolant defined by the nearest neighbor criterion, creating graphics files for processing by matplotlib().
  207. newton, a Python code which applies the Newton method to solve a single nonlinear equation f(x)=0.
  208. newton_interp_1d, a Python code which finds a polynomial interpolant to data using Newton divided differences.
  209. ngrams, a Python code which analyzes a string or text against the observed frequency of ngrams, that is, particular sequences of n letters, in English text.
  210. normal, a Python code which implements a random number generator (RNG) for normally distributed values;
  211. normal_ode, a Python code which sets up and solves an ordinary differential equation (ODE) defining the normal probability density function (PDF).
  212. normal01_multivariate_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected from an isotropic standard normal distribution in M dimensions.
  213. ode_euler, a Python code which applies the Euler method to estimate the solution of an ordinary differential equation y'=f(x,y), over the interval [a,b], with initial condition y(a)=ya, using n steps.
  214. oregonator_ode, a Python code which sets up and solves the ordinary differential equations (ODE) for the Oregonator, a model of the Belousov-Zhabotinsky chemical reaction.
  215. oscillator_ode, a Python code which sets up and solves the highly oscillatory ordinary differential equation (ODE).
  216. owen, a Python code which evaluates the Owen T function;
  217. ozone_ode, a Python code which sets up and solves a stiff system of four ordinary differential equations (ODE) that simulate the daily variation in atmospheric ozone concentration.
  218. ozone2_ode, a Python code which sets up and solves a stiff system of four ordinary differential equations (ODE) that simulate the daily variation in atmospheric ozone concentration. This version of the ozone ODE includes a nitrogen oxide source term.
  219. padua, a Python code which returns the coordinates of the 2D Padua points, as well as interpolation weights or quadrature weights, and images of the points graphics files.
  220. pariomino, a Python code which considers pariominoes, which are polyominoes with a checkerboard parity.
  221. partition_problem, a Python code which seeks solutions of the partition problem, splitting a set of integers into two subsets with equal sum.
  222. pbma_io, a Python code which reads or writes ASCII Portable Bit Map (PBM) 2D graphics files;
  223. pbmb_io, a Python code which reads or writes a binary Portable Bit Map (PBM) 2D graphics file;
  224. pdflib, a Python code which evaluates Probability Density Functions (PDF) and produces random samples from them, including beta, binomial, chi, exponential, gamma, inverse chi, inverse gamma, multinomial, normal, scaled inverse chi, and uniform.
  225. pendulum_double_ode, a Python code which sets up and solves the double pendulum ordinary differential equation (ODE).
  226. pendulum_elastic_ode a Python code which sets up and solves the ordinary differential equations (ODE) that represent the behavior of a nonlinear elastic pendulum, with gravitational force G, spring constant K, unstretched length L, and mass M.
  227. pendulum_nonlinear_ode, a Python code which sets up and solves the ordinary differential equations (ODE) that represent a nonlinear model of the behavior of a pendulum of length L under a gravitational force of strength G.
  228. pendulum_ode, a Python code which sets up and solves the ordinary differential equations (ODE) that represent a linear model of the behavior of a pendulum of length L under a gravitational force of strength G.
  229. perceptron, a Python code which demonstrates the calculation of a classifier of linearly separable data using the perceptron algorithm.
  230. persistence, a Python code which demonstrates how to initialize, get, or set data stored within a function, using static/persistent/saved/local memory.
  231. pgma_io, a Python code which reads or writes ASCII Portable Gray Map (PGM) 2D graphics files;
  232. pgmb_io, a Python code which reads or writes a binary Portable Gray Map (PGM) 2D graphics file;
  233. pi_spigot, a Python code which produces any number of digits of the decimal expansion of pi.
  234. pink_noise, a Python code which computes a pink noise signal obeying a 1/f power law.
  235. pip3_test
  236. polar_ode, a Python code which sets up and solves an ordinary differential equation (ODE) whose variable is complex, and whose solution should be viewed in a polar coordinate plot.
  237. polpak, a Python code which evaluates a variety of mathematical functions, including Chebyshev, Gegenbauer, Hermite, Jacobi, Laguerre, Legendre polynomials, and the Collatz sequence.
  238. polygon_grid, a Python code which generates a grid of points over the interior of a polygon in 2D.
  239. polygon_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of a polygon in 2D.
  240. polygon_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function over the interior of a polygon in 2D.
  241. polygon_properties, a Python code which computes properties of an arbitrary polygon in the plane, defined by a sequence of vertices, including interior angles, area, centroid, containment of a point, convexity, diameter, distance to a point, inradius, lattice area, nearest point in set, outradius, uniform sampling.
  242. polygon_triangulate, a Python code which triangulates a possibly nonconvex polygon in 2D, and which can use gnuplot to display the external edges and internal diagonals of the triangulation.
  243. polynomial, a Python code which adds, multiplies, differentiates, evaluates and prints multivariate polynomials in a space of M dimensions.
  244. polynomials, a Python code which defines multivariate polynomials over rectangular domains, for which certain information is to be determined, such as the maximum and minimum values.
  245. polyomino_parity, a Python code which uses parity considerations to determine whether a given set of polyominoes can tile a specified region.
  246. polyominoes, a Python code which manipulates polyominoes and tilings.
  247. ppma_io, a Python code which reads or writes an ASCII Portable Pixel Map (PPM) 2D graphics file;
  248. ppmb_io, a Python code which reads or writes a binary Portable Pixel Map (PPM) 2D graphics file;
  249. praxis, a Python code which minimizes a scalar function of several variables, without requiring derivative information, by Richard Brent.
  250. predator_prey_ode, a Python code which sets up and solves a time-dependent predator-prey system of ordinary differential equations (ODE).
  251. prime, a Python code which counts the number of primes between 1 and N, intended as a starting point for a parallel version.
  252. prob, a Python code which evaluates, samples, inverts, and characterizes a number of Probability Density Functions (PDF) and Cumulative Density Functions (CDF), including anglit, arcsin, benford, birthday, bernoulli, beta_binomial, beta, binomial, bradford, burr, cardiod, cauchy, chi, chi squared, circular, cosine, deranged, dipole, dirichlet mixture, discrete, empirical, english sentence and word length, error, exponential, extreme values, f, fisk, folded normal, frechet, gamma, generalized logistic, geometric, gompertz, gumbel, half normal, hypergeometric, inverse gaussian, laplace, levy, logistic, log normal, log series, log uniform, lorentz, maxwell, multinomial, nakagami, negative binomial, normal, pareto, planck, poisson, power, quasigeometric, rayleigh, reciprocal, runs, sech, semicircular, student t, triangle, uniform, von mises, weibull, zipf.
  253. pwl_interp_1d, a Python code which interpolates a set of data using a piecewise linear function in 1D.
  254. pwl_interp_2d, a Python code which interpolates a set of data using a piecewise linear function in 2D.
  255. py_test, Python codes which illustrate various features of Python programming.
  256. python_intrinsics_test, a Python code which demonstrates some of the intrinsic functions in the Python language.
  257. python_mistake, Python codes which illustrate mistakes caused by Python, encouraged by Python, or made difficult to spot because of Python.
  258. pytorch_test, Python codes which illustrate certain features of pytorch.
  259. pyramid_grid, a Python code which computes a grid of points over the interior of the unit pyramid in 3D;
  260. pyramid_monte_carlo, a Python code which applies a Monte Carlo (MC) method to estimate integrals of a function over the interior of the unit pyramid in 3D;
  261. quad_mpi, a Python code which approximates an integral using a quadrature rule, carried out in parallel using MPI and MPI4PY.
  262. quad_serial, a Python code which applies a quadrature rule to estimate an integral, intended as a starting point for parallelization exercises.
  263. quadex_ode a Python code which sets up and solves a stiff ordinary differential equation (ODE), whose exact solution is a parabola, but for which errors grow exponentially.
  264. quadrule, a Python code which implements rules for approximate integration, or quadrature, in one dimension;
  265. quasiperiodic_ode, a Python code which sets up and solves a system of ordinary differential equations (ODE) for a problem with a quasiperiodic solution.
  266. quaternions, a Python code which carries out some simple arithmetic operations for quaternions.
  267. r83, a Python code which contains linear algebra routines for r83 matrices, in real, 64 bit, tridiagonal 3xN format.
  268. r8col, a Python code which contains utility routines for an R8COL, that is, a double precision real MxN array, considered as N column vectors, each of length M. The data may be thought of as a matrix of multiple columns, and many operations will be carried out columnwise.
  269. r8ge, a Python code which contains linear algebra routines for R8GE matrices in real, 64 bit, general format.
  270. r8lib, a Python code which contains many utility routines, using double precision real (R8) arithmetic.
  271. r8lt, a Python code which contains linear algebra routines for R8LT matrices, in real, 64 bit, Lower Triangular format.
  272. r8poly, a Python code which contains a number of utilities for polynomials with R8 coefficients, that is, using double precision or 64 bit real arithmetic.
  273. r8row, a Python code which contains utility routines for an R8ROW, that is, an double precision real MxN array, considered as M row vectors, each of length N. The data may be thought of as a matrix of multiple rows, and many operations will be carried out rowwise.
  274. r8st, a Python code which contains linear algebra routines for R8ST matrices, in real, 64 bit, Sparse Triplet (ST) format.
  275. r8ut, a Python code which contains linear algebra routines for R8UT matrices, in real, 64 bit, Upper Triangular format.
  276. randlc, a Python code which implements a random number generator (RNG) used by the NAS Benchmark programs.
  277. random_data, a Python code which uses a random number generator (RNG) to sample points for various probability distributions, spatial dimensions, and geometries, including the M-dimensional cube, ellipsoid, simplex and sphere.
  278. random_matrix_eigenvalues, a Python code which demonstrates how, for certain probability density functions (PDF), a symmetric matrix with entries sampled from that PDF will have eigenvalues distributed according to the Wigner semicircle distribution.
  279. random_sorted, a Python code which generates vectors of random values which are already sorted.
  280. ranlib, a Python code which produces random samples from Probability Density Functions (PDF), including Beta, Chi-square Exponential, F, Gamma, Multivariate normal, Noncentral chi-square, Noncentral F, Univariate normal, random permutations, Real uniform, Binomial, Negative Binomial, Multinomial, Poisson and Integer uniform, by Barry Brown and James Lovato.
  281. rbf_interp_1d, a Python code which defines and evaluates radial basis function (RBF) interpolants to 1D data.
  282. rbf_interp_2d, a Python code which defines radial basis function (RBF) interpolants to 2D data.
  283. reaction_ode, a Python code which sets up and solves the ordinary differential equations (ODE) which model a simple chemical reaction A+B --k--> C.
  284. reaction_twoway_ode, a Python code which sets up and solves the ordinary differential equations (ODE) which model a two-way chemical reaction between species W1 and W2.
  285. rigid_body_ode, a Python code which sets up and solves the ordinary differential equations (ODE) representing the Euler equations for a rigid body with three unequal moments of inertia, originally proposed by Fred Krogh.
  286. ripple_ode, a Python code which sets up and solves an ordinary differential equation (ODE) whose family of solutions start as ripples and end as hyperbolas.
  287. rk4, a Python code which applies the fourth order Runge-Kutta (RK) algorithm to estimate the solution of an ordinary differential equation (ODE) at the next time step.
  288. rkf45, a Python code which implements the Runge-Kutta-Fehlberg (RKF) solver for the approximate solution of an ordinary differential equation (ODE) system.
  289. rnglib, a Python code which implements a random number generator (RNG) with splitting facilities, allowing multiple independent streams to be computed, by L'Ecuyer and Cote.
  290. robertson_ode, a Python code which sets up and solves a system of three nonlinear stiff ordinary differential equations (ODE) characterizing an autocatalytic chemical reaction.
  291. roessler_ode, a Python code which sets up and solves the Roessler system of ordinary differential equations (ODE).
  292. root_rc, a Python code which seeks a solution of a scalar nonlinear equation f(x)=0, using reverse communication (RC), by Gaston Gonnet.
  293. roots_rc, a Python code which seeks solutions of a system of nonlinear equations, using reverse communication (RC), by Gaston Gonnet.
  294. rot13, a Python code which makes a copy of a file which has been encoded using the ROT13 coding and a ROT5 coding for digits.
  295. row_echelon_integer, a Python code which carries out the exact computation of the integer row echelon form (IREF) and integer reduced row echelon form (IRREF) of an integer matrix.
  296. rubber_band_ode, a Python code which sets up and solves a set of ordinary differential equations (ODE) describing a mass suspended by a spring and rubber band, which exhibit chaotic behavior.
  297. sammon_data, a Python code which generates six examples of M dimensional datasets for cluster analysis.
  298. satisfy, a Python code which demonstrates, for a particular circuit, an exhaustive search for solutions of the circuit satisfiability problem.
  299. sawtooth_ode, a Python code which sets up and solves an ordinary differential equation (ODE) driven by a right hand side which is a sawtooth function, periodic, discontinuous, piecewise linear.
  300. search_mpi, a Python code which searches integers between A and B for a solution J such that F(J)=C, carried out in parallel using MPI and MPI4PY.
  301. search_serial, a Python code which searches integers between A and B for a solution J such that F(J)=C, intended as a starting point for parallelization exercises.
  302. sftpack, a Python code which implements the slow Fourier transform (SFT), intended as a teaching tool and comparison with the fast Fourier transform (FFT).
  303. shallow_water_1d, a Python code which simulates the evolution of a 1D fluid governed by the time-dependent shallow water equations.
  304. shepard_interp_1d, a Python code which defines and evaluates Shepard interpolants to 1D data, based on inverse distance weighting.
  305. simplex_coordinates, a Python code which computes the Cartesian coordinates of the vertices of a regular simplex in M dimensions.
  306. simplex_gm_rule, a Python code which defines Grundmann-Moeller quadrature rules over the interior of a triangle in 2D, a tetrahedron in 3D, or over the interior of the simplex in M dimensions.
  307. simplex_grid, a Python code which generates a regular grid of points over the interior of an arbitrary simplex in M dimensions.
  308. simplex_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit simplex in M dimensions.
  309. simplex_monte_carlo, a Python code which uses the Monte Carlo method to estimate an integral over the interior of the unit simplex in M dimensions.
  310. sine_transform, a Python code which demonstrates simple properties of the discrete sine transform (DST).
  311. sir_ode, a Python code which sets up and solves the ordinary differential equations (ODE) which simulate the spread of a disease using the Susceptible/Infected/Recovered (SIR) model.
  312. sling_ode, an Octave code which sets up and solves a system of ordinary differential equations (ODE) for which the exact circular solution can only be approximated for a short interval before it decays to zero.
  313. snakes_and_ladders, a Python code which simulates the game of Snakes and Ladders, and estimates the average number of moves in a one-player game.
  314. sobol, a Python code which computes elements of a Sobol Quasi Monte Carlo (QMC) sequence.
  315. solve, a Python code which demonstrates how Gauss elimination can be used to solve a linear system A*x=b.
  316. sort_rc, a Python code which sorts a list of any kind of objects, using reverse communication (RC).
  317. sphere_distance, a Python code which computes the expected value of the distance between a pair of points randomly selected from the surface of the unit sphere in 3D.
  318. sphere_fibonacci_grid, a Python code which uses a Fibonacci spiral to create a grid of points on the surface of the unit sphere in 3D.
  319. sphere_integrals, a Python code which returns the exact value of the integral of any monomial over the surface of the unit sphere in 3D.
  320. sphere_llq_grid, a Python code which uses longitudes and latitudes to create grids of points, lines, and quadrilaterals on the surface of the unit sphere in 3D.
  321. sphere_llt_grid, a Python code which uses longitudes and latitudes to create grids of points, lines, and triangles on the surface of the unit sphere in 3D.
  322. sphere_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function on the surface of the unit sphere in 3D.
  323. spiral_data, a Python code which computes a velocity vector field that satisfies the continuity equation, writing the data to a file that can be plotted by gnuplot.
  324. spring_ode, a Python code which sets up and solves a system of ordinary differential equations (ODE) for the motion of a spring with mass m, damping b, and stiffness k.
  325. spring_double_ode, a Python code which sets up and solves a system of ordinary differential equations (ODE) for a system in which a mass is connected by a spring to a mass connected by a spring to a fixed support.
  326. spring_sweep_ode, a Python code which computes a grid of solutions to a parameterized system of ordinary differential equations (ODE) that represent the motion of a spring with mass m, damping b, and stiffness k.
  327. square_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected inside the unit square.
  328. square_grid, a Python code which computes a grid of points over the interior of a square in 2D.
  329. square_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit square or symmetric unit square in 2D.
  330. square_minimal_rule, a Python code which returns "almost minimal" quadrature rules, with exactness up to total degree 55, over the interior of the symmetric square in 2D, by Mattia Festa and Alvise Sommariva.
  331. square_monte_carlo, a Python code which applies a Monte Carlo method to estimate the integral of a function over the interior of the unit square in 2D.
  332. squircle_ode, a Python code which sets up and solves a system of ordinary differential equations (ODE) for a pair of functions that generalize the sine and cosine, and whose phase portrait is a squircle, a sort of squared circle.
  333. st_io a Python code which reads and writes sparse linear systems stored in the Sparse Triplet (ST) format.
  334. stetter_ode, a Python code which sets up and solves an ordinary differential equation (ODE) for which a specific time step sequence causes the implicit trapezoidal method to be unstable, while the implicit midpoint method will be stable. Note that the right hand side function f(t,y) is periodic, discontinuous, and piecewise linear.
  335. stiff_ode, a Python code which sets up and solves a stiff ordinary differential equation (ODE).
  336. stochastic_diffusion, a Python code which implements several versions of a stochastic diffusivity coefficient.
  337. stokes_2d_exact, a Python code which evaluates exact solutions to the incompressible steady Stokes equations over the unit square in 2D.
  338. subset, a Python code which enumerates, generates, randomizes, ranks and unranks combinatorial objects including combinations, compositions, Gray codes, index sets, partitions, permutations, polynomials, subsets, and Young tables. Backtracking routines are included to solve some combinatorial problems.
  339. subset_sum, a Python code which seeks solutions of the subset sum problem.
  340. svd_snowfall, a Python code which reads a file containing historical snowfall data and analyzes the data with the Singular Value Decomposition (SVD), displaying the results using gnuplot.
  341. svd_test, a Python code which demonstrates the calculation of the singular value decomposition (SVD) and some of its properties;
  342. table_io, a Python code which reads and writes files.
  343. test_eigen, a Python code which implements test matrices for eigenvalue analysis.
  344. test_interp, a Python code which defines test problems for interpolation, provided as a set of (x,y(x)) data.
  345. test_interp_1d, a Python code which defines test problems for interpolation of data y(x), which depends on a 1D argument.
  346. test_interp_2d, a Python code which defines test problems for interpolation of data z(x,y), which depends on a 2D argument.
  347. test_lls, a Python code which implements linear least squares test problems of the form A*x=b.
  348. test_mat, a Python code which defines test matrices for which the condition number, determinant, eigenvalues, eigenvectors, inverse, null vectors, P*L*U factorization or linear system solution are known. Examples include the Fibonacci, Hilbert, Redheffer, Vandermonde, Wathen and Wilkinson matrices.
  349. test_matrix_exponential, a Python code which defines a set of test cases for computing the matrix exponential.
  350. test_min, a Python code which implements test problems for minimization of a scalar function of a scalar variable.
  351. test_nonlin, a Python code which implements test problems for the solution of systems of nonlinear equations.
  352. test_optimization, a Python code which implements test problems for optimization of a scalar function of several variables, as described by Molga and Smutnicki.
  353. test_values, a Python code which returns selected values of some special functions;
  354. test_zero, a Python code which defines some functions f(x) suitable for testing software that solves f(x)=0;
  355. tester, a BASH script which runs the test codes.
  356. tetrahedron_grid, a Python code which computes a grid of points over the interior of a tetrahedron in 3D.
  357. tetrahedron_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit tetrahedron in 3D.
  358. tetrahedron_monte_carlo, a Python code which uses the Monte Carlo method to estimate an integral over the interior of the unit tetrahedron in 3D.
  359. three_body_ode, a Python code which sets up and solves ordinary differential equations (ODE) that simulate the behavior of three planets, constrained to lie in a plane, and moving under the influence of gravity, by Walter Gander and Jiri Hrebicek.
  360. tictoc, a Python code which provides versions of the tic() and toc() functions for wallclock timing.
  361. timer_test, a Python code which tests various timers.
  362. timestamp, a Python code which prints the current YMDHMS date as a timestamp.
  363. toeplitz_cholesky, a Python code which computes the Cholesky factorization of a nonnegative definite symmetric Toeplitz matrix.
  364. toms097, a Python code which computes the distance between all pairs of nodes in a directed graph with weighted edges, using the Floyd algorithm. This is a version of ACM TOMS algorithm 97.
  365. toms112, a Python code which determines whether a point is contained in a polygon, by Moshe Shimrat. This is a version of ACM TOMS algorithm 112.
  366. toms178, a Python code which seeks the minimizer of a function of several variables, using the Hooke-Jeeves direct search method, by Arthur Kaupe. This is a version of ACM TOMS algorithm 178.
  367. toms179, a Python code which calculates the incomplete Beta ratio, by Oliver Ludwig. This is a version of ACM TOMS algorithm 179.
  368. toms243, a Python code which evaluates the logarithm of a complex value, by David Collens. This is a version of ACM TOMS algorithm 243.
  369. toms515, a Python code which selects subsets of size K from a set of size N. This is a version of ACM TOMS Algorithm 515, by Bill Buckles, Matthew Lybanon.
  370. toms577, a Python code which evaluates the Carlson elliptic integral functions RC, RD, RF and RJ. This is a version of ACM TOMS algorithm 577.
  371. toms655, a Python code which computes the weights for interpolatory quadrature rule; this library is commonly called IQPACK, by Sylvan Elhay and Jaroslav Kautsky. This is a version of ACM TOMS algorithm 655. Only a small portion of this library has been implemented in Python so far!
  372. toms743, a Python code which evaluates the Lambert W function. This is a version of ACM TOMS algorithm 743, by Barry, Barry and Culligan-Hensley.
  373. toms923, a Python code which evaluates the Pfaffian for a dense or banded skew symmetric matrix, by Michael Wimmer.
  374. tough_ode, a Python code which sets up and solves a system of four ordinary differential equations (ODE) which is extremely difficult to solve accurately.
  375. trapezoidal, a Python code which solves one or more ordinary differential equations (ODE) using the implicit trapezoidal method, and using fsolve() to handle the implicit system.
  376. trapezoidal_fixed, a Python code which solves one or more ordinary differential equations (ODE) using the implicit trapezoidal method, and using a fixed point method to handle the implicit system.
  377. triangle_distance, a Python code which considers the problem of describing the typical value of the distance between a pair of points randomly selected from the interior of a triangle in 2D.
  378. triangle_grid, a Python code which computes a grid of points over the interior of a triangle in 2D.
  379. triangle_integrals, a Python code which returns the exact value of the integral of any polynomial over the interior of a general triangle in 2D.
  380. triangle_interpolate, a Python code which shows how vertex data can be interpolated at any point in the interior of a triangle.
  381. triangle_monte_carlo, a Python code which uses the Monte Carlo method to estimate an integral over the interior of a general triangle in 2D.
  382. triangle_properties, a Python code which computes properties, including angles, area, centroid, circumcircle, edge lengths, incircle, orientation, orthocenter, and quality, of a triangle in 2D.
  383. triangle_twb_rule, a Python code which generates the points and weights of quadrature rules over the interior of a triangle in 2D, determined by Taylor, Wingate, and Bos.
  384. triangle01_integrals, a Python code which returns the integral of any monomial over the interior of the unit triangle in 2D.
  385. triangle01_monte_carlo, a Python code which uses the Monte Carlo method to estimate the integral of any function over the interior of the unit triangle in 2D.
  386. truncated_normal, a Python code which works with the truncated normal distribution over [A,B], or [A,+oo) or (-oo,B], returning the probability density function (PDF), the cumulative density function (CDF), the inverse CDF, the mean, the variance, and sample values.
  387. truncated_normal_rule, a Python code which computes a quadrature rule for a normal probability density function (PDF), sometimes called a Gaussian distribution, that has been truncated to [A,+oo), (-oo,B] or [A,B].
  388. tsp_brute, a Python code which reads a file of city-to-city distances and solves a small traveling salesperson problem (TSP), using brute force.
  389. two_body_ode, a Python code which sets up and solves ordinary differential equations (ODE) which simulate the behavior of two bodies, constrained to lie in a plane, moving under the influence of gravity, with one body much more massive than the other.
  390. ubvec, a Python code which demonstrates how nonnegative integers can be stored as unsigned binary vectors, and arithmetic can be performed on them.
  391. umlaut_remover, a Python code which replaces certain special characters in German text by English equivalents, based on work by John Berroa.
  392. unicycle, a Python code which considers permutations containing a single cycle, sometimes called cyclic permutations.
  393. uniform, a Python code which contains uniform random number generators (RNG) for several arithmetic types.
  394. upc, a Python code which computes the check digit associated with a uniform product code (UPC), or reports whether a 12-digit UPC is actually valid.
  395. van_der_corput, a Python code which computes elements of the van der Corput 1-dimensional Quasi Monte Carlo (QMC) sequence, using a simple interface.
  396. vandermonde_interp_1d, a Python code which finds a polynomial interpolant to data y(x) of a 1D argument by setting up and solving a linear system for the polynomial coefficients involving the Vandermonde matrix, creating graphics with matplotlib().
  397. vanderpol_ode, a Python code which sets up and solves the van der Pol oscillator ordinary differential equation (ODE).
  398. voronoi_plot, a Python code which estimates the Voronoi neighborhoods of points using sampling, and with a distance based on the L1, L2, LInfinity or arbitrary LP norms;
  399. voronoi_test, a Python code which demonstrates the use of the scipy.spatial function Voronoi(), to compute a Voronoi diagram, and voronoi_plot_2d(), to display it.
  400. walker_sample, a Python code which efficiently samples a discrete probability density function (PDF) represented by a vector, using Walker sampling.
  401. walsh, a Python code which implements versions of the Walsh and Haar transforms.
  402. wathen, a Python code which compares storage schemes: full, banded, sparse triplet, sparse, and solution strategies: A\x, Linpack, conjugate gradient, for linear systems involving the Wathen matrix, which can arise when solving a problem using the finite element method (FEM).
  403. wedge_grid, a Python code which computes a grid of points over the interior of the unit wedge in 3D.
  404. wedge_integrals, a Python code which returns the exact value of the integral of any monomial over the interior of the unit wedge in 3D.
  405. wedge_monte_carlo, a Python code which uses the Monte Carlo method to estimate an integral over the interior of the unit wedge in 3D.
  406. weekday, a Python code which determines the day of the week corresponding to a given date, such as 14 October 1066, Julian calendar, ... which was a Saturday.
  407. weekday_zeller, a Python code which uses the Zeller congruence to determine the day of the week corresponding to a given date, such as 13 July 1989, Gregorian calendar, ... which was a Thursday.
  408. wtime, a Python code which shows how to return a reading of the wall clock time.
  409. xml_to_fem, a Python code which reads an XML file created by dolfin() or fenics(), describing a mesh in 1D, 2D, or 3D, and extracts two sets of information, namely, the coordinates of nodes, and the indices of nodes that form each element, which constitute a finite element method (FEM) mesh of the geometry.
  410. zero, a Python code which seeks a solution of a scalar nonlinear equation f(x)=0, by Richard Brent.
  411. zero_rc, a Python code which seeks a solution of a scalar nonlinear equation f(x)=0, using reverse communication (RC), by Richard Brent.
  412. zombie_ode, a Python code which sets up and solves a system of ordinary differential equations (ODE) for a generalized Susceptible-Infected-Recovered (SIR) disease model to simulate a zombie attack, developed by Philip Munz.


Last revised on 20 July 2021.