pub struct Cost {
pub offsets: u64,
pub degrees: u64,
pub firsts: u64,
pub widths: u64,
pub gaps: u64,
pub patches: u64,
pub groups: u64,
pub slack: u64,
}Expand description
Where the bits went, in bits.
A compressed structure that cannot say which part of itself is expensive is
very hard to improve, and the answer moves a lot between graphs: on a graph
with an average degree of sixteen the per node fields are a fifth of the
total, and on one with an average degree of three they are most of it.
Csr::cost returns this and the compress example prints it.
Fields§
§offsets: u64The per node bit offset tables.
degrees: u64One degree per node, including the nodes that have no edges.
firsts: u64One first neighbour per node that has any.
widths: u64The header in front of every block of gaps: the width, whether anything did not fit it, and how much of it did not.
gaps: u64The gaps, which is the only part that is really the graph.
patches: u64The gaps that did not fit their block’s width, written again at the end of the block with the position they belong at.
groups: u64The fixed group records, which are not in the bit stream at all.
slack: u64Whatever rounding the stream up to whole words left over.