Skip to main content

Ranker

Struct Ranker 

Source
pub struct Ranker<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Ranker<'a>

Source

pub fn new(engine: &'a Engine<'a>) -> Self

Source

pub fn pagerank_global(&self) -> Result<Vec<(String, f64)>>

Raw global PageRank vector: (node_id, score) over the full heterogeneous universe, id-sorted. No projection, no blending.

Source

pub fn pagerank_global_with( &self, contributors: &[EdgeWeightFn], ) -> Result<Vec<(String, f64)>>

Global vector with edge-weight contributors applied.

Source

pub fn pagerank_global_with_hooks( &self, contributors: &[EdgeWeightFn], extra: &[(String, String, String, f64)], ) -> Result<Vec<(String, f64)>>

Global vector with edge weights and extra rank-time edges applied.

Source

pub fn reference_graph(&self) -> Result<Vec<ReferenceEdge>>

Normalized reference graph (§123 intermediate): trusted relationships mapped to reference kinds (call/read/write/…). Read-only projection — the reference surface SystemRanker diffuses over, with per-edge provenance and confidence.

Source

pub fn universe(&self) -> Result<Vec<(String, String)>>

Rank-universe nodes (§123 intermediate): (id, kind) over the full heterogeneous universe in rank order. Same nodes every vector is indexed by — the node table for pagerank.global/task.

Source

pub fn universe_with( &self, hooks: &RankHooks, goal: &str, ) -> Result<Vec<(String, String)>>

Rank universe merged with plugin rank-node providers (§124 item 17): the same table symbols_with_hooks diffuses over. Read-only stage view — no entity, relationship, or evidence is written.

Source

pub fn project_symbols( &self, vector: &[(String, f64)], ) -> Result<Vec<(String, f64)>>

Project a universe vector to per-symbol scores (§123 intermediate): entity importance reaching owner/handler symbols. vector is (id, score) pairs over universe ids (e.g. a pagerank.global/task row); unknown ids score 0. Same projection symbols_with_hooks blends from — exposed for debuggability.

Source

pub fn rank_edges(&self) -> Result<Vec<(String, String, String, f64)>>

Raw rank-universe edges (§123.12): (subject, predicate, object, base weight), pre-aggregation. No plugin hooks by contract — the structure the vectors diffuse over.

Source

pub fn pagerank_task(&self, goal: &str) -> Result<Vec<(String, f64)>>

Raw task-personalized PPR vector for goal.

Source

pub fn pagerank_task_with( &self, goal: &str, contributors: &[EdgeWeightFn], ) -> Result<Vec<(String, f64)>>

Task vector with edge-weight contributors applied.

Source

pub fn pagerank_task_with_hooks( &self, goal: &str, contributors: &[EdgeWeightFn], extra: &[(String, String, String, f64)], ) -> Result<Vec<(String, f64)>>

Task vector with edge weights and extra rank-time edges applied.

Source

pub fn required_with( &self, goal: &str, hooks: &RankHooks, ) -> Result<BTreeSet<String>>

Engine required-coverage base set (entry ids build_surface partitions on): invariant/invocation/flow/state-owner entries. The op unions plugin coverage providers over this.

Source

pub fn seeds_with(&self, goal: &str, hooks: &RankHooks) -> Result<Vec<TaskSeed>>

Task-seed merge for goal (§123.11): lexical seeds + plugin providers, weights summed by id. Shared by ranking.seeds and symbols_with_hooks — one merge, two callers.

Source

pub fn candidates(&self, goal: &str, limit: usize) -> Result<Vec<ScoredEntity>>

Lexical candidate generation for goal (stage 1).

Source

pub fn candidates_with( &self, goal: &str, limit: usize, hooks: &RankHooks, ) -> Result<Vec<ScoredEntity>>

Candidates with explicit plugin providers (one call, deterministic order). Provider rows merge by canonical id: max score wins, the provider reason is tagged plugin:<id> for explainability.

Source

pub fn symbols(&self, req: &RankRequest) -> Result<RankResult>

Full task/global blend per symbol with feature decomposition. Same math as build_surface (no MMR/quotas/budget — pure ranking). Plugin seed/feature/rerank hooks apply here and are recorded.

Source

pub fn trace_with_hooks( &self, req: &RankRequest, hooks: &RankHooks, ) -> Result<(RankResult, Vec<String>, Vec<String>)>

Full ranking trace (§19): the RankResult plus the inputs the blend consumed — seed ids and required entry ids. Same computation as symbols_with_hooks (no new math); the envelope makes the decision auditable without re-deriving inputs.

Source

pub fn symbols_with_hooks( &self, req: &RankRequest, hooks: &RankHooks, ) -> Result<RankResult>

symbols() with explicit plugin hooks (one call, deterministic order).

Derivation shares the pipeline’s inputs BY CONSTRUCTION: per-entry confidence, required set, seed membership, and lexical scores come from the compiled surface map and its helpers — the same values build_surface blends. Per-symbol totals take the max over that symbol’s entries (overloads); blends are otherwise identical math.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Ranker<'a>

§

impl<'a> !Send for Ranker<'a>

§

impl<'a> !Sync for Ranker<'a>

§

impl<'a> !UnwindSafe for Ranker<'a>

§

impl<'a> Freeze for Ranker<'a>

§

impl<'a> Unpin for Ranker<'a>

§

impl<'a> UnsafeUnpin for Ranker<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.