Trait graph_algo_ptas::data_structure::graph_dcel::GraphDCEL
source · [−]pub trait GraphDCEL<V: Vertex, D: Dart, F: Face, VI: Iterator<Item = V>, DI: Iterator<Item = D>, FI: Iterator<Item = F>> {
Show 23 methods
fn get_vertexes(&self) -> VI;
fn get_darts(&self) -> DI;
fn get_faces(&self) -> FI;
fn vertex_count(&self) -> usize;
fn dart_count(&self) -> usize;
fn edge_count(&self) -> usize;
fn face_count(&self) -> usize;
fn face_vertex_count(&self, face: &F) -> usize;
fn neighbors_count(&self, vertex: &V) -> usize;
fn neighbors(&self, vertex: &V) -> Vec<V>;
fn vertex_by_id(&self, id: usize) -> Option<V>;
fn get_dart(&self, vertex: &V, target: &V) -> Option<D>;
fn dart_vertex(&self, vertex: &V) -> D;
fn dart_face(&self, face: &F) -> D;
fn twin(&self, dart: &D) -> D;
fn dart_target(&self, dart: &D) -> V;
fn face(&self, dart: &D) -> F;
fn next(&self, current: &D) -> D;
fn prev(&self, current: &D) -> D;
fn add_vertex(&mut self) -> V;
fn add_dart(
&mut self,
from: V,
to: V,
prev: Option<D>,
next: Option<D>,
twin: Option<D>,
face: Option<F>
) -> D;
fn add_face(&mut self, dart: D) -> F;
fn set_face(&self, dart: &D, face: F);
}
Expand description
Trait to be implemented by every vertex implementation
Required Methods
sourcefn get_vertexes(&self) -> VI
fn get_vertexes(&self) -> VI
Returns all vertex in the graph as an iterator
sourcefn vertex_count(&self) -> usize
fn vertex_count(&self) -> usize
Returns the number of vertexes in the graph
sourcefn dart_count(&self) -> usize
fn dart_count(&self) -> usize
Returns the number of darts in the graph
sourcefn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Returns the number of edges in the graph
sourcefn face_count(&self) -> usize
fn face_count(&self) -> usize
Returns the number of faces in the graph
sourcefn face_vertex_count(&self, face: &F) -> usize
fn face_vertex_count(&self, face: &F) -> usize
Returns the number of vertexes adjacent to the given face
sourcefn neighbors_count(&self, vertex: &V) -> usize
fn neighbors_count(&self, vertex: &V) -> usize
Returns the amount of vertex neighboring the given vertex
sourcefn vertex_by_id(&self, id: usize) -> Option<V>
fn vertex_by_id(&self, id: usize) -> Option<V>
Returns a vertex specified by this id
sourcefn dart_vertex(&self, vertex: &V) -> D
fn dart_vertex(&self, vertex: &V) -> D
Returns the dart linked to the given vertex
sourcefn dart_target(&self, dart: &D) -> V
fn dart_target(&self, dart: &D) -> V
Returns the target vertex of the given dart
sourcefn add_vertex(&mut self) -> V
fn add_vertex(&mut self) -> V
Adds a new vertex