コード例 #1
0
ファイル: Sentence.cs プロジェクト: tvn-cosine/aima.net
        /**
         * Allow a PLVisitor to walk over the abstract syntax tree represented by this
         * Sentence.
         *
         * @param plv
         *            a Propositional Logic visitor.
         * @param arg
         *            an optional argument for use by the visior.
         * @return a result specific to the visitors behavior.
         */
        public virtual R accept <A, R>(PLVisitor <A, R> plv, A arg)
        {
            R result = default(R);

            if (isPropositionSymbol())
            {
                result = plv.visitPropositionSymbol((PropositionSymbol)this, arg);
            }
            else if (isUnarySentence())
            {
                result = plv.visitUnarySentence((ComplexSentence)this, arg);
            }
            else if (isBinarySentence())
            {
                result = plv.visitBinarySentence((ComplexSentence)this, arg);
            }

            return(result);
        }
コード例 #2
0
ファイル: BinarySentence.cs プロジェクト: langeds/aima
		public override Object accept(PLVisitor plv, Object arg) 
		{
			return plv.visitBinarySentence(this, arg);
		}
コード例 #3
0
 public override Object accept(PLVisitor plv, Object arg)
 {
     return(plv.visitBinarySentence(this, arg));
 }