We will implement the DBSCAN clustering algorithm in Rust. As its input, the algorithm will take a distance matrix rather than a set of points or feature vectors. This will make the implemented algorithm useful in situations when the dataset is not formed by points or when features cannot be easily extracted. The complete source code, including comments and tests, is available on GitHub.
Read More
Tag Archives: programming
Computing Context Triggered Piecewise Hashes in Rust
This post introduces my Rust wrapper for ssdeep by Jesse Kornblum, which is a C library and program for computing context triggered piecewise hashes (CTPH). Also called fuzzy hashes, CTPH can match inputs that have homologies. Such inputs have sequences of identical bytes in the same order, although bytes in between these sequences may be different in both content and length. In contrast to standard hashing algorithms, CTPH can be used to identify files that are highly similar but not identical.
Read More
Universal vs Forwarding References in C++
When talking about T&&
in C++, you may have heard about universal references and forwarding references. This may get you wonder. Why there are two names for an apparently same concept? Is there any difference between them? Which one should I use? Let’s find out.
Read More
Auto Type Deduction in Range-Based For Loops
Have you ever wondered which of the following variants you should use in range-based for loops and when? auto
, const auto
, auto&
, const auto&
, auto&&
, const auto&&
, or decltype(auto)
? This post tries to present rules of thumb that you can use in day-to-day coding. As you will see, only four of these variants are generally useful.
Read More
Structures and Member Initializers in C++
Since C++11, one can put the initialization of data members directly into structure or class definition. However, this change has consequences with regards to the construction of such structures. Indeed, by adding member initializers into a structure may render your previously working code non-compilable. In the present post, I describe this change, the related issues, and explain how to get around them.
Read More
Review of Modern C++ Programming with Test-Driven Development
My review of a book written by Jeff Langr entitled Modern C++ Programming with Test-Driven Development: Code Better, Sleep Better.
Read More
Improving C++98 Code With C++11
There are many projects written in C++98. Moreover, lots of programmers are still used to C++98. However, with the standardization of C++11 and C++14, C++98 is becoming obsolete. In this post, I would like to list some of the features of C++11 that can be used to improve C++98 code in situations where it is possible to use the new standard.
Read More
Review of Effective Modern C++
This month, a new book from one of the foremost C++ experts Scott Meyers became available: Effective Modern C++, subtitled 42 Specific Ways to Improve Your Use of C++11 and C++14. The present post gives my humble review of this jewel.
Read More
Indexing Lists in Python With an Integer or Object’s Name
In this post, we will see a way of implementing a list in Python that can be indexed with an integer or string representing the name
attribute of a stored object.
Read More
cpp-bencoding: A New C++ Bencoding Library
Today, I have finished the implementation of a new open-source bencoding library. It is named cpp-bencoding and written in C++11. In the present blog post, I would like to briefly introduce it.
Read More