filixi / cinq Goto Github PK
View Code? Open in Web Editor NEWcinq(originated from .Net linq) for modern c++
License: MIT License
cinq(originated from .Net linq) for modern c++
License: MIT License
Cinq (C++ inline query) is a header only, modern C++ library with no third-party dependency. This library is inspired by Linq of C#. It will provide similar APIs and functionalities as Linq and PLinq along with extensions and adaptations to meet best-practices of modern C++. This project plans to provide identical API and functionality in lastest successive two C++ standards (currently C++17 and C++14), and focuses on easy-to-use and performance. The first relase will require C++17 to compile, and will only support a subset of the variations. (If we are lazy enough, C++14 might never get supported :P) Warning: Depend on the settings, building the test in non parallel mode requires up to 6GiB memory and 10GiB disk space. Query implementation status: Fully implemented: Distinct() Intersect(Enumerable<TSource>, ...) Join(Enumerable<TOuter>, [](TInner) -> ) Select([](TSource) -> TResult) SelectMany([](TSource) -> TEnumerable) ToVector() Where([](TSource) -> bool) Need test case: All([](TSource) -> bool) ToSet() To implement: Aggregate([](TSource, TSource) -> TSource) Aggregate(TAccumulate, [](TAccumulate, TSource) -> TAccumulate) Aggregate(TAccumulate, [](TAccumulate, TSource) -> TAccumulate, [](TAccumulate) -> TResult) Any() / Empty Any([](TSource) -> bool) Append(TSource) Average([](TSource) -> TResult) StaticCast<TResult> DynamicCast<TResult> ConstCast<TResult> ReinterpretCast<TResult> Contains(TSource) Count() / Size / LongCount Count([](TSource) -> bool) / CountIf DefaultIfEmpty() DefaultIfEmpty(TSource) Distinct([](TSource, TSource) -> bool) ElementAt(size_t) / At ElementAtOrDefault(size_t) Except(Enumerable<TSource>) Except(Enumerable<TSource>, [](TSource, TSource) -> bool) First() / Front First([](TSource) -> bool) FirstOrDefault() FirstOrDefault([](TSource) -> bool) GroupBy([](TSource) -> TKey) GroupBy([](TSource) -> TKey, [](TKey, TKey) -> bool) GroupBy([](TSource) -> TKey, [](TSource) -> TElement) GroupBy([](TSource) -> TKey, [](TSource) -> TElement, [](TKey, TKey) -> bool) GroupBy([](TSource) -> TKey, [](TKey, Enumerable) -> TResult) GroupBy([](TSource) -> TKey, [](TKey, Enumerable) -> TResult, [](TKey, TKey) -> bool) GroupBy([](TSource) -> TKey, [](TSource) -> TElement, [](TKey, Enumerable) -> TResult) GroupBy([](TSource) -> TKey, [](TSource) -> TElement, [](TKey, Enumerable) -> TResult, [](TKey, TKey) -> bool) GroupJoin(Enumerable<TInner>, [](TOuter) -> TKey, [](TInner) -> TKey, [](TOuter, Enumerable<TInner>) -> TResult) GroupJoin(Enumerable<TInner>, [](TOuter) -> TKey, [](TInner) -> TKey, [](TOuter, Enumerable<TInner>) -> TResult, [](TKey, TKey) -> bool) Intersect(Enumerable<TSource>, [](TSource, TSource) -> bool) Intersect(Enumerable<TSource>) Join(Enumerable<TInner>, [](TOuter) -> TKey, [](TInner) -> TKey, [](TOuter, TInner) -> TResult) Join(Enumerable<TInner>, [](TOuter) -> TKey, [](TInner) -> TKey, [](TOuter, TInner) -> TResult, [](TKey, TKey) -> bool) Last() / Back Last([](TSource) -> bool) LastOrDefault() LastOrDefault([](TSource) -> bool) Max() Max([](TSource) -> TResult) Min() Min([](TSource) -> TResult) OfType<TResult>() OrderBy([](TSource) -> TKey) OrderBy([](TSource) -> TKey, [](TKey, TKey) -> bool) OrderByDescending([](TSource) -> TKey) OrderByDescending([](TSource) -> TKey, [](TKey, TKey) -> bool) Prepend(TSource) Range(T, T) Repeat(TResult, size_t) Reverse() Select([](TSource, size_t) -> TResult) SelectMany([](TSource) -> TEnumerable, [](TSource, TElement) -> TResult) SelectMany([](TSource, size_t) -> TEnumerable, [](TSource, TElement) -> TResult) SelectMany([](TSource, size_t) -> TEnumerable) SequenceEqual(Enumerable<TSource>) SequenceEqual(Enumerable<TSource>, [](TSource, TSource) -> bool) Single([](TSource) -> bool) Single() SingleOrDefault() SingleOrDefault([](TSource) -> bool) Skip(size_t) SkipLast(size_t) SkipWhile([](TSource) -> bool) SkipWhile([](TSource, size_t) -> bool) Sum() Sum([](TSource) -> TResult) Take(size_t) TakeLast(size_t) TakeWhile([](TSource) -> bool) TakeWhile([](TSource, size_t) -> bool) Union(Enumerable<TSource>) Union(Enumerable<TSource>, [](TSource, TSource) -> bool) Where([](TSource, size_t) -> bool) ToList ToForwardList ToDequeue ToStack ToQueue ToPriorityQueue ToMap ToUnorderedSap ToSet ToUnorderedSet Pending: ThenBy([](TSource) -> Tkey) ThenBy([](TSource) -> Tkey, [](TKey, TKey) -> bool) ThenByDescending([](TSource) -> Tkey) ThenByDescending([](TSource) -> Tkey, [](TKey, TKey) -> bool) ToArray ToDictionary ToHashSet ToList ToLookup
Break big files.
refactors enumerable's past-the-end iterator to make it more time and space efficient.
After refactoring, enumerables will be organized in a tree-like style. cinq holds only the root, from which user gets results.
Draws up the guarantee of object life-time and copying/moving. Implements relate tests.
Updates CinqV1 to have at least the following queries:
CinqV1 should share test case with V3
Checks whether user's container and functor is valid to provide better error message.
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.