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

10
LINES

< > BotCompany Repo | #1033649 // bitMatrixToQuadTree

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

Transpiled version (5815L) is out of date.

1  
static QuadTreeBitMatrix bitMatrixToQuadTree(BitMatrix m) {
2  
  int w = m.getWidth(), h = m.getHeight();
3  
  QuadTreeBitMatrix qt = new(w, h);
4  
5  
  for y to h:
6  
    for x to w:
7  
      if (m.get(x, y))
8  
        qt.set(x, y);
9  
  ret qt;
10  
}

Author comment

Began life as a copy of #1033642

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033649
Snippet name: bitMatrixToQuadTree
Eternal ID of this version: #1033649/5
Text MD5: 24910f1d7081610f6ae3a22a4ec75e67
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-12-25 22:59:07
Source code size: 235 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 181 / 254
Version history: 4 change(s)
Referenced in: [show references]