const Node = packed struct(u32)
depth: u16
freq: u16
pub fn smaller(a: Node, b: Node) bool
freq is more significant than depth
freq
depth
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076
const Node = packed struct(u32) { depth: u16, freq: u16, pub const Index = u16; /// `freq` is more significant than `depth` pub fn smaller(a: Node, b: Node) bool { return @as(u32, @bitCast(a)) < @as(u32, @bitCast(b)); } }