Type: Posts; User: razzle
Search took 0.02 seconds.
December 9th, 2013, 09:24 PM
I haven't studied your problem in detail but note that it's seldom beneficial to tie data to immediate needs.
It's better to apply modularization. That is to separate the functionality of the...
December 9th, 2013, 06:15 PM
Well, I assumed the OP knew C++ already and now wanted more insight.
For this person the book I suggested is perfect. It offers great insight interspersed with coding tips. Okay some tips may be...
December 9th, 2013, 05:42 PM
That's not how you establish the average complexity of an algorithm. You do that by assuming average input.
December 9th, 2013, 05:24 PM
In my view the all-time best book in this category is the C++ Coding Standards by Sutter & Alexandrescu. Both authors are prominent C++ experts. The structure is 101 best practice rules. The prose is...
December 9th, 2013, 08:32 AM
December 9th, 2013, 07:58 AM
What is this "adjusting" you have to do?
December 5th, 2013, 10:32 PM
I know that and I said so. Still my solution gives a much smaller hash table and is much easier to parallelize, and that's not too bad.
I've given this another thought and considered sorting of...
November 30th, 2013, 06:59 PM
Well, Gosper 175 is also described in a much more accessible book called Hackers Delight (pages 14-15) by H.S Warren. I can recommend it very much for concrete low-level coding of high-level...
November 30th, 2013, 08:12 AM
And I'm certain there is. A quick search on the net and this came up,
It's a Dr Dobbs article with several source codes.
November 30th, 2013, 06:18 AM
When you do low-level processing of bitfields there's not much of a choise.
But it's tedious and error-prone so if you don't have to do it yourself it's much better to use existing code. I would...
November 30th, 2013, 03:04 AM
Say you instead insert the C values into the hash table. Then you generate the A+B sums in a pair of nested loops and check which sums are in the table. That's also O(n^2) but with a much smaller...
November 30th, 2013, 01:38 AM
3 times 8 bits equals 2 times 12 bits.
November 29th, 2013, 06:54 PM
This is the same as finding all subsets with 3 members of a set of 5 members. Or more general to find all K-subsets of an N-set.
There's a very efficient way to do this that's a well kept secret...
November 29th, 2013, 06:19 PM
The objects of a class don't store function code. This code is stored in one common place and is then shared by all objects. The objects store things that are specific for each object such as...
November 29th, 2013, 11:45 AM
Why don't you just read the pdf file as a sequence of bytes (in binary mode) and store the result in a byte array?
November 27th, 2013, 10:32 AM
November 27th, 2013, 02:07 AM
I suggest you have a look at a small simple and cheap computer called Raspberry PI:
November 27th, 2013, 01:52 AM
You need to become familiar with cross-compiling and bootstrapping.
This is a start.
November 26th, 2013, 03:41 AM
Most important for maximum portability is that you use C++ standard features only. No compiler specific extensions or libraries. And even so stick to "plain" C++. No exotic features. And I would...
November 25th, 2013, 12:29 AM
You don't have to store all triangle sizes, just the biggest so far when you iterate over the 10 combinations.
November 18th, 2013, 11:10 AM
There may be two reasons for that. First, shouldn't the w variable start from 0 in each iteration of z? Otherwise you're not comparing the current code with all codes already in the array.
November 14th, 2013, 12:58 PM
I learned two languages by replying to questions on forums. First Java and now C++. But at the same time I got quite addicted. I think it's the same mechanism that causes everybody to fiddle with...
November 12th, 2013, 08:34 PM
Yes it's obviously much better if you think before you ask.
But instead of asking detail questions about solutions you have in mind why not simply reveal up front what it is you want to...
November 12th, 2013, 07:46 PM
Physicists pondered that deep within.
Mass is created by Higgs boson spin.
But then they found.
That on solid ground.
Gravitation is simply Morena Baccarin!
November 12th, 2013, 06:15 PM
The quick and dirty way is to convert the list into an array which is then sorted using a standard array sorting algorithm. Then a new list is built from the sorted array and the old list is deleted....
Click Here to Expand Forum to Full Width