pub struct GraphEditDistance {
pub node_cost: f32,
pub edge_cost: f32,
pub node_subst_cost: f32,
pub edge_subst_cost: f32,
}Expand description
Graph Edit Distance (GED) computation
Fields§
§node_cost: f32Cost for node insertion/deletion
edge_cost: f32Cost for edge insertion/deletion
node_subst_cost: f32Cost for node substitution
edge_subst_cost: f32Cost for edge substitution
Implementations§
Source§impl GraphEditDistance
impl GraphEditDistance
Sourcepub fn compute(
&self,
graph1: &GraphData,
graph2: &GraphData,
) -> Result<f32, TorshError>
pub fn compute( &self, graph1: &GraphData, graph2: &GraphData, ) -> Result<f32, TorshError>
Compute approximate graph edit distance between two graphs
§Errors
Propagates tensor-operation failures from the feature distance.
Sourcepub fn node_correspondence(
&self,
graph1: &GraphData,
graph2: &GraphData,
) -> Result<Vec<(usize, usize)>, TorshError>
pub fn node_correspondence( &self, graph1: &GraphData, graph2: &GraphData, ) -> Result<Vec<(usize, usize)>, TorshError>
Find approximate node correspondence between two graphs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphEditDistance
impl RefUnwindSafe for GraphEditDistance
impl Send for GraphEditDistance
impl Sync for GraphEditDistance
impl Unpin for GraphEditDistance
impl UnsafeUnpin for GraphEditDistance
impl UnwindSafe for GraphEditDistance
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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