numerics

C++, is linking order standardized?

On my linux box, I have 2 libraries: libfoo1.a and libfoo2.a and they both contain an implementation of void foo(int) and my main program calls foo: int main() { foo(1); return 0; } I compiled the program two ways using g++ g++ main.cpp libfoo1.a libfoo2.a -o a1.out g++ main.cpp libfoo2.a libfoo1.a -o a2.out When I run the ...

Polymorphic Numerics on .Net and In C#

It's a real shame that in .Net there is no polymorphism for numbers, i.e. no INumeric interface that unifies the different kinds of numerical types such as bool, byte, uint, int, etc. In the extreme one would like a complete package of abstract algebra types. Joe Duffy has an article about the issue: http://www.bluebytesoftware.com/blo...

What's the future of std::valarray look like?

Up until fairly recently I hadn't been keeping up with the C++0x deliberations. As I try to become more familiar with it and the issues being worked, I came across this site which seems to be advocating for deprecating or removing std::valarray since most people are using Blitz++ instead. I guess I'm probably one of the few people out ...

Public Domain or No Binary Attribution FFT Lib?

I'm looking for an FFT library to translate into the D programming language for inclusion either in a library that I'm working on or (better yet) in the standard library. I need a fairly simple FFT with decent performance, not an uber-optimized one with blazing fast performance and zero simplicity/readability. However, it must meet the...

matlab cell2mat( ... ) function with cell array having a bunch of sparse matrices overflows memory unexpectedly

I get strange behavior with respect to memory with Matlab and the cell2mat() function... what I would like to do is: cell_array_outer = cell(1,N) parfor k = 1:N cell_array_inner = cell(1,M); for i = 1:M A = do_some_math_and_return_a_sparse_matrix( ); cell_array_inner{i} = sparse(A); % do sparse() again just to be parano...