fn add_vertex_from_graph(&mut self, vertex_id: usize) -> Result<()> {
        if !self.graph.contains_vertex(vertex_id) {
            Err(Error::new_vnf(vertex_id))?
        } else if self.contains_vertex(vertex_id) {
            Err(Error::new_vae(vertex_id))?
        } else {
            self.vertex_ids.insert(vertex_id);

            Ok(())
        }
    }
/// Adds a vertex from the graph to subgraph.
///
/// # Arguments
/// `vertex_id`: Id of the vertex to be added.
///
/// # Returns
/// * `Err`: If graph does not contain vertex with id: `vertex_id`.
/// * `Ok`:
Adds a vertex from the graph to subgraph.
Adds a vertex from the graph to subgraph .
fn add_vertex_from_graph(&mut self, vertex_id: usize) -> Result<()> {
        if !self.graph.contains_vertex(vertex_id) {
            Err(Error::new_vnf(vertex_id))?
        } else if self.contains_vertex(vertex_id) {
            Err(Error::new_vae(vertex_id))?
        } else {
            self.vertex_ids.insert(vertex_id);
            Ok(())
        }
    }
fn add_vertex_from_graph ( & mut self , vertex_id : usize ) -> Result < ( ) > { if ! self . graph . contains_vertex ( vertex_id ) { Err ( Error :: new_vnf ( vertex_id ) ) ? } else if self . contains_vertex ( vertex_id ) { Err ( Error :: new_vae ( vertex_id ) ) ? } else { self . vertex_ids . insert ( vertex_id ) ; Ok ( ( ) ) } }
Adds a vertex from the graph to subgraph.
Adds a vertex from the graph to subgraph .
&mut self
vertex_id
usize
`Err`: If graph does not contain vertex with id: `vertex_id`.
`Ok`.
` Err ` : If graph does not contain vertex with id : ` vertex_id ` . ` Ok ` .
&mut self
vertex_id
usize