pub struct MinCutWrapperNode { /* private fields */ }Expand description
Full MinCutWrapper with paper algorithms
Implementations§
Source§impl MinCutWrapperNode
impl MinCutWrapperNode
pub fn into_reference( val: MinCutWrapperNode, env: Env, ) -> Result<Reference<MinCutWrapperNode>>
pub fn into_instance(self, env: Env) -> Result<ClassInstance<MinCutWrapperNode>>
Source§impl MinCutWrapperNode
impl MinCutWrapperNode
Sourcepub fn insert_edge(&mut self, u: u32, v: u32)
pub fn insert_edge(&mut self, u: u32, v: u32)
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 num_instances(&self) -> u32
pub fn num_instances(&self) -> u32
Get number of instances
Sourcepub fn current_time(&self) -> i64
pub fn current_time(&self) -> i64
Get current time
Sourcepub fn local_cuts(&self, source: u32, lambda_max: i64) -> Vec<JsLocalCut>
pub fn local_cuts(&self, source: u32, lambda_max: i64) -> Vec<JsLocalCut>
Get local cuts from source
Sourcepub fn connectivity_curve(
&self,
ranked_edges: Vec<(u32, u32, f64)>,
k_max: u32,
) -> Vec<JsCurvePoint>
pub fn connectivity_curve( &self, ranked_edges: Vec<(u32, u32, f64)>, k_max: u32, ) -> Vec<JsCurvePoint>
Compute connectivity curve
Sourcepub fn find_elbow(curve: Vec<JsCurvePoint>) -> Option<JsElbowResult>
pub fn find_elbow(curve: Vec<JsCurvePoint>) -> Option<JsElbowResult>
Find elbow in curve
Trait Implementations§
Source§impl FromNapiMutRef for MinCutWrapperNode
impl FromNapiMutRef for MinCutWrapperNode
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 MinCutWrapperNode
impl FromNapiRef for MinCutWrapperNode
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 &MinCutWrapperNode
impl FromNapiValue for &MinCutWrapperNode
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 MinCutWrapperNode
impl FromNapiValue for &mut MinCutWrapperNode
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 MinCutWrapperNode
impl ObjectFinalize for MinCutWrapperNode
Source§impl ToNapiValue for MinCutWrapperNode
impl ToNapiValue for MinCutWrapperNode
Source§unsafe fn to_napi_value(
env: napi_env,
val: MinCutWrapperNode,
) -> Result<napi_value>
unsafe fn to_napi_value( env: napi_env, val: MinCutWrapperNode, ) -> Result<napi_value>
Safety Read more
Source§impl TypeName for &MinCutWrapperNode
impl TypeName for &MinCutWrapperNode
Source§impl TypeName for &mut MinCutWrapperNode
impl TypeName for &mut MinCutWrapperNode
Source§impl TypeName for MinCutWrapperNode
impl TypeName for MinCutWrapperNode
Source§impl ValidateNapiValue for &MinCutWrapperNode
impl ValidateNapiValue for &MinCutWrapperNode
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 MinCutWrapperNode
impl ValidateNapiValue for &mut MinCutWrapperNode
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 MinCutWrapperNode
impl !RefUnwindSafe for MinCutWrapperNode
impl Send for MinCutWrapperNode
impl Sync for MinCutWrapperNode
impl Unpin for MinCutWrapperNode
impl UnsafeUnpin for MinCutWrapperNode
impl !UnwindSafe for MinCutWrapperNode
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