engelphi / algorithm Goto Github PK
View Code? Open in Web Editor NEWstl-like algorithms
License: MIT License
stl-like algorithms
License: MIT License
During reorganization of algorithms, the documentation was dropped accidentally. Add documentation again.
Add CoverityScan for additional static analysis.
Move the library out of the include directory into base directory.
Reorganize algorithm from algorithms.hpp into separate files to avoid merge conflicts in case of parallel development.
Currently each push commit is build by travis. This cause travis to build the same commit twice if a pull request ist created which is a waste of resources.
Add an unzip algorithm that takes a range containing pairs of values and separates the elements into two ranges that contain elements of the pairs.
Example:
std::vector<std::pair<int, char>> input{{1, 'a'}, {2, 'b'}, {3, 'c'}, {4, 'd'}, {5, 'e'}};
std::vector first_range{};
std::vector second_range{};
algo::unzip(input.begin(), input.end(), std::back_inserter(first_range),
std::back_inserter(second_range));
Result:
first_range == {1,2,3,4,5};
second_range == {'a', 'b', 'c', 'd', 'e'};
When it comes to static analysis more tools are better. Therefore add cppcheck in addition to clang-tidy for additional analysis.
Currently the only compiler which is supported is clang 5.0.0. As the library is based on C++17 earlier Versions of clang are not compatible and do not need to be included in the continuous integration process. On the other hand g++ supports C++17 experimentally since version 7. The library should therefore be build and tested against g++.
Github provides the possibility to make releases available through the releases tab of the projects github page. The continuous integration process should be extended to deploy a release to github when the repository was tagged appropriately.
Switch to catch unit testing framework as it easier to integrate does not require to link against external dependencies.
The library should be documentated in a commonly used format which can be automatically build by the
continuous integration process. The generated documentation could then be deployed together with the library itself.
add zip_with and zip_with_n algorithms which implement the following behavior:
std::vector<int> first_range{1,2,3,4};
std::vector<int> second_range{1,2,3,4};
std::vector<int> output_range{};
zip_with(first_range.begin(), first_range.end(),
second_range.begin(),
std::back_inserter(output_range),
[] (const auto& first, const auto& second) {
return first + second;
});
output_range == std::vector<int>{2,4,6,8}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.