MCPcopy Create free account
hub / github.com/Pometry/Raphtory / read_prev

Method read_prev

raphtory/src/db/task/node/eval_node.rs:206–218  ·  view source on GitHub ↗

Read the prev value of the node state using the given accumulator. Returns a default value if the value is not present.

(
        &self,
        agg_r: &AccId<A, IN, OUT, ACC>,
    )

Source from the content-addressed store, hash-verified

204 /// Read the prev value of the node state using the given accumulator.
205 /// Returns a default value if the value is not present.
206 pub fn read_prev<A, IN, OUT, ACC: Accumulator<A, IN, OUT>>(
207 &self,
208 agg_r: &AccId<A, IN, OUT, ACC>,
209 ) -> OUT
210 where
211 A: StateType,
212 OUT: std::fmt::Debug,
213 {
214 self.node_state()
215 .shard()
216 .read_with_pid(self.eval_graph.ss + 1, self.state_pos, agg_r)
217 .unwrap_or(ACC::finish(&ACC::zero()))
218 }
219
220 pub fn read_global_state_prev<A, IN, OUT, ACC: Accumulator<A, IN, OUT>>(
221 &self,

Callers

nothing calls this directly

Calls 3

read_with_pidMethod · 0.80
shardMethod · 0.80
node_stateMethod · 0.80

Tested by

no test coverage detected