pub struct Subgraph {
pub nodes: Vec<NodeId>,
pub edges: Vec<EdgeId>,
pub scores: HashMap<NodeId, f32>,
}Expand description
A subgraph extracted by a retrieval call.
nodes and edges are deduplicated but unordered. scores maps each seed
node to its relevance value; expansion-only nodes are absent from the map.
For retrieve and retrieve_with the value is the seed’s cosine
distance from the query (lower is closer). For retrieve_hybrid it is the
fused score produced by the configured FusionStrategy over the vector
and text seeds (higher is more relevant).
Fields§
§nodes: Vec<NodeId>§edges: Vec<EdgeId>§scores: HashMap<NodeId, f32>Auto Trait Implementations§
impl Freeze for Subgraph
impl RefUnwindSafe for Subgraph
impl Send for Subgraph
impl Sync for Subgraph
impl Unpin for Subgraph
impl UnsafeUnpin for Subgraph
impl UnwindSafe for Subgraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more