AIMA.Core.Logic.FOL.KB.Data.Chain.setProofStep C# (CSharp) Method

setProofStep() public method

public setProofStep ( ProofStep proofStep ) : void
proofStep ProofStep
return void
        public void setProofStep(ProofStep proofStep)
        {
            this.proofStep = proofStep;
        }

Usage Example

Beispiel #1
0
        /**
         * A contrapositive of a chain is a permutation in which a different literal
         * is placed at the front. The contrapositives of a chain are logically
         * equivalent to the original chain.
         *
         * @return a list of contrapositives for this chain.
         */
        public List <Chain> getContrapositives()
        {
            List <Chain>   contrapositives = new List <Chain>();
            List <Literal> lits            = new List <Literal>();

            for (int i = 1; i < literals.Count; i++)
            {
                lits.Clear();
                lits.Add(literals[i]);
                lits.AddRange(literals.Take(i));
                lits.AddRange(literals.GetRange(i + 1, literals.Count));
                Chain cont = new Chain(lits);
                cont.setProofStep(new ProofStepChainContrapositive(cont, this));
                contrapositives.Add(cont);
            }

            return(contrapositives);
        }
All Usage Examples Of AIMA.Core.Logic.FOL.KB.Data.Chain::setProofStep