pub struct ThreeLevelHierarchy { /* private fields */ }Expand description
Three-level hierarchy decomposition from the paper
Implementations§
Source§impl ThreeLevelHierarchy
impl ThreeLevelHierarchy
pub fn into_reference( val: ThreeLevelHierarchy, env: Env, ) -> Result<Reference<ThreeLevelHierarchy>>
pub fn into_instance( self, env: Env, ) -> Result<ClassInstance<ThreeLevelHierarchy>>
Source§impl ThreeLevelHierarchy
impl ThreeLevelHierarchy
Sourcepub fn insert_edge(&mut self, u: u32, v: u32, weight: f64)
pub fn insert_edge(&mut self, u: u32, v: u32, weight: f64)
Insert an edge
Sourcepub fn delete_edge(&mut self, u: u32, v: u32)
pub fn delete_edge(&mut self, u: u32, v: u32)
Delete an edge
Sourcepub fn stats(&self) -> JsHierarchyStats
pub fn stats(&self) -> JsHierarchyStats
Get hierarchy statistics
Sourcepub fn global_min_cut(&self) -> f64
pub fn global_min_cut(&self) -> f64
Get global minimum cut estimate
Trait Implementations§
Source§impl FromNapiMutRef for ThreeLevelHierarchy
impl FromNapiMutRef for ThreeLevelHierarchy
Source§unsafe fn from_napi_mut_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static mut Self>
unsafe fn from_napi_mut_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static mut Self>
Safety Read more
Source§impl FromNapiRef for ThreeLevelHierarchy
impl FromNapiRef for ThreeLevelHierarchy
Source§unsafe fn from_napi_ref(
env: napi_env,
napi_val: napi_value,
) -> Result<&'static Self>
unsafe fn from_napi_ref( env: napi_env, napi_val: napi_value, ) -> Result<&'static Self>
Safety Read more
Source§impl FromNapiValue for &ThreeLevelHierarchy
impl FromNapiValue for &ThreeLevelHierarchy
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl FromNapiValue for &mut ThreeLevelHierarchy
impl FromNapiValue for &mut ThreeLevelHierarchy
Source§unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
unsafe fn from_napi_value(env: napi_env, napi_val: napi_value) -> Result<Self>
Safety Read more
fn from_unknown(value: JsUnknown) -> Result<Self, Error>
Source§impl ObjectFinalize for ThreeLevelHierarchy
impl ObjectFinalize for ThreeLevelHierarchy
Source§impl ToNapiValue for ThreeLevelHierarchy
impl ToNapiValue for ThreeLevelHierarchy
Source§unsafe fn to_napi_value(
env: napi_env,
val: ThreeLevelHierarchy,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: ThreeLevelHierarchy, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &ThreeLevelHierarchy
impl TypeName for &ThreeLevelHierarchy
Source§impl TypeName for &mut ThreeLevelHierarchy
impl TypeName for &mut ThreeLevelHierarchy
Source§impl TypeName for ThreeLevelHierarchy
impl TypeName for ThreeLevelHierarchy
Source§impl ValidateNapiValue for &ThreeLevelHierarchy
impl ValidateNapiValue for &ThreeLevelHierarchy
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Source§impl ValidateNapiValue for &mut ThreeLevelHierarchy
impl ValidateNapiValue for &mut ThreeLevelHierarchy
Source§unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
unsafe fn validate(env: napi_env, napi_val: napi_value) -> Result<napi_value>
Safety Read more
Auto Trait Implementations§
impl Freeze for ThreeLevelHierarchy
impl RefUnwindSafe for ThreeLevelHierarchy
impl Send for ThreeLevelHierarchy
impl Sync for ThreeLevelHierarchy
impl Unpin for ThreeLevelHierarchy
impl UnwindSafe for ThreeLevelHierarchy
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