Hot answers tagged

6 votes
Accepted

What language are best for creating data compression algorithms except for C/C++?

In my general experience, the following are required in order to get "reasonable" performance from a programming language: The ability to specify static types. It's OK if the language also ...
helloworld922's user avatar
6 votes
Accepted

Inefficient comparisons of custom data type C++

Why not this, which avoids the inequality comparison before the less-than altogether: ...
Wolfgang Bangerth's user avatar
3 votes

Inefficient comparisons of custom data type C++

Wolfgang's answer is probably the best one, because its almost guaranteed to not screw up in unpredictable ways, and the intent couldn't be more clear. That said... If the 8 bit integers are unsigned, ...
Charlie S's user avatar
  • 661
2 votes

Inefficient comparisons of custom data type C++

I think it would be faster to assemble a 32-bits integer for each operands and compare them, as you initially intended. It will be equivalent to what you did "by hand". If numbers stored in ...
BrunoLevy's user avatar
  • 2,285
2 votes
Accepted

Assign and print the results of CHOLMOD package

Cholmod is a bit old-fashioned in that the data arrays are void*, which could be anything. However, you know that the type is ...
Charlie S's user avatar
  • 661
1 vote
Accepted

How to initialize Eigen C++ parameters within for-loop?

You used Eigen::MatrixXd::Zero for initialising BetaH. Why not follow the same for initialising the variables inside the loop?
Chenna K's user avatar
  • 845
1 vote

Analyzing Numerical Error in C++ Function

@Pedro mentioned running error analysis and introduced the math for propagating error while accounting for unit roundoff. They also gave a Matlab/Octave implementation. @plasmacel noticed that in this ...
olta's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible