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

11
LINES

< > BotCompany Repo | #1033651 // matricesDifferingPoints - give all differing points

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

Libraryless. Click here for Pure Java version (5217L/29K).

1  
static <A> L<Pt> matricesDifferingPoints(Matrix<A> a, Matrix<A> b) {
2  
  if (a == null || b == null) null;
3  
  assertSameSize(a, b);
4  
  int w = a.getWidth(), h = a.getHeight();
5  
  new L<Pt> l;
6  
  for y to h:
7  
    for x to w:
8  
      if (!eq(a.get(x, y), b.get(x, y)))
9  
        l.add(pt(x, y));
10  
  ret l;
11  
}

Author comment

Began life as a copy of #1033650

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033651
Snippet name: matricesDifferingPoints - give all differing points
Eternal ID of this version: #1033651/1
Text MD5: 186fc9615ad0ab248b7151645a09bcac
Transpilation MD5: ad0fa0d0ef44785369401a1a7d38d533
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:53:35
Source code size: 303 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 54 / 104
Referenced in: [show references]