pub struct SubtreeKernel { /* private fields */ }Expand description
Subtree kernel - counts common subtrees
This kernel counts the number of subtrees that are common between two trees. It provides a measure of structural similarity.
§Formula
K(T1, T2) = Σ_i Σ_j I(subtree_i(T1) == subtree_j(T2))where I is the indicator function.
Implementations§
Source§impl SubtreeKernel
impl SubtreeKernel
Sourcepub fn new(config: SubtreeKernelConfig) -> Self
pub fn new(config: SubtreeKernelConfig) -> Self
Create a new subtree kernel
Auto Trait Implementations§
impl Freeze for SubtreeKernel
impl RefUnwindSafe for SubtreeKernel
impl Send for SubtreeKernel
impl Sync for SubtreeKernel
impl Unpin for SubtreeKernel
impl UnwindSafe for SubtreeKernel
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