We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4779aaf commit 10068d1Copy full SHA for 10068d1
notes/matrices.md
@@ -38,9 +38,9 @@ Handy conversions (for linearization / array-of-arrays):
38
```
39
Row-major (r, then c): Column-major (c, then r):
40
→ → → → → → ↓ ↓ ↓
41
-↓ ↓ ↓ ↓ ↓
+ ↓ ↓ ↓ ↓
42
← ← ← ← ← ← ↓ ↓ ↓
43
+↓ ↓ ↓ ↓
44
45
46
@@ -51,6 +51,7 @@ The offsets $(\Delta r,\Delta c)$ are applied as $(r+\Delta r,\ c+\Delta c)$.
51
**4-neighborhood (“+”):**
52
53
54
+#
55
(r-1,c)
56
↑
57
(r,c-1) ← (r,c) → (r,c+1)
@@ -61,13 +62,13 @@ The offsets $(\Delta r,\Delta c)$ are applied as $(r+\Delta r,\ c+\Delta c)$.
61
62
**8-neighborhood (“×” adds diagonals):**
63
64
- (r-1,c-1) (r-1,c) (r-1,c+1)
65
- \ ↑ /
66
- \ │ /
67
- (r,c-1) ←——— (r,c) ———→ (r,c+1)
68
- / │ \
69
- / ↓ \
70
- (r+1,c-1) (r+1,c) (r+1,c+1)
+(r-1,c-1) (r-1,c) (r-1,c+1)
+ \ ↑ /
+ \ │ /
+(r,c-1) ←——— (r,c) ———→ (r,c+1)
+ / │ \
+ / ↓ \
71
+(r+1,c-1) (r+1,c) (r+1,c+1)
72
73
74
Typical direction arrays (keep them consistent to avoid bugs):
0 commit comments