[Updated] Five Cents on Arithmetic Encoding
Learn about a classical arithmetic compression implementation (CACM) optimization.
Learn about a classical arithmetic compression implementation (CACM) optimization.
Vectors are one of the single most useful and most used objects in the STL. They are easy to use, and remove the burden of memory management from the user. It is possible to partially control memory usage by using functions like reserve
, but nothing is provided to free up excess memory. Users have come up with ways to trim a vector by hand, but with the advent of the new C++0x and its move semantics, the classic solution of copy-swaping has become excessively expensive. This article seeks to find a better solution.
Unquestionably, the most effective tool for a C++ programmer's productivity is the Standard library's rich collection of algorithms. In 2008, about 20 new algorithms were voted into the C++0x draft standard. These new algorithms let you among the rest copy n elements intuitively, perform set theory operations, and handle partitions conveniently. Find out how to use these algorithms to make your code more efficient and intuitive.
Classify a point respect to a plane polygon that can be concave (i.e. with some angle grater than 180 degrees). Good performance, excellent stability.
The article introduces the simplex algorithm, provides a useful C++ function to optimize target function parameters, and shows rich examples, figures, flowcharts. source code is also attached with the article.
Learn about a technique that allows you to use half the data storage when you have a symmetric distance matrix or other similar triangular matrix.
The code calculates the value of Pi to arbitrary number of digits such as 100, 1000 etc. The article describes the theory behind the code.
Learn about a simple algorithm to find combinations systematically using C++.
The technique of finding permutations also provides source code for the recursive implementation. Also, learn how to use the STL template function next_permutation().
Algorithms to compute the M-th lexicographic ordering of a permutation or combination and the inverse problem of the rank of a given permutation or sequence.
Discover how to optimize by simplifying the formula.
Speed up the work of finding permutations among different processors.
Discover four new algorithms for finding combinations.
Find the coin combinations that add up to a dollar.
Learn how to construct a simple and lean string class wrapper that allows you to send formatted output to a string directly.
Discover a more efficient way to round decimals to integers.
Learn how to combine four image alignment algorithms (Lucas-Kanade, forwards-compositional, Baker-Dellaert-Matthews, and Hager-Belhumeur) into a 2D object tracker with dynamic templates and template pixel weights.
There are many different styles of recursion that can be used in a variety of instances. Learn about the styles and find the one that is best for your current project.
Learn how to make a class schedule by using a genetic algorithm.
Copying constructors and assignment operators is easy—once you learn the rules, and you can learn those rules right here.
Learn how to implement some basic number theory functions with the help of C++ template meta programming.
With Blitz++, you can turbo charge C++ so that you get advanced language features but lose its poor performance.
Learn about various Check Digit Schemes and how to implement the scheme.