Teloidable

Trait Teloidable 

Source
pub trait Teloidable {
    // Required methods
    fn add_teloid(&mut self, id: TeloidID) -> Result<usize, DeonticError>;
    fn get_teloid_id(&self, index: usize) -> Option<TeloidID>;
    fn contains_teloid(&self, index: usize) -> bool;
    fn add_inheritance_edge(
        &mut self,
        parent_idx: usize,
        child_idx: usize,
    ) -> Result<(), DeonticError>;
    fn add_defeasance_edge(
        &mut self,
        defeater_idx: usize,
        defeated_idx: usize,
    ) -> Result<(), DeonticError>;
}
Expand description

Defines the domain-specific API for a graph of Teloids.

Required Methods§

Source

fn add_teloid(&mut self, id: TeloidID) -> Result<usize, DeonticError>

Adds a Teloid to the graph by its ID.

Source

fn get_teloid_id(&self, index: usize) -> Option<TeloidID>

Gets the TeloidID of the node at a given index.

Source

fn contains_teloid(&self, index: usize) -> bool

Checks if a node with a given index exists in the graph.

Source

fn add_inheritance_edge( &mut self, parent_idx: usize, child_idx: usize, ) -> Result<(), DeonticError>

Adds an inheritance edge between two Teloid nodes.

Source

fn add_defeasance_edge( &mut self, defeater_idx: usize, defeated_idx: usize, ) -> Result<(), DeonticError>

Adds a defeasance edge between two Teloid nodes.

Implementors§