Struct opg::dfs::Dfs[][src]

struct Dfs {
    mono: HashMap<String, HashSet<String>>,
    con: HashMap<String, HashSet<String>>,
    visited: HashSet<String>,
    path: Vec<String>,
    element: HashMap<String, i64>,
    category: HashMap<i64, HashSet<String>>,
    tree: HashMap<i64, HashSet<i64>>,
    top: i64,
}

A struct to make DFS movement in an OOP code style. And perform DFS in a recurrent way.

Fields

mono: HashMap<String, HashSet<String>>con: HashMap<String, HashSet<String>>visited: HashSet<String>path: Vec<String>element: HashMap<String, i64>category: HashMap<i64, HashSet<String>>tree: HashMap<i64, HashSet<i64>>top: i64

Implementations

impl Dfs[src]

fn new(
    mono: HashMap<String, HashSet<String>>,
    con: HashMap<String, HashSet<String>>
) -> Dfs
[src]

fn dfs(&mut self) -> HashMap<String, HashSet<String>>[src]

fn dfs_merge(&mut self, node: String)[src]

Merge DFS

fn dfs_conn(&mut self, node: String, parent: Option<String>)[src]

connection DFS

fn dfs_map(&mut self, node: String, map: &mut HashSet<String>)[src]

map DFS

fn merge(&mut self, node: String)[src]

Merge New Category

Auto Trait Implementations

impl RefUnwindSafe for Dfs[src]

impl Send for Dfs[src]

impl Sync for Dfs[src]

impl Unpin for Dfs[src]

impl UnwindSafe for Dfs[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.