from verada import *
from arrays import *


def show(v: Values) -> None:
    for e in v:
        print(e)


def main() -> None:
    x = Vector([3, 1, 4, 1, 5, 9])
    y = Vector([2, 7, 1, 8, 2, 8])
    print(mean(x), dot(x, y), largest(x))
    show(above(x, 2))
    show(common(x, y))
    show(places(x, y))
    show(running(x))
    show(running_sums(x))
    show(reversed_of(x))
    t: Grid = table(3)
    print(t[2, 2], t[1, 2])
    a = Matrix([[1, 2, 3], [4, 5, 6]])
    b = Matrix([[1, 0], [0, 1], [2, -1]])
    p = product(a, b)
    print(p[0, 0], p[0, 1], p[1, 0], p[1, 1])
    q = product_at(a, b)
    print(q[0, 0], q[1, 1])
    u = transposed(a)
    print(u[2, 0], u[0, 1])
    show(row_totals(a))
