Rename EntityMap to ElementMap (tests not yet updated)
This commit is contained in:
+5
-5
@@ -1,6 +1,6 @@
|
||||
//! Core traits for undirected graph topologies.
|
||||
|
||||
use crate::maps::EntityMap;
|
||||
use crate::maps::ElementMap;
|
||||
|
||||
/// A trait representing an undirected graph topology.
|
||||
///
|
||||
@@ -44,7 +44,7 @@ pub trait GraphTopology {
|
||||
/// Returns the number of vertices in the graph.
|
||||
fn vertex_count(&self) -> usize;
|
||||
|
||||
/// Creates and returns an [`EntityMap`] for the vertices with every slot initialised to
|
||||
/// Creates and returns an [`ElementMap`] for the vertices with every slot initialised to
|
||||
/// `default`.
|
||||
///
|
||||
/// # Examples
|
||||
@@ -65,12 +65,12 @@ pub trait GraphTopology {
|
||||
/// labels[v2] = "b";
|
||||
/// assert_eq!(labels[v2], "b");
|
||||
/// ```
|
||||
fn vertex_map<T: Clone>(&self, default: T) -> EntityMap<Self::Vertex, T>;
|
||||
fn vertex_map<T: Clone>(&self, default: T) -> ElementMap<Self::Vertex, T>;
|
||||
|
||||
/// Returns the number of edges in the graph.
|
||||
fn edge_count(&self) -> usize;
|
||||
|
||||
/// Creates and returns an [`EntityMap`] for the edges with every slot initialised to `default`.
|
||||
/// Creates and returns an [`ElementMap`] for the edges with every slot initialised to `default`.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
@@ -92,7 +92,7 @@ pub trait GraphTopology {
|
||||
/// weights[e2] = 2;
|
||||
/// assert_eq!(weights[e2], 2);
|
||||
/// ```
|
||||
fn edge_map<T: Clone>(&self, default: T) -> EntityMap<Self::Edge, T>;
|
||||
fn edge_map<T: Clone>(&self, default: T) -> ElementMap<Self::Edge, T>;
|
||||
|
||||
/// Returns the degree of `v`, i.e. the number of incident edges, where each loop contributes 2.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user