pub struct VertexEmbedding<'a> {
pub graph: &'a str,
pub query_vector: Vec<f64>,
pub vector_field: String,
pub threshold: f64,
}Expand description
Per-vertex cosine similarity to a query embedding. Reads the named
vector property and emits a standard PostingList keyed by vertex
id, with the cosine score on the payload.
Fields§
§graph: &'a str§query_vector: Vec<f64>§vector_field: String§threshold: f64Implementations§
Source§impl<'a> VertexEmbedding<'a>
impl<'a> VertexEmbedding<'a>
pub fn new(graph: &'a str, query_vector: Vec<f64>) -> Self
pub fn vector_field(self, name: impl Into<String>) -> Self
pub fn threshold(self, t: f64) -> Self
pub fn execute<G: GraphStore>( &self, store: &G, ) -> CrossParadigmResult<PostingList>
Auto Trait Implementations§
impl<'a> Freeze for VertexEmbedding<'a>
impl<'a> RefUnwindSafe for VertexEmbedding<'a>
impl<'a> Send for VertexEmbedding<'a>
impl<'a> Sync for VertexEmbedding<'a>
impl<'a> Unpin for VertexEmbedding<'a>
impl<'a> UnsafeUnpin for VertexEmbedding<'a>
impl<'a> UnwindSafe for VertexEmbedding<'a>
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