Registered Member
|
Hi,
I'm trying to implement mean(). In Redux.h, it works:
In PartialRedux.h, however, this code gives a segfault...
Can anybody point me in the right direction? I've got no idea what I'm doing wrong. Thanks!
Last edited by marton on Wed Apr 29, 2009 5:39 pm, edited 1 time in total.
|
Moderator
|
this is because you return a temporary by reference. here is the fix:
btw, one of the TODO item is a Statistic module where the goal would be to have such {matrix,column,row}-wise functions, just in case you are interested in starting it |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell