コード例 #1
0
        public JudgementsRelationResult DetermineRelation(Judgement targetJudgement)
        {
            var result = new JudgementsRelationResult();

            if (A)
            {
                if (targetJudgement.O)
                {
                    result.IsCorrect = true;
                    result.Relation = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect =
                        DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.I)
                {
                    result.IsCorrect = true;
                    result.Relation = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully
                        ? DefinitionStateFabric.Get(targetJudgement.IsTrully)
                        : DefinitionState.Undefined;
                }
                if (targetJudgement.E)
                {
                    result.IsCorrect = true;
                    result.Relation = new ContraryRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully
                        ? DefinitionStateFabric.Get(!targetJudgement.IsTrully)
                        : DefinitionState.Undefined;
                }
            }
            if (I)
            {
                if (targetJudgement.E)
                {
                    result.IsCorrect = true;
                    result.Relation = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.A)
                {
                    result.IsCorrect = true;
                    result.Relation = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(!targetJudgement.IsTrully);
                }
                if (targetJudgement.O)
                {
                    result.IsCorrect = true;
                    result.Relation = new SubcontraryRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(targetJudgement.IsTrully);
                }
            }
            if (E)
            {
                if (targetJudgement.I)
                {
                    result.IsCorrect = true;
                    result.Relation = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.O)
                {
                    result.IsCorrect = true;
                    result.Relation = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionStateFabric.Get(targetJudgement.IsTrully) : DefinitionState.Undefined;
                }
                if (targetJudgement.A)
                {
                    result.IsCorrect = true;
                    result.Relation = new ContraryRelation() { ExtremeContradiction = true };
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionStateFabric.Get(!targetJudgement.IsTrully) : DefinitionState.Undefined;
                }
            }
            if (O)
            {
                if (targetJudgement.A)
                {
                    result.IsCorrect = true;
                    result.Relation = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.E)
                {
                    result.IsCorrect = true;
                    result.Relation = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(!targetJudgement.IsTrully);
                }
                if (targetJudgement.I)
                {
                    result.IsCorrect = true;
                    result.Relation = new SubcontraryRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(targetJudgement.IsTrully);
                }
            }

            return result;
        }
コード例 #2
0
        public JudgementsRelationResult DetermineRelation(Judgement targetJudgement)
        {
            var result = new JudgementsRelationResult();

            if (A)
            {
                if (targetJudgement.O)
                {
                    result.IsCorrect = true;
                    result.Relation  = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect =
                        DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.I)
                {
                    result.IsCorrect = true;
                    result.Relation  = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully
                        ? DefinitionStateFabric.Get(targetJudgement.IsTrully)
                        : DefinitionState.Undefined;
                }
                if (targetJudgement.E)
                {
                    result.IsCorrect = true;
                    result.Relation  = new ContraryRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully
                        ? DefinitionStateFabric.Get(!targetJudgement.IsTrully)
                        : DefinitionState.Undefined;
                }
            }
            if (I)
            {
                if (targetJudgement.E)
                {
                    result.IsCorrect = true;
                    result.Relation  = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.A)
                {
                    result.IsCorrect = true;
                    result.Relation  = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(!targetJudgement.IsTrully);
                }
                if (targetJudgement.O)
                {
                    result.IsCorrect = true;
                    result.Relation  = new SubcontraryRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(targetJudgement.IsTrully);
                }
            }
            if (E)
            {
                if (targetJudgement.I)
                {
                    result.IsCorrect = true;
                    result.Relation  = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.O)
                {
                    result.IsCorrect = true;
                    result.Relation  = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionStateFabric.Get(targetJudgement.IsTrully) : DefinitionState.Undefined;
                }
                if (targetJudgement.A)
                {
                    result.IsCorrect = true;
                    result.Relation  = new ContraryRelation()
                    {
                        ExtremeContradiction = true
                    };
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionStateFabric.Get(!targetJudgement.IsTrully) : DefinitionState.Undefined;
                }
            }
            if (O)
            {
                if (targetJudgement.A)
                {
                    result.IsCorrect = true;
                    result.Relation  = new ContradictionRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = DefinitionStateFabric.Get(IsTrully != targetJudgement.IsTrully);
                }
                if (targetJudgement.E)
                {
                    result.IsCorrect = true;
                    result.Relation  = new SubordinationRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(!targetJudgement.IsTrully);
                }
                if (targetJudgement.I)
                {
                    result.IsCorrect = true;
                    result.Relation  = new SubcontraryRelation();
                    result.IsTruthStateOfComparableJudgementCorrect = IsTrully ? DefinitionState.Undefined : DefinitionStateFabric.Get(targetJudgement.IsTrully);
                }
            }

            return(result);
        }