an element of heap
| 15 | |
| 16 | // an element of heap |
| 17 | struct PointInfo |
| 18 | { |
| 19 | /// sum of squared distances to the closest neighbors and to nearby removed (not-sampled) points |
| 20 | float sumDistSq; |
| 21 | |
| 22 | // points with minimal sum of distances are first removed from samples |
| 23 | bool operator <( const PointInfo & b ) const { return sumDistSq > b.sumDistSq; } |
| 24 | |
| 25 | explicit PointInfo( NoInit ) noexcept {} |
| 26 | |
| 27 | // invalid info, last in heap |
| 28 | PointInfo() : sumDistSq( FLT_MAX ) {} |
| 29 | }; |
| 30 | |
| 31 | } //anonymous namespace |
| 32 |
no outgoing calls
no test coverage detected