Software > Software

check which cells are covered by robot

<< < (2/2)

Thanks a lot for the reply. Finally I have to get into vectors. So far I avoided it. :-) Therefore I didn’t completely understand your reply yet.

My approach indeed is wasteful. The over-sampling is needed with my approach – as you stated. In this case it is “only” wasting CPU power. IN other cases, where I calculate probability I had to keep track of already updated cells in a separate array to prevent double processing.

„You also leak the things allocated with new[] at the end of your function.”
I fully trust (well I don’t  :P ) on java’s garbage collection with this one.

Trying to dig into vectors now …


In Java the only cost of those additional allocs is higher than necessary garbage collector pressure.


[0] Message Index

[*] Previous page

Go to full version