1 This is libquiver: a library for making and working with quivers in
2 myrddin. You may care about it if you want to work with cluster
3 algebras, doing things that Clav [0] does, but as a library.
7 - myrddin [ https://myrlang.org ]
8 - libt [ https://repo.or.cz/some-myr-traits.git ]
9 - libyakmo [ https://repo.or.cz/libyakmo.git ]
11 Example program, demonstrating specific Plücker relations:
20 var q = quiver.mk_with_opts([.use_a_coords = true])
21 quiver.add_vertex(q, "a", 1)
22 quiver.add_vertex(q, "b", 1)
23 quiver.add_vertex(q, "x", 1)
24 quiver.add_vertex(q, "c", 1)
25 quiver.add_vertex(q, "d", 1)
27 quiver.add_to_edge(q, "a", "x", yakmo.QfromZ(1))
28 quiver.add_to_edge(q, "x", "b", yakmo.QfromZ(1))
29 quiver.add_to_edge(q, "b", "a", yakmo.QfromZ(1))
30 quiver.add_to_edge(q, "d", "x", yakmo.QfromZ(1))
31 quiver.add_to_edge(q, "x", "c", yakmo.QfromZ(1))
32 quiver.add_to_edge(q, "c", "d", yakmo.QfromZ(1))
34 for var j = 0; j < q.v.len; ++j
35 q.v[j].acoord = yakmo.polynomialfromQ(auto std.try(yakmo.Qfrom(1, j*j + 1)))
40 match quiver.mutate_ip(q2, "x")
42 | `std.Err e: std.fatal("mutate(q2, x, true): {}\n", e)
45 for var j = 0; j < q.v.len; ++j
46 std.put("{} {} {}\n", q.v[j].name, q.v[j].acoord, q2.v[j].acoord);
50 [0] https://repo.or.cz/clav.git