pub struct Link { /* private fields */ }Implementations§
Source§impl Link
impl Link
Sourcepub const MAX_CROSSING: usize = State::MAX_LEN
pub const MAX_CROSSING: usize = State::MAX_LEN
The maximum number of crossings a Link can carry, bounded by the State width
(64 by default, 128 under the big-link feature).
pub fn new( nodes: impl IntoIterator<Item = Node>, loops: impl IntoIterator<Item = Edge>, ) -> Self
pub fn from_nodes(nodes: impl IntoIterator<Item = Node>) -> Self
pub fn with_base_pt(self, e: Edge) -> Self
pub fn base_pt(&self) -> Option<Edge>
pub fn empty() -> Link
pub fn is_empty(&self) -> bool
pub fn unknot() -> Link
pub fn unlink(n: usize) -> Link
pub fn is_knot(&self) -> bool
pub fn is_oriented(&self) -> bool
pub fn verify_ori(&self)
pub fn writhe(&self) -> i32
pub fn n_nodes(&self) -> usize
pub fn nodes(&self) -> impl Iterator<Item = &Node>
pub fn node(&self, i: usize) -> &Node
pub fn crossings(&self) -> impl Iterator<Item = &Node>
pub fn n_crossings(&self) -> usize
pub fn n_signed_crossings(&self) -> (usize, usize)
pub fn loops(&self) -> &[Edge] ⓘ
pub fn n_loops(&self) -> usize
pub fn n_edges(&self) -> usize
pub fn edges(&self) -> Vec<Edge> ⓘ
pub fn n_comps(&self) -> usize
pub fn comps(&self) -> Vec<Path>
pub fn traverse_comps<F>(&self, f: F)
pub fn traverse_from<F>(&self, start: (usize, Slot), f: F)
pub fn unoriented(&self) -> Self
pub fn reindexed(&self, start_edge: Edge, base: Edge) -> Link
pub fn reindexed_canon(&self) -> Link
Source§impl Link
impl Link
pub fn conn_sum(&self, other: &Link) -> Link
pub fn conn_sum_at(&self, other: &Link, self_e: Edge, other_e: Edge) -> Link
pub fn mirror(&self) -> Self
pub fn reversed(&self) -> Self
pub fn cc_at(&self, i: usize) -> Self
pub fn resolve_at(&self, i: usize, r: Bit) -> Self
pub fn resolve_by(&self, s: &State) -> Self
pub fn seifert_state(&self) -> State
pub fn seifert_circles(&self) -> Vec<Path>
pub fn seifert_graph(&self) -> Graph<Path, usize>
Source§impl Link
impl Link
pub fn from_pd_code<I>(pd_code: I) -> Selfwhere
I: IntoIterator<Item = PDCodeX>,
Sourcepub fn pd_code(&self) -> Vec<PDCodeX> ⓘ
pub fn pd_code(&self) -> Vec<PDCodeX> ⓘ
The KnotAtlas PD code — one X[i,j,k,l] per crossing, CCW from the incoming under-strand i.
Built by traversing the components and emitting each crossing at its under-pass, so i is the
under-strand’s incoming edge; round-trips through from_pd_code. Resolved (V/H) nodes are
skipped. Panics on free loops, which a PD code has no way to express.
pub fn load(name: &str) -> Result<Link, Box<dyn Error>>
Trait Implementations§
impl Eq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl Freeze for Link
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnsafeUnpin 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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