pub struct Link { /* private fields */ }Implementations§
Source§impl Link
impl Link
pub fn new(nodes: Vec<Node>) -> Self
pub fn empty() -> Link
pub fn is_empty(&self) -> bool
pub fn is_knot(&self) -> bool
pub fn writhe(&self) -> i32
pub fn mirror(&self) -> Self
pub fn n_nodes(&self) -> usize
pub fn nodes(&self) -> impl Iterator<Item = &Node>
pub fn node(&self, i: usize) -> &Node
pub fn node_mut(&mut self, i: usize) -> &mut Node
pub fn crossings(&self) -> impl Iterator<Item = &Node>
pub fn count_crossings(&self) -> usize
pub fn count_signed_crossings(&self) -> (usize, usize)
pub fn collect_crossing_signs(&self) -> HashMap<usize, Sign>
pub fn n_edges(&self) -> usize
pub fn edges(&self) -> impl Iterator<Item = &Edge>
pub fn min_edge(&self) -> Option<Edge>
pub fn n_components(&self) -> usize
pub fn collect_components(&self) -> Vec<Path>
pub fn crossing_change(&self, i: usize) -> Self
pub fn resolved_at(&self, i: usize, r: Bit) -> Self
pub fn resolved_by(&self, s: &State) -> Self
pub fn seifert_state(&self) -> State
pub fn seifert_circles(&self) -> Vec<Path>
Source§impl Link
impl Link
pub fn from_pd_code<I>(pd_code: I) -> Selfwhere
I: IntoIterator<Item = XCode>,
pub fn is_valid_name(str: &str) -> bool
pub fn load(name_or_path: &str) -> Result<Link, Box<dyn Error>>
pub fn unknot() -> Link
pub fn trefoil() -> Link
pub fn figure8() -> Link
pub fn hopf_link() -> Link
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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