Example #1
0
        public override IAsciiBasePropositionalOperator Negate()
        {
            var not = new NotPropositionalOperator(_argumentManager);

            not.Instantiate(new [] { this });
            return(not);
        }
Example #2
0
        public override IAsciiBasePropositionalOperator ToAndOrNot()
        {
            var not = new NotPropositionalOperator(_argumentManager);

            not.Instantiate(GetChilds().Select(x => x.ToAndOrNot()).ToArray());
            return(not);
        }
        public override IAsciiBasePropositionalOperator ToNandify()
        {
            var not  = new NotPropositionalOperator(_argumentManager);
            var nand = new NotAndPropositionalOperator(_argumentManager);

            nand.Instantiate(new[] { GetChilds()[0].ToNandify(), GetChilds()[1].ToNandify() });
            not.Instantiate(new IAsciiBasePropositionalOperator[] { nand });
            return(not.ToNandify());
        }
Example #4
0
        public override IAsciiBasePropositionalOperator ToNandify()
        {
            var nand = new NotAndPropositionalOperator(_argumentManager);
            var notA = new NotPropositionalOperator(_argumentManager);
            var notB = new NotPropositionalOperator(_argumentManager);

            notA.Instantiate(new [] { GetChilds()[0] });
            notB.Instantiate(new [] { GetChilds()[1] });
            nand.Instantiate(new [] { notA.ToNandify(), notB.ToNandify() });
            return(nand);
        }