DMatrix

行列ライブラリ(Mod2)

  1. struct SMatrixMod2(size_t H, size_t W)
  2. struct DMatrix(T)
    struct DMatrix (
    T
    ) {
    size_t h;
    size_t w;
    T[] data;
    }

Examples

import dkh.numeric.primitive;
auto mat = DMatrix!int(2, 2, [0, 1, 1, 1]);
assert(pow(mat, 10, DMatrix!int(2, 2, [1, 0, 0, 1]))[0, 0] == 34); //Fib_10

Meta