diff options
author | Sean E. Russell <ser@ser1.net> | 2020-02-27 15:44:45 -0600 |
---|---|---|
committer | Sean E. Russell <ser@ser1.net> | 2020-02-27 15:44:45 -0600 |
commit | a5b039cd923270683a777c7e3851116076a663e9 (patch) | |
tree | 7231957ec8e51170c06fa2b992d19518daffdf56 /docs/grid-fill.md | |
parent | b03566cd60335f9941b0dc0af011d649953db16e (diff) |
Adding some dev docs.
Diffstat (limited to 'docs/grid-fill.md')
-rw-r--r-- | docs/grid-fill.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/docs/grid-fill.md b/docs/grid-fill.md new file mode 100644 index 0000000..554b524 --- /dev/null +++ b/docs/grid-fill.md @@ -0,0 +1,42 @@ +T is max height in row +S(T) is all widgets with height T +R(T) is all widgets with height < T +X is len(R) > 0 ? 1 : 0 +C is len(S) + X +Make row +Make C columns +Place S +Recurse with R; place result + + + 1 2 3 4 5 +cpu/2............... mem/1. 6:procs/2.......... +3:temp/1. 2:disk/2......... |.................. +|........ |................ |.................. +|........ power/2.......... |.................. +net/2............... batt.. |.................. + + 1 2 3 4 5 +cpu/2............... 6:procs/2........ mem/1... +2:disk/2............ |................ 3:temp/1 +|................... |................ |....... +power/2............. |................ |....... +net/2............... |................ batt + + 1 2 3 4 5 +1x2................. 3x2.............. 1x1..... 221 221 +2x2................. ||||||||||||||||| 3x1..... 21 2x1 +|||||||||||||||||||| ||||||||||||||||| |||||||| +1x1...... 1x1...... 1x2.............. 1x1..... 1121 +1x2................. 1x2.............. |||||||| 22 22x +1x1...... 1x4................................... 14 + +initial columns = initial row +fill + pattern for row + does pattern fit columns? + yes: place widgets + no: new row w/ new columns; fill + +does fit + cw < patt_c_w |