src/cplib/matrix/static_matrix

    Dark Mode
Search:
Group by:
  Source   Edit

Types

StaticMatrix[H; W; T] = object
  arr: array[H * W, T]
  Source   Edit
SubArray[H; W; T] = object
  mat: ref StaticMatrix[H, W, T]
  idx: int
  Source   Edit

Procs

proc `$`[H: static int; W: static int; T](m: StaticMatrix[H, W, T]): string
  Source   Edit
proc `**`[H: static int; W: static int; T](m: StaticMatrix[H, W, T]; n: int): StaticMatrix[
    H, W, T]
  Source   Edit
proc `*=`[H: static int; W: static int; T](a: var StaticMatrix[H, W, T];
    b: StaticMatrix[W, W, T])
  Source   Edit
proc `*=`[H: static int; W: static int; T](a: var StaticMatrix[H, W, T]; x: T)
  Source   Edit
proc `*`[A: static int; B: static int; C: static int; T](
    a: StaticMatrix[A, B, T]; b: StaticMatrix[B, C, T]): StaticMatrix[A, C, T]
  Source   Edit
proc `*`[H: static int; W: static int; T](a: StaticMatrix[H, W, T]; x: T): StaticMatrix[
    H, W, T]
  Source   Edit
proc `*`[H: static int; W: static int; T](x: T; a: StaticMatrix[H, W, T]): StaticMatrix[
    H, W, T]
  Source   Edit
proc `+=`[H: static int; W: static int; T](
    a`gensym2: var StaticMatrix[H, W, T]; b`gensym2: StaticMatrix[H, W, T])
  Source   Edit
proc `+=`[H: static int; W: static int; T](
    a`gensym2: var StaticMatrix[H, W, T]; x`gensym2: T)
  Source   Edit
proc `+`[H: static int; W: static int; T](
    a`gensym2, b`gensym2: StaticMatrix[H, W, T]): StaticMatrix[H, W, T]
  Source   Edit
proc `+`[H: static int; W: static int; T](a`gensym2: StaticMatrix[H, W, T];
    x`gensym2: T): StaticMatrix[H, W, T]
  Source   Edit
proc `+`[H: static int; W: static int; T](x`gensym2: T;
    a`gensym2: StaticMatrix[H, W, T]): StaticMatrix[H, W, T]
  Source   Edit
proc `-=`[H: static int; W: static int; T](
    a`gensym3: var StaticMatrix[H, W, T]; b`gensym3: StaticMatrix[H, W, T])
  Source   Edit
proc `-=`[H: static int; W: static int; T](
    a`gensym3: var StaticMatrix[H, W, T]; x`gensym3: T)
  Source   Edit
proc `-`[H: static int; W: static int; T](
    a`gensym3, b`gensym3: StaticMatrix[H, W, T]): StaticMatrix[H, W, T]
  Source   Edit
proc `-`[H: static int; W: static int; T](a`gensym3: StaticMatrix[H, W, T];
    x`gensym3: T): StaticMatrix[H, W, T]
  Source   Edit
proc `-`[H: static int; W: static int; T](m: StaticMatrix[H, W, T]): StaticMatrix[
    H, W, T]
  Source   Edit
proc `-`[H: static int; W: static int; T](x`gensym3: T;
    a`gensym3: StaticMatrix[H, W, T]): StaticMatrix[H, W, T]
  Source   Edit
proc `==`[H: static int; W: static int; T](a, b: StaticMatrix[H, W, T]): bool
  Source   Edit
proc `[]=`[H: static int; W: static int; T](m: var StaticMatrix[H, W, T];
    r: int; c: int; val: T)
  Source   Edit
proc `[]=`[H: static int; W: static int; T](m: var StaticMatrix[H, W, T];
    r: int; row: array[W, T])
  Source   Edit
proc `[]`[H: static int; W: static int; T](m: StaticMatrix[H, W, T]; r: int): array[
    W, T]
  Source   Edit
proc `[]`[H: static int; W: static int; T](m: StaticMatrix[H, W, T]; r: int;
    c: int): T
  Source   Edit
proc `[]`[H: static int; W: static int; T](m: var StaticMatrix[H, W, T]; r: int;
    c: int): var T
  Source   Edit
proc `and`[H: static int; W: static int](
    a`gensym4, b`gensym4: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `and`[H: static int; W: static int](a`gensym4: StaticMatrix[H, W, int];
    x`gensym4: int): StaticMatrix[H, W, int]
  Source   Edit
proc `and`[H: static int; W: static int](x`gensym4: int;
    a`gensym4: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `div`[H: static int; W: static int](
    a`gensym9, b`gensym9: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `div`[H: static int; W: static int](a`gensym9: StaticMatrix[H, W, int];
    x`gensym9: int): StaticMatrix[H, W, int]
  Source   Edit
proc `div`[H: static int; W: static int](x`gensym9: int;
    a`gensym9: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `mod`[H: static int; W: static int](
    a`gensym10, b`gensym10: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `mod`[H: static int; W: static int](
    a`gensym10: StaticMatrix[H, W, int]; x`gensym10: int): StaticMatrix[H, W,
    int]
  Source   Edit
proc `mod`[H: static int; W: static int](x`gensym10: int;
    a`gensym10: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `or`[H: static int; W: static int](a`gensym5, b`gensym5: StaticMatrix[H, W,
    int]): StaticMatrix[H, W, int]
  Source   Edit
proc `or`[H: static int; W: static int](a`gensym5: StaticMatrix[H, W, int];
                                        x`gensym5: int): StaticMatrix[H, W, int]
  Source   Edit
proc `or`[H: static int; W: static int](x`gensym5: int;
                                        a`gensym5: StaticMatrix[H, W, int]): StaticMatrix[
    H, W, int]
  Source   Edit
proc `shl`[H: static int; W: static int](
    a`gensym7, b`gensym7: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `shl`[H: static int; W: static int](a`gensym7: StaticMatrix[H, W, int];
    x`gensym7: int): StaticMatrix[H, W, int]
  Source   Edit
proc `shl`[H: static int; W: static int](x`gensym7: int;
    a`gensym7: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `shr`[H: static int; W: static int](
    a`gensym8, b`gensym8: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `shr`[H: static int; W: static int](a`gensym8: StaticMatrix[H, W, int];
    x`gensym8: int): StaticMatrix[H, W, int]
  Source   Edit
proc `shr`[H: static int; W: static int](x`gensym8: int;
    a`gensym8: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `xor`[H: static int; W: static int](
    a`gensym6, b`gensym6: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc `xor`[H: static int; W: static int](a`gensym6: StaticMatrix[H, W, int];
    x`gensym6: int): StaticMatrix[H, W, int]
  Source   Edit
proc `xor`[H: static int; W: static int](x`gensym6: int;
    a`gensym6: StaticMatrix[H, W, int]): StaticMatrix[H, W, int]
  Source   Edit
proc and=[H: static int; W: static int](a`gensym4: var StaticMatrix[H, W, int];
                                        b`gensym4: StaticMatrix[H, W, int])
  Source   Edit
proc and=[H: static int; W: static int](a`gensym4: var StaticMatrix[H, W, int];
                                        x`gensym4: int)
  Source   Edit
proc div=[H: static int; W: static int](a`gensym9: var StaticMatrix[H, W, int];
                                        b`gensym9: StaticMatrix[H, W, int])
  Source   Edit
proc div=[H: static int; W: static int](a`gensym9: var StaticMatrix[H, W, int];
                                        x`gensym9: int)
  Source   Edit
proc h[H: static int; W: static int; T](m: StaticMatrix[H, W, T]): int
  Source   Edit
proc hash[H: static int; W: static int; T](m: StaticMatrix[H, W, T]): Hash
  Source   Edit
proc identity_matrix[H: static int; W: static int; T](n: int): StaticMatrix[H,
    W, T]
  Source   Edit
proc identity_matrix[H: static int; W: static int; T](n: int; one, zero: T): StaticMatrix[
    H, W, T]
  Source   Edit
proc initMatrix[H: static int; W: static int; T](arr: array[H, array[W, T]]): StaticMatrix[
    H, W, T]
  Source   Edit
proc initMatrix[H: static int; W: static int; T](val: T): StaticMatrix[H, W, T]
  Source   Edit
proc mod=[H: static int; W: static int](a`gensym10: var StaticMatrix[H, W, int];
                                        b`gensym10: StaticMatrix[H, W, int])
  Source   Edit
proc mod=[H: static int; W: static int](a`gensym10: var StaticMatrix[H, W, int];
                                        x`gensym10: int)
  Source   Edit
proc or=[H: static int; W: static int](a`gensym5: var StaticMatrix[H, W, int];
                                       b`gensym5: StaticMatrix[H, W, int])
  Source   Edit
proc or=[H: static int; W: static int](a`gensym5: var StaticMatrix[H, W, int];
                                       x`gensym5: int)
  Source   Edit
proc pow[H: static int; W: static int; T](m: StaticMatrix[H, W, T]; n: int): StaticMatrix[
    H, W, T]
  Source   Edit
proc shl=[H: static int; W: static int](a`gensym7: var StaticMatrix[H, W, int];
                                        b`gensym7: StaticMatrix[H, W, int])
  Source   Edit
proc shl=[H: static int; W: static int](a`gensym7: var StaticMatrix[H, W, int];
                                        x`gensym7: int)
  Source   Edit
proc shr=[H: static int; W: static int](a`gensym8: var StaticMatrix[H, W, int];
                                        b`gensym8: StaticMatrix[H, W, int])
  Source   Edit
proc shr=[H: static int; W: static int](a`gensym8: var StaticMatrix[H, W, int];
                                        x`gensym8: int)
  Source   Edit
proc sum[H: static int; W: static int; T](m: StaticMatrix[H, W, T]): T
  Source   Edit
proc toMatrix[H: static int; W: static int; T](arr: array[H, array[W, T]]): StaticMatrix[
    H, W, T]
  Source   Edit
proc w[H: static int; W: static int; T](m: StaticMatrix[H, W, T]): int
  Source   Edit
proc xor=[H: static int; W: static int](a`gensym6: var StaticMatrix[H, W, int];
                                        b`gensym6: StaticMatrix[H, W, int])
  Source   Edit
proc xor=[H: static int; W: static int](a`gensym6: var StaticMatrix[H, W, int];
                                        x`gensym6: int)
  Source   Edit