[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: deleting rows from sparse matrices leads to seg fault sometimes
From: |
Lev |
Subject: |
Re: deleting rows from sparse matrices leads to seg fault sometimes |
Date: |
Thu, 14 Jun 2012 06:00:34 -0700 (PDT) |
I have a code (using octave 3.6.1) by which one can debug it in depth.
call it as
supportThreshold( 3,10, sparse(rand(1000,1000)>0.99) );
it will segfault.
If you have doubt, you may load a constellation by uncommenting the load
function call
and download aa.dat from http://justpaste.it/octaveSegfault
/
function uis = supportThreshold( userMinSupport , itemMinSupport , uis )
% load aa.dat
for i=1:10
s=size(uis)
user_event_count = sum(uis,2);
inx=find(user_event_count<userMinSupport);
length(inx)
uis(inx,:)=[];
item_event_count = sum(uis);
inx = find(item_event_count<itemMinSupport);
length(inx)
uis(:,inx)=[];
if all(s==size(uis))
break;
endif
end
end
</i>
--
View this message in context:
http://octave.1599824.n4.nabble.com/deleting-rows-from-sparse-matrices-leads-to-seg-fault-sometimes-tp4630740p4630741.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.