pub struct Edge {
pub other: i32,
pub dx: f64,
pub dy: f64,
pub weight: f64,
}Expand description
One directed edge node -> other, other already resolved to a node index by the caller. other < 0 is a
defensive sentinel for “target node not found” (mirrors this.nodes.get(edge.other) returning undefined in
pose-graph.ts’s optimize()/residual loops): the edge is skipped without stopping the edge loop, exactly as
if (!other) continue; does there. In practice every edge’s other always resolves — nodes are never removed
once hydrated — but the sentinel keeps the two sides’ control flow identical rather than assuming it.
Fields§
§other: i32§dx: f64§dy: f64§weight: f64Auto Trait Implementations§
impl Freeze for Edge
impl RefUnwindSafe for Edge
impl Send for Edge
impl Sync for Edge
impl Unpin for Edge
impl UnsafeUnpin for Edge
impl UnwindSafe for Edge
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