Fastest code C/C++ to select the median in a set of 27 floating point values

后端 未结 15 1179
梦谈多话
梦谈多话 2020-12-07 09:24

This is the well know select algorithm. see http://en.wikipedia.org/wiki/Selection_algorithm.

I need it to find the median value of a set of 3x3x3 voxel values. Sinc

15条回答
  •  悲&欢浪女
    2020-12-07 09:58

    I'm betting that you could calculate them for zero cost - in a separate thread while loading from disk (or however they're generated).

    What I'm really saying is that 'speed' isn't going to come from bit twiddling because 27 values isn't enough for Big O notation to be a real factor.

提交回复
热议问题