diff --git a/build.zig.zon b/build.zig.zon index 04c96bb..38dc997 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,6 +1,6 @@ .{ .name = .pets, - .version = "0.2.1", + .version = "0.2.2", .fingerprint = 0x8638ea3f91b7e13a, // Changing this has security and trust implications. .minimum_zig_version = "0.15.2", .paths = .{ diff --git a/src/dpf.zig b/src/dpf.zig index 34f8242..0262e48 100644 --- a/src/dpf.zig +++ b/src/dpf.zig @@ -186,9 +186,7 @@ pub fn Dpf(comptime size: u64) type { self.allocator.destroy(key); } - /// Generate a key pair for a specific index in the DPF domain. - /// - `index`: The point index (0 to size-1) to generate keys for - /// Returns two keys (key0, key1). + /// Generate a key pair for a specific `index` in the DPF domain. pub fn generateKeys(self: *const Self, index: u64) !struct { *Key, *Key } { std.debug.assert(index < size); @@ -249,10 +247,6 @@ pub fn Dpf(comptime size: u64) type { } /// Evaluate the DPF using `key` at point `i` and output a single bit. - /// - /// This function evaluates the full tree described by the key and - /// provides the point value. The full evaluation will be memoized for - /// later evaluations. pub fn evaluate(self: *Self, key: *const Key, i: u64) !u1 { std.debug.assert(i < size); @@ -265,10 +259,7 @@ pub fn Dpf(comptime size: u64) type { } /// Expand a DPF key into a full array of indicator bits. - /// Internal function used for caching: computes all `ceil` indicators - /// by constructing the full DPF tree, and the bits are stored for - /// future evaluations. - fn expandKeyToIndicators(self: *const Self, key: *const Key) ![size]u1 { + pub fn expandKeyToIndicators(self: *const Self, key: *const Key) ![size]u1 { const StackNode = struct { exp: Expansion, lvl: usize,