4 ms·
I wonder whether adding a brace for each row would clarify the notation, by more closely resembling a single multi-line brace: A_ij = { 1 if (i,j) ∈ E
by jamessb 4y ago
I wonder whether adding a brace for each row would clarify the notation, by more closely resembling a single multi-line brace:
A_ij = { 1 if (i,j) ∈ E
{ 0 otherwise
where
A ∈ ℝ^(n × n)
E ∈ { ℤ × ℤ }
n ∈ ℤ
- xigoi 4y agoIf they want it to look like actual math notation, they might as well: A_ij = ⎰ 1 if (i,j) ∈ E ⎱ 0 otherwise where A ∈ ℝ^(n × n) E ∈ { ℤ × ℤ } n ∈ ℤ
- yig 4y agoUnicode actually has semantic symbols that could be used for a nicer 2D monospaced layout here, such as ⎧ ⎪ ⎨ ⎩ ( (LEFT CURLY BRACKET UPPER HOOK, MIDDLE PIECE, LOWER HOOK, and CURLY BRACKET EXTENSION). With more conditional rows, you could use these. One downside is that you would have to do a 2D parse, since the = wouldn't be on the first line. We've been loath to go there. It also seems painful as a user to have to type all the right bracket symbols in all the right places. We do support the Unicode ⎡|⎦ symbols for matrices. The grammar is that a matrix starts with either [ or ⎡ and ends with either ] or ⎦. Rows can be optionally surrounded by |. I find this too cumbersome to use myself.
- yig 4y agoI like this. I created a GitHub issue: https://github.com/iheartla/iheartla/issues/138 https://github.com/iheartla/iheartla/issues/138