Skip to content

Commit

Permalink
fix(types): use Uuid type alias instead of u128
Browse files Browse the repository at this point in the history
  • Loading branch information
yamafaktory committed Sep 5, 2024
1 parent 8604ef0 commit 5146101
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/hyperzig.zig
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub fn HyperZig(comptime H: type, comptime V: type) type {
const hyperedge = self.hyperedges.get(kv.key_ptr.*).?;
if (hyperedge.relations.items.len > 0) {
// Use a window iterator over the hyperedge relations.
var wIt = window(u128, hyperedge.relations.items, 2, 1);
var wIt = window(Uuid, hyperedge.relations.items, 2, 1);
while (wIt.next()) |v| {
if (v[0] == id) {
indegree += 1;
Expand All @@ -282,7 +282,7 @@ pub fn HyperZig(comptime H: type, comptime V: type) type {
const hyperedge = self.hyperedges.get(kv.key_ptr.*).?;
if (hyperedge.relations.items.len > 0) {
// Use a window iterator over the hyperedge relations.
var wIt = window(u128, hyperedge.relations.items, 2, 1);
var wIt = window(Uuid, hyperedge.relations.items, 2, 1);
while (wIt.next()) |v| {
if (v[1] == id) {
outdegree += 1;
Expand Down Expand Up @@ -325,7 +325,7 @@ pub fn HyperZig(comptime H: type, comptime V: type) type {
const hyperedge = self.hyperedges.get(hyperedge_id).?;
if (hyperedge.relations.items.len > 0) {
// Use a window iterator over the hyperedge relations.
var wIt = window(u128, hyperedge.relations.items, 2, 1);
var wIt = window(Uuid, hyperedge.relations.items, 2, 1);
while (wIt.next()) |v| {
if (v[1] == id) {
const adjacent = v[0];
Expand Down Expand Up @@ -358,7 +358,7 @@ pub fn HyperZig(comptime H: type, comptime V: type) type {
const hyperedge = self.hyperedges.get(hyperedge_id).?;
if (hyperedge.relations.items.len > 0) {
// Use a window iterator over the hyperedge relations.
var wIt = window(u128, hyperedge.relations.items, 2, 1);
var wIt = window(Uuid, hyperedge.relations.items, 2, 1);
while (wIt.next()) |v| {
if (v[0] == id) {
const adjacent = v[1];
Expand Down

0 comments on commit 5146101

Please sign in to comment.