Trait 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 // Required 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§

Source

fn get_vertexes(&self) -> VI

Returns all vertex in the graph as an iterator

Source

fn get_darts(&self) -> DI

Returns all darts in the graph as an iterator

Source

fn get_faces(&self) -> FI

Returns all faces in the graph as an iterator

Source

fn vertex_count(&self) -> usize

Returns the number of vertexes in the graph

Source

fn dart_count(&self) -> usize

Returns the number of darts in the graph

Source

fn edge_count(&self) -> usize

Returns the number of edges in the graph

Source

fn face_count(&self) -> usize

Returns the number of faces in the graph

Source

fn face_vertex_count(&self, face: &F) -> usize

Returns the number of vertexes adjacent to the given face

Source

fn neighbors_count(&self, vertex: &V) -> usize

Returns the amount of vertex neighboring the given vertex

Source

fn neighbors(&self, vertex: &V) -> Vec<V>

Returns a vector of neighbors of the given vertex

Source

fn vertex_by_id(&self, id: usize) -> Option<V>

Returns a vertex specified by this id

Source

fn get_dart(&self, vertex: &V, target: &V) -> Option<D>

Returns the dart between to vertexes

Source

fn dart_vertex(&self, vertex: &V) -> D

Returns the dart linked to the given vertex

Source

fn dart_face(&self, face: &F) -> D

Returns the the dart linked to the given face

Source

fn twin(&self, dart: &D) -> D

Returns the twin dart of the given dart

Source

fn dart_target(&self, dart: &D) -> V

Returns the target vertex of the given dart

Source

fn face(&self, dart: &D) -> F

Return the face adjacent to the given dart

Source

fn next(&self, current: &D) -> D

Returns the next dart in the dart order

Source

fn prev(&self, current: &D) -> D

Returns the previous dart in the dart order

Source

fn add_vertex(&mut self) -> V

Adds a new vertex

Source

fn add_dart( &mut self, from: V, to: V, prev: Option<D>, next: Option<D>, twin: Option<D>, face: Option<F>, ) -> D

Adds a new dart

Source

fn add_face(&mut self, dart: D) -> F

Adds a new face

Source

fn set_face(&self, dart: &D, face: F)

Sets the face for the given Dart

Implementors§