Replace the O(n^2) median algorithm with an O(n) one.
Replace the O(n^2) median algorithm with an O(n) one.

The std::nth_element() algorithm fits this like a glove.

jmerkow/VTK,SimVascular/VTK,demarle/VTK,keithroe/vtkoptix,demarle/VTK,keithroe/vtkoptix,candy7393/VTK,gram526/VTK,SimVascular/VTK,demarle/VTK,msmolens/VTK,sumedhasingla/VTK,SimVascular/VTK,sankhesh/VTK,gram526/VTK,mspark93/VTK,keithroe/vtkoptix,msmolens/VTK,jmerkow/VTK,jmerkow/VTK,jmerkow/VTK,candy7393/VTK,demarle/VTK,sankhesh/VTK,sankhesh/VTK,candy7393/VTK,demarle/VTK,mspark93/VTK,sankhesh/VTK,candy7393/VTK,keithroe/vtkoptix,gram526/VTK,mspark93/VTK,demarle/VTK,SimVascular/VTK,SimVascular/VTK,gram526/VTK,sankhesh/VTK,keithroe/vtkoptix,SimVascular/VTK,msmolens/VTK,demarle/VTK,gram526/VTK,sumedhasingla/VTK,candy7393/VTK,sumedhasingla/VTK,sankhesh/VTK,mspark93/VTK,sumedhasingla/VTK,keithroe/vtkoptix,mspark93/VTK,SimVascular/VTK,msmolens/VTK,sumedhasingla/VTK,msmolens/VTK,msmolens/VTK,candy7393/VTK,keithroe/vtkoptix,mspark93/VTK,jmerkow/VTK,candy7393/VTK,gram526/VTK,SimVascular/VTK,sankhesh/VTK,keithroe/vtkoptix,sumedhasingla/VTK,msmolens/VTK,sumedhasingla/VTK,msmolens/VTK,sumedhasingla/VTK,mspark93/VTK,demarle/VTK,gram526/VTK,gram526/VTK,mspark93/VTK,jmerkow/VTK,jmerkow/VTK,sankhesh/VTK,candy7393/VTK,jmerkow/VTK