-
Notifications
You must be signed in to change notification settings - Fork 62
Enhance matrices.md with formulas and pseudocode #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the matrices.md documentation by adding comprehensive mathematical formulas and pseudocode implementations for matrix operations. The goal is to provide both theoretical foundations and practical algorithmic guidance for developers working with matrix transformations.
Key changes include:
- Added mathematical formulas for all matrix operations (transpose, flips, rotations, traversals)
- Included detailed pseudocode implementations with loop structures and indexing
- Enhanced explanations for complex operations like layer-by-layer rotation and word search algorithms
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
notes/matrices.md
Outdated
| t=\ell,\quad b=R-1-\ell,\quad \ellft=\ell,\quad rgt=C-1-\ell . | ||
| $$ | ||
|
|
||
| Visit, in order: | ||
|
|
||
| * Top edge: $(t,c)$ for $c=\ellft,\ldots,rgt$. | ||
| * Right edge: $(r,rgt)$ for $r=t+1,\ldots,b$. | ||
| * Bottom edge (if $b>t$): $(b,c)$ for $c=rgt-1,\ldots,\ellft$ (decreasing). | ||
| * Left edge (if $rgt>\ellft$): $(r,\ellft)$ for $r=b-1,\ldots,t+1$ (decreasing). |
Copilot
AI
Sep 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable \\ellft is used consistently but appears to be a typo. It should be left or \\ell_t to match standard mathematical notation and the corresponding rgt variable.
| t=\ell,\quad b=R-1-\ell,\quad \ellft=\ell,\quad rgt=C-1-\ell . | |
| $$ | |
| Visit, in order: | |
| * Top edge: $(t,c)$ for $c=\ellft,\ldots,rgt$. | |
| * Right edge: $(r,rgt)$ for $r=t+1,\ldots,b$. | |
| * Bottom edge (if $b>t$): $(b,c)$ for $c=rgt-1,\ldots,\ellft$ (decreasing). | |
| * Left edge (if $rgt>\ellft$): $(r,\ellft)$ for $r=b-1,\ldots,t+1$ (decreasing). | |
| t=\ell,\quad b=R-1-\ell,\quad left=\ell,\quad rgt=C-1-\ell . | |
| $$ | |
| Visit, in order: | |
| * Top edge: $(t,c)$ for $c=left,\ldots,rgt$. | |
| * Right edge: $(r,rgt)$ for $r=t+1,\ldots,b$. | |
| * Bottom edge (if $b>t$): $(b,c)$ for $c=rgt-1,\ldots,left$ (decreasing). | |
| * Left edge (if $rgt>left$): $(r,left)$ for $r=b-1,\ldots,t+1$ (decreasing). |
notes/matrices.md
Outdated
| t=\ell,\quad b=R-1-\ell,\quad \ellft=\ell,\quad rgt=C-1-\ell . | ||
| $$ | ||
|
|
||
| Visit, in order: | ||
|
|
||
| * Top edge: $(t,c)$ for $c=\ellft,\ldots,rgt$. | ||
| * Right edge: $(r,rgt)$ for $r=t+1,\ldots,b$. | ||
| * Bottom edge (if $b>t$): $(b,c)$ for $c=rgt-1,\ldots,\ellft$ (decreasing). | ||
| * Left edge (if $rgt>\ellft$): $(r,\ellft)$ for $r=b-1,\ldots,t+1$ (decreasing). |
Copilot
AI
Sep 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable \\ellft is used consistently but appears to be a typo. It should be left or \\ell_t to match standard mathematical notation and the corresponding rgt variable.
| t=\ell,\quad b=R-1-\ell,\quad \ellft=\ell,\quad rgt=C-1-\ell . | |
| $$ | |
| Visit, in order: | |
| * Top edge: $(t,c)$ for $c=\ellft,\ldots,rgt$. | |
| * Right edge: $(r,rgt)$ for $r=t+1,\ldots,b$. | |
| * Bottom edge (if $b>t$): $(b,c)$ for $c=rgt-1,\ldots,\ellft$ (decreasing). | |
| * Left edge (if $rgt>\ellft$): $(r,\ellft)$ for $r=b-1,\ldots,t+1$ (decreasing). | |
| t=\ell,\quad b=R-1-\ell,\quad left=\ell,\quad rgt=C-1-\ell . | |
| $$ | |
| Visit, in order: | |
| * Top edge: $(t,c)$ for $c=left,\ldots,rgt$. | |
| * Right edge: $(r,rgt)$ for $r=t+1,\ldots,b$. | |
| * Bottom edge (if $b>t$): $(b,c)$ for $c=rgt-1,\ldots,left$ (decreasing). | |
| * Left edge (if $rgt>left$): $(r,left)$ for $r=b-1,\ldots,t+1$ (decreasing). |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
notes/matrices.md:518
- Extra space before the opening bracket in the mathematical notation. Should be
$[\ell..n-1-\ell]$without the space.
For layer $\ell$ with bounds $ [\ell..n-1-\ell]$, for each offset move:
notes/matrices.md:881
- Extra space in the interval notation. Should be
$b\in[3,4]$without the space after the opening bracket.
* Time: up to $O(R\cdot C\cdot b^{L})$ (branching $b\in [3,4]$, word length $L$)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
No description provided.