pub struct DerivedGraph(pub UnGraph<(Species, Connections), Shared>);Expand description
A derived graph representing the relationships among species in a single stratum.
Nodes represent species within one stratum (e.g., parasites or hosts). Edges represent the number of shared connections they have to the opposing stratum.
- Node weights:
(Species, Connections) - Edge weights:
Shared
Tuple Fields§
§0: UnGraph<(Species, Connections), Shared>Implementations§
Source§impl DerivedGraph
impl DerivedGraph
Sourcepub fn overlap_measure()
pub fn overlap_measure()
Compute an overlap measure for the derived graph.
This function is a placeholder and will calculate overlap metrics (e.g., Jaccard similarity) for species in the same stratum. Not yet implemented.
Sourcepub fn plot(&self, diameter: f64, remove: f64)
pub fn plot(&self, diameter: f64, remove: f64)
Plot the derived graph as a circular layout in SVG format.
§Arguments
diameter- The diameter of the circular layout.remove- A threshold value. Edges with fewer shared partners than this value are ignored in the plot.
§Details
Nodes are placed evenly on a circle. Edges are drawn between nodes, scaled by the number of shared partners.
Modified from a reference here: https://observablehq.com/@euphrasiologist/hybridisation-in-the-genus-saxifraga
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DerivedGraph
impl RefUnwindSafe for DerivedGraph
impl Send for DerivedGraph
impl Sync for DerivedGraph
impl Unpin for DerivedGraph
impl UnwindSafe for DerivedGraph
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