| 837 | typedef double value_type; |
| 838 | |
| 839 | value_type factor_value(unsigned long idx) const |
| 840 | { |
| 841 | // Copy idx into a char buffer to avoid warnings about violation of strict aliasing |
| 842 | // rules when murmur_hash3() gets inlined into this function. |
| 843 | char buf[sizeof(idx)]; |
| 844 | memcpy(buf,&idx,sizeof(idx)); |
| 845 | // now hash the buffer rather than idx. |
| 846 | return ((double)murmur_hash3(buf, sizeof(buf), seed) - std::numeric_limits<uint32>::max()/2.0)/1000.0; |
| 847 | } |
| 848 | |
| 849 | value_type factor_value_disagreement(unsigned long idx1, unsigned long idx2) const |
| 850 | { |
nothing calls this directly
no test coverage detected