Tensorex.triangular-question-mark

You're seeing just the function triangular-question-mark, go back to Tensorex module for more information.

Specs

triangular?(t()) :: boolean()

Checks if the given tensor is upper triangular or not.

iex> Tensorex.triangular?(Tensorex.from_list([[2, 1,  3],
...>                                          [0, 3,  6],
...>                                          [0, 0, -9]]))
true

iex> Tensorex.triangular?(Tensorex.from_list([[2, 0,  0],
...>                                          [0, 3,  0],
...>                                          [3, 0, -9]]))
false

iex> Tensorex.triangular?(Tensorex.from_list([[[2,  5], [0,  1]],
...>                                          [[0,  0], [0, -2]],
...>                                          [[0,  0], [0,  0]]]))
true

iex> Tensorex.triangular?(Tensorex.from_list([[[2,  5], [0,  1]],
...>                                          [[6,  0], [0, -2]],
...>                                          [[0,  0], [0,  0]]]))
false