Trait PriorKnowledge

Source
pub trait PriorKnowledge: Sync {
    // Required methods
    fn forbidden(&self) -> &HashSet<(usize, usize)>;
    fn has_forbidden(&self, x: usize, y: usize) -> bool;
    fn add_forbidden(&mut self, x: usize, y: usize) -> bool;
    fn del_forbidden(&mut self, x: usize, y: usize) -> bool;
    fn required(&self) -> &HashSet<(usize, usize)>;
    fn has_required(&self, x: usize, y: usize) -> bool;
    fn add_required(&mut self, x: usize, y: usize) -> bool;
    fn del_required(&mut self, x: usize, y: usize) -> bool;
    fn labels(&self) -> &BTreeSet<String>;
}
Expand description

Prior knowledge trait

Required Methods§

Source

fn forbidden(&self) -> &HashSet<(usize, usize)>

Get the set of forbidden edges.

Source

fn has_forbidden(&self, x: usize, y: usize) -> bool

Checks if edge is forbidden.

Source

fn add_forbidden(&mut self, x: usize, y: usize) -> bool

Add edge to the forbidden set.

Source

fn del_forbidden(&mut self, x: usize, y: usize) -> bool

Delete edge from the forbidden set.

Source

fn required(&self) -> &HashSet<(usize, usize)>

Get the set of required edges.

Source

fn has_required(&self, x: usize, y: usize) -> bool

Checks if edge is required.

Source

fn add_required(&mut self, x: usize, y: usize) -> bool

Add edge to the required set.

Source

fn del_required(&mut self, x: usize, y: usize) -> bool

Delete edge from the required set.

Source

fn labels(&self) -> &BTreeSet<String>

Get the set of varibles labels.

Implementors§