Skip to content

Commit

Permalink
Summed Area Table barryclark#6
Browse files Browse the repository at this point in the history
  • Loading branch information
kilinco committed Sep 10, 2021
2 parents 70a4cda + c1e9582 commit af59c54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _posts/2021-09-13-summed-area-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In order to query the sum of a submatrix, we first need to define it. The submat

Suppose that we can only query this interface for *(x,y)* which then would return the sum of the submatrix defined by *(0,0)* and *(x,y)*. How can we use this method to calculate the submatrix defined by *(x_low,y_low)* and *(x_high,y_high)*? The answer becomes apparent when you draw and visualize the problem...

[Summed Area Table](/_data/summed-area-table-1.gif)
![Summed Area Table](https://raw.githubusercontent.com/kilinco/kilinco.github.io/master/_data/summed-area-table-1.gif)

{% highlight cpp %}
// returns the sum of all elements in submatrix defined by x_low = 0, y_low = 0, x_high = x & y_high = y
Expand Down

0 comments on commit af59c54

Please sign in to comment.