Janis Strautins wrote:I can't see where the possible error is, any help would be greatly appreciated.
Well, I hate to say, but the minute I see anything like:
if(clusterList.get(k).matrix.get(i).distances.get(j).value>max.value) ...
my brain just shuts down.
My suggestion: refactor your code to rationalise all these horrible method chains. You (and we) will be in a much better position to then read your code and
understand what it's trying to do.
PS:
DontWriteLongLines (←click). I've tried to break yours up as best I can, but you're hamstringing yourself by
(a) Aggressive indentation. (Tip: DON'T use tabs).
(b) The number of layers you're handling at a time.
Winston