creativelabs0x3cf / boolinq Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/boolinq
Automatically exported from code.google.com/p/boolinq
what is the equivalent commands in boolinq for the following linq statement?
System::Collections::Generic::IEnumerable ^lens = from ele in rules orderby
ele::Support, ele::Confidence select ele;
//sorting rules by support and then confidence
Original issue reported on code.google.com by [email protected]
on 25 Jul 2012 at 4:28
1. Предположим, кто-нибудь создал функцию, и
решил передать туда диапазон:
void foo(IterRange<int*> r);
...
int r[5] = {0,1,2,3,4};
foo(r);
2. Пока все хорошо. Но теперь этот кто-то
решил развернуть массив:
int r[5] = {0,1,2,3,4};
foo(reverse(r));
3. Но что это? Ошибка компиляции! Надо
изменить прототип функции:
void foo(ReverseRange<IterRange<int*> > r);
4. И снова все хорошо. Но представим теперь,
что этот кто-то решил передать массив снова
в прямом порядке:
int r[5] = {0,1,2,3,4};
foo(r); //WTF??
Но что это? Массив неявно развернулся!
----------------------
Для исключения подобных ошибок я предлагаю
исключить неявные преобразования типов.
Original issue reported on code.google.com by [email protected]
on 24 Apr 2012 at 11:00
Attachments:
What steps will reproduce the problem?
1. Include boolinq-all.h in a file and compile
Error report is Error C2027 use of undefined type of R.
If min an max and mixin's is removed and mixin's is removed from linq
inheritance then all compiles.
Original issue reported on code.google.com by [email protected]
on 24 Sep 2012 at 7:26
Ситуация: требуется передать в
подпрограмму диапазон, полученный заранее
неизвестным образом.
Например, int r[5] = {0,1,2,3,4};
Требуется иметь возможность передавать в
некоторую функцию как range(r), так и reverse(range(r))
В чем проблема? В том, что от способа
получения диапазона зависит его тип.
Потому на данный момент требуется все
функции, принимающие диапазоны, делать
шаблонными. Однако данный подход создает
дополнительную проблему: требуется как-то
указать компилятору, что в этом самом
произвольном шаблоне лежит требуемый тип
или же городить огород с приведениями
типов.
Пример огорода:
template <typename R>
void foo(R r)
{
if ((int)r.front() == 1) ...;
}
При этом в функцию может передан ТОЛЬКО
диапазон над int (т.е. IterRange<int*>,
ReverseRange<IterRange<int*> > и подобные), но
компилятору об этом никто не сказал.
Поэтому я предлагаю ввести интерфейс,
через который можно было бы обращаться к
произвольным диапазонам независимо от
способа его получения.
Например, так:
void foo(Linq<DynamicRange<int> > r);
...
int r[5] = {0,1,2,3,4};
foo(from(r).asDynamic());
(Здесь слово "dynamic" относится не к размеру
диапазона, а к его фактическому типу)
PS десятой студии у меня нет, так что код в
патче я не компилировал. Заранее извиняюсь,
если там есть синтаксические ошибки.
Original issue reported on code.google.com by [email protected]
on 24 Apr 2012 at 11:16
Attachments:
What steps will reproduce the problem?
1. Create a class with a field of type vector<shared_ptr<Whatever>>
2. Try to use from() on it
3.
What is the expected output? What do you see instead?
I expect this to work. Instead compiler says no method from matches argument.
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by dmitrinesteruk
on 28 Jun 2013 at 6:52
В то время, как сортировка за время порядка
N*log N уже стала нормой, boolinq предлагает
сортировку, работающую медленнее
пузырьковой!
Для "вытягивания" из OrderByRange каждого
следующего элемента требуется заново
перебрать все элементы исходной коллекции.
Сравните с Linq for Objects: там OrderBy вызывает ToList,
сортирует получившийся список и просто
отдает его. Почему нельзя сделать так же?
Original issue reported on code.google.com by [email protected]
on 24 Apr 2012 at 10:51
struct bar{int id,count;};
bar arr[]={{0,7},{1,5},{2,7},{3,2},{4,4},{5,3},{6,4},{7,5},{8,5},{9,5}};
std::vector<bar> out=boolinq::from(arr).orderBy([](const bar&ref){return
ref.count;}).toVector();
printf(out.empty()?"WTF?\n":"OK.\n";);
Original issue reported on code.google.com by [email protected]
on 24 Apr 2012 at 5:33
Attachments:
What steps will reproduce the problem?
1. dont't compile on mingw any version
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
latest
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 3 Apr 2013 at 9:18
First code review
Original issue reported on code.google.com by k06aaa
on 4 Jan 2012 at 6:58
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.