pub struct Node2Vec<N: Node> { /* private fields */ }
Expand description
Basic Node2Vec implementation foundation
Implementations§
Source§impl<N: Node> Node2Vec<N>
impl<N: Node> Node2Vec<N>
Sourcepub fn new(config: Node2VecConfig) -> Self
pub fn new(config: Node2VecConfig) -> Self
Create a new Node2Vec instance
Sourcepub fn generate_walks<E, Ix>(
&mut self,
graph: &Graph<N, E, Ix>,
) -> Result<Vec<RandomWalk<N>>>
pub fn generate_walks<E, Ix>( &mut self, graph: &Graph<N, E, Ix>, ) -> Result<Vec<RandomWalk<N>>>
Generate training data (random walks) for Node2Vec
Sourcepub fn train<E, Ix>(&mut self, graph: &Graph<N, E, Ix>) -> Result<()>
pub fn train<E, Ix>(&mut self, graph: &Graph<N, E, Ix>) -> Result<()>
Train the Node2Vec model (simplified version) Note: This is a foundation implementation that would need a full skip-gram implementation
Sourcepub fn model(&self) -> &EmbeddingModel<N>
pub fn model(&self) -> &EmbeddingModel<N>
Get the trained model
Sourcepub fn model_mut(&mut self) -> &mut EmbeddingModel<N>
pub fn model_mut(&mut self) -> &mut EmbeddingModel<N>
Get mutable reference to the model
Auto Trait Implementations§
impl<N> Freeze for Node2Vec<N>
impl<N> !RefUnwindSafe for Node2Vec<N>
impl<N> !Send for Node2Vec<N>
impl<N> !Sync for Node2Vec<N>
impl<N> Unpin for Node2Vec<N>where
N: Unpin,
impl<N> !UnwindSafe for Node2Vec<N>
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more