Instead of trying to be clever with swaps and lazy updating the weight data, simply recalculate one single array. To improve performance, use threading for that.
Instead of trying to be clever with swaps and lazy updating the weight data, simply recalculate one single array. To improve performance, use threading for that.