The Coyotl library defies easy classification much like it's namesake. Coyotl collects several C++ tools that have proven useful in many of my programs, but which aren't "big enough" to warrant an individual library.
Some of the most significant classes have standalone presentations:
The Twisted Road to Randomness
Genetic algorithms, games, statistical tests, and simulations all rely on "random" numbers. Unfortunately, the built-in "random number" function is inadequate in algorithms where lots, and lots (and lots!) of random values need to be generated. Some of my applications use billions of random numbers in their calculations. In such circumstances, a random number "generator" that produces repetitive or cyclical values is unlikely to produce satisfactory results. This article presents concepts, requirements, and algorithms for generating "random numbers", with a focus on linear congruential and Mersenne Twister algorithms. (Note: This article is undergoing a major revision to reflect new algorithms recently added to libcoyotl.)
Beyond Assert: Validation Tools for Design by Contract
I don't use the assert macro in professional C++ code; instead, I prefer something akin to Bertrand Meyer's Design by Contract, albeit with a strong C++ flavor. This article introduces an exception-based validation systems I've developed for my own projects.
A Maze of Concepts
I began with an idea for an experiment: Use genetic algorithms to evolve searching skills in software organisms; such research is applicable to many applications, including web searching and data mining. I've puttered about with several such algorithms, and wanted to move to a more complicated environment. This article describes classes for creating, drawing, and persisting 2D mazes in C++.
What's New in This Release:
· A polymorphic collection of the best psuedorandom number generators, including the Mersenne Twister and Marsaglia's favorites.
· Utilities for floating-point numbers, including additional functions for trigonometry, least common multiple, greatest common denominator, rounding, and other purposes.
· A simple cross-platform command-line parser.
· A framework for generating random rectangular mazes.
· A template for fixed-point math based on different integer sizes and decimal point locations.
· Templatized sorting utilities (designed before Std. C++'s , but still useful)
· Validation tools for "Design by Contract" programming.
Complete API documentation can be generated with a simple "make docs" command.
A few of the included classes (the array template, for example) could be considered obsolete. I began writing C++ when it was still called "C with Classes", long before the Standard Template Library or projects like Boost. I hesitate to throw away old code, and don't see the sense in replacing working code with something "newer" if the "newer" code isn't also "better".
I have quite a bit of C++ code, from my books and various consulting projects; as time permits, I'll migrate more code into Coyotl.
And one final note: The name of this library changed recently, from "coyote" to "coyotl". The former is a Spanish and English translation of the original Nahuatl word "coyotl". The revised name honors both my favorite song dog and my wife's Central American heritage.