Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1025185 // boostHashCombine - hash value combine function from BOOST library

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (32L/1K).

static int boostHashCombine(int a, int b) {
  ret a ^ (b + 0x9e3779b9 + (a << 6) + (a >>> 2));
  
  // OLD (changed) 2022/3/10: ret a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025185
Snippet name: boostHashCombine - hash value combine function from BOOST library
Eternal ID of this version: #1025185/2
Text MD5: 76cb69ed39c9bb091bffc0cb632cbba8
Transpilation MD5: 194c7e4fe3075cbe5fd9cf5164ff71ca
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-10 18:02:30
Source code size: 181 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 325 / 549
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1034797 - boostHashCombine64 - simple analog of boostHashCombine for 64 bit (not sure how good it is)