MCPcopy Create free account
hub / github.com/argumentcomputer/ix / consumers_csr

Method consumers_csr

crates/kernel/src/profile.rs:187–207  ·  view source on GitHub ↗

Build the reverse delta adjacency: for each producer block, the sorted set of consumer blocks that unfold it. This is the natural form for the partition hypergraph, where `net(p) = {p} ∪ consumers_of(p)`.

(&self)

Source from the content-addressed store, hash-verified

185}
186
187impl BlockProfile {
188 /// Number of blocks (vertices).
189 pub fn num_blocks(&self) -> usize {
190 self.blocks.len()
191 }
192
193 /// Number of delta edges (consumer → producer pairs).
194 pub fn num_edges(&self) -> usize {
195 self.delta_col.len()
196 }
197
198 /// The block entries, indexed by block id.
199 pub fn blocks(&self) -> &[BlockEntry] {
200 &self.blocks
201 }
202
203 /// The entry for block id `i`.
204 pub fn block(&self, i: u32) -> &BlockEntry {
205 &self.blocks[i as usize]
206 }
207
208 /// Producer block ids unfolded by consumer block `c` (sorted, deduped, no
209 /// self-edges).
210 pub fn producers(&self, c: u32) -> &[u32] {

Callers 2

from_profileMethod · 0.80

Calls 3

num_blocksMethod · 0.80
producersMethod · 0.80
cloneMethod · 0.45

Tested by 1