isSymmetric

Checks if the matrix is symmetric.

  1. bool isSymmetric(Slice!(Iterator, 2, kind) matrix)
    template isSymmetric(alias fun = "a == b")
    @optmath
    static if(__traits(isSame, naryFun!fun, fun))
    bool
    isSymmetric
    (
    Iterator
    SliceKind kind
    )
    (
    Slice!(Iterator, 2, kind) matrix
    )
  2. alias isSymmetric = .isSymmetric!(naryFun!fun)

Members

Aliases

isSymmetric
alias isSymmetric = .isSymmetric!(naryFun!fun)
Undocumented in source.

Functions

isSymmetric
bool isSymmetric(Slice!(Iterator, 2, kind) matrix)

Examples

import mir.ndslice.slice: sliced;
import mir.ndslice.topology: iota;
assert(iota(2, 2).isSymmetric == false);

assert(
    [1, 2,
     2, 3].sliced(2, 2).isSymmetric == true);

Meta