INNER CODE UNIT · Rust

graph_mut

lurk-lab/lurk-beta · foil/src/lib.rs:259

    pub fn graph_mut(&mut self) -> &mut G<M> {
        &mut self.graph
    }
    pub fn alloc<L: Into<Label>>(&mut self, label: L) -> Vert {
        let l = label.into();
        let vert = self.graph.alloc(l.clone(), M::default());
        self.register(&l, &vert);
        vert
    }
    pub fn alloc_var(&mut self, name: &'static str) -> Vert {
        self.alloc(Var::new(name))
    }
    pub fn alloc_unique_var<S: Into<String>>(&mut self, name: S) -> Vert {
        let var = self.unique_var(name);
        self.alloc(var)
    }
    pub fn alloc_with_meta<L: Into<Label>, MM: Into<M>>(&mut self, label: L, meta: MM) -> Vert {
        let l = label.into();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…