AIMA.Core.Logic.Propositional.Parsing.Ast.BinarySentence.firstTermIsAndSentence C# (CSharp) Method

firstTermIsAndSentence() public method

public firstTermIsAndSentence ( ) : bool
return bool
        public bool firstTermIsAndSentence()
        {
            return (getFirst() is BinarySentence)
                    && (((BinarySentence)getFirst()).isAndSentence());
        }

Usage Example

Beispiel #1
0
 public override Object visitBinarySentence(BinarySentence bs, Object arg)
 {
     if (bs.isBiconditional())
     {
         return transformBiConditionalSentence(bs);
     }
     else if (bs.isImplication())
     {
         return transformImpliedSentence(bs);
     }
     else if (bs.isOrSentence()
           && (bs.firstTermIsAndSentence() || bs.secondTermIsAndSentence()))
     {
         return distributeOrOverAnd(bs);
     }
     else
     {
         return base.visitBinarySentence(bs, arg);
     }
 }
All Usage Examples Of AIMA.Core.Logic.Propositional.Parsing.Ast.BinarySentence::firstTermIsAndSentence