Giter VIP home page Giter VIP logo

algorithm's People

Contributors

engelphi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

algorithm's Issues

fix documentation

During reorganization of algorithms, the documentation was dropped accidentally. Add documentation again.

Only build push builds for master

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 unzip algorithm

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'};

Extend the compilers to build test against

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++.

Deploy to github

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.

Doxygen documentation

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 algorithm

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}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.