Struct graphene::core::BaseEdge
[−]
[src]
pub struct BaseEdge<V, W> where
V: Copy + Eq,
W: Copy + Eq, {
pub source: V,
pub sink: V,
pub weight: W,
}
Represents an edge between two vertices in a graph.
The edge is implicitly directed from the source
to the sink
with some weight weight
.
Parameters:
V
: The type of the vertices.W
: The type of the weight.
Fields
source: V
The vertex the edge starts in.
sink: V
The vertex the edge ends in.
weight: W
The weight of the edge.
Methods
impl<V: Copy + Eq, W: Copy + Eq> BaseEdge<V, W>
[src]
fn new(source: V, sink: V, weight: W) -> BaseEdge<V, W>
Creates a new edge
fn source(&self) -> V
Returns a copy of the vertex the edge starts in.
fn sink(&self) -> V
Returns a copy of the vertex the edge ends in.
fn weight(&self) -> W
Returns a copy of the weight of the edge.
Trait Implementations
impl<V: Copy, W: Copy> Copy for BaseEdge<V, W> where
V: Copy + Eq,
W: Copy + Eq,
[src]
V: Copy + Eq,
W: Copy + Eq,
impl<V: Clone, W: Clone> Clone for BaseEdge<V, W> where
V: Copy + Eq,
W: Copy + Eq,
[src]
V: Copy + Eq,
W: Copy + Eq,
fn clone(&self) -> BaseEdge<V, W>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<V: Debug, W: Debug> Debug for BaseEdge<V, W> where
V: Copy + Eq,
W: Copy + Eq,
[src]
V: Copy + Eq,
W: Copy + Eq,
impl<V: PartialEq, W: PartialEq> PartialEq for BaseEdge<V, W> where
V: Copy + Eq,
W: Copy + Eq,
[src]
V: Copy + Eq,
W: Copy + Eq,
fn eq(&self, __arg_0: &BaseEdge<V, W>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BaseEdge<V, W>) -> bool
This method tests for !=
.
impl<V: Eq, W: Eq> Eq for BaseEdge<V, W> where
V: Copy + Eq,
W: Copy + Eq,
[src]
V: Copy + Eq,
W: Copy + Eq,