/// Return the structural size of a given formula, after consideration of
/// some specific element.
Return the structural size of a given formula, after consideration of
some specific element.
Return the structural size of a given formula after consideration of some specific element .
pub fn size(&mut self, element: &A) -> usize {
        match self {
            Ltl::Top => 1,
            Ltl::Bottom(_) => 1,
            Ltl::Abort(_) => 1,
            Ltl::Examine(f) => 1 + (&mut *f.borrow_mut())(element).borrow_mut().size(element),
            Ltl::And(p, q) => 1 + p.borrow_mut().size(element) + q.borrow_mut().size(element),
            Ltl::Or(p, q) => 1 + p.borrow_mut().size(element) + q.borrow_mut().size(element),
            Ltl::Next(p) => 1 + p.borrow_mut().size(element),
            Ltl::Until(p, q) => 1 + p.borrow_mut().size(element) + q.borrow_mut().size(element),
            Ltl::Release(p, q) => 1 + p.borrow_mut().size(element) + q.borrow_mut().size(element),
            Ltl::Eventually(p) => 1 + p.borrow_mut().size(element),
            Ltl::HardEventually(p) => 1 + p.borrow_mut().size(element),
            Ltl::Always(p) => 1 + p.borrow_mut().size(element),
        }
    }
pub fn size ( & mut self , element : & A ) -> usize { match self { Ltl :: Top => 1 , Ltl :: Bottom ( _ ) => 1 , Ltl :: Abort ( _ ) => 1 , Ltl :: Examine ( f ) => 1 + ( & mut * f . borrow_mut ( ) ) ( element ) . borrow_mut ( ) . size ( element ) , Ltl :: And ( p , q ) => 1 + p . borrow_mut ( ) . size ( element ) + q . borrow_mut ( ) . size ( element ) , Ltl :: Or ( p , q ) => 1 + p . borrow_mut ( ) . size ( element ) + q . borrow_mut ( ) . size ( element ) , Ltl :: Next ( p ) => 1 + p . borrow_mut ( ) . size ( element ) , Ltl :: Until ( p , q ) => 1 + p . borrow_mut ( ) . size ( element ) + q . borrow_mut ( ) . size ( element ) , Ltl :: Release ( p , q ) => 1 + p . borrow_mut ( ) . size ( element ) + q . borrow_mut ( ) . size ( element ) , Ltl :: Eventually ( p ) => 1 + p . borrow_mut ( ) . size ( element ) , Ltl :: HardEventually ( p ) => 1 + p . borrow_mut ( ) . size ( element ) , Ltl :: Always ( p ) => 1 + p . borrow_mut ( ) . size ( element ) , } }
Return the structural size of a given formula, after consideration of
some specific element.
Return the structural size of a given formula after consideration of some specific element .
&mut self
element
&A