Class GraphStructureInconsistencyMeasure

java.lang.Object
org.tweetyproject.arg.dung.GraphStructureInconsistencyMeasure

public class GraphStructureInconsistencyMeasure extends Object
Author:
Timothy Gillespie
  • Constructor Details

    • GraphStructureInconsistencyMeasure

      public GraphStructureInconsistencyMeasure()
  • Method Details

    • setUpBeforeClass

      public static void setUpBeforeClass() throws Exception
      Sets up test frameworks before all tests are executed. This includes initializing frameworks with various arguments and attacks to represent different scenarios.
      Throws:
      Exception - if there is an error during setup, such as an argument being incorrectly added.
    • drasticWithAttackReturnsOne

      public void drasticWithAttackReturnsOne()
      Tests the drastic inconsistency measure on a framework where attacks are directed towards a single node, expecting a measure of 1 due to the presence of an attack.
    • drasticWithNoAttackReturnsZero

      public void drasticWithNoAttackReturnsZero()
      Tests the DrasticInconsistencyMeasure.inconsistencyMeasure(T) method to verify that it returns zero when applied to an attack-free DungTheory framework.

      This test creates an instance of DrasticInconsistencyMeasure and applies it to a DungTheory framework that contains no attacks. It then asserts that the inconsistency measure is zero, as expected for an attack-free framework.

      Expected result: The inconsistency measure should be 0.0.

      See Also:
    • inSumWithThreeEdgesReturnsThree

      public void inSumWithThreeEdgesReturnsThree()
      Tests the InSumInconsistencyMeasure.inconsistencyMeasure(T) method to verify that it returns three when applied to a DungTheory framework with three edges.

      This test creates an instance of InSumInconsistencyMeasure and applies it to a DungTheory framework represented by hunterExample13G1, which contains three edges. It then asserts that the inconsistency measure is three, as expected for a framework with three edges.

      Expected result: The inconsistency measure should be 3.0.

      See Also:
    • inSumWithNoAttackReturnsZero

      public void inSumWithNoAttackReturnsZero()
      Tests the InSumInconsistencyMeasure.inconsistencyMeasure(T) method to verify that it returns zero when applied to an attack-free DungTheory framework.

      This test creates an instance of InSumInconsistencyMeasure and applies it to a DungTheory framework that contains no attacks. It then asserts that the inconsistency measure is zero, as expected for an attack-free framework.

      Expected result: The inconsistency measure should be 0.0.

      See Also:
    • inSumWorksWithCycles

      public void inSumWorksWithCycles()
      Tests the InSumInconsistencyMeasure.inconsistencyMeasure(T) method to verify that it works correctly with cyclic DungTheory frameworks.

      This test creates an instance of InSumInconsistencyMeasure and applies it to a DungTheory framework represented by hunterExample14G1, which contains cycles. It then asserts that the inconsistency measure is 4.0, as expected for this framework.

      Expected result: The inconsistency measure should be 4.0.

      See Also:
    • weightedInSumExample1

      public void weightedInSumExample1()
      Tests the WeightedInSumInconsistencyMeasure.inconsistencyMeasure(T) method using the first example framework hunterExample13G1.

      This test creates an instance of WeightedInSumInconsistencyMeasure and applies it to a DungTheory framework represented by hunterExample13G1. It then asserts that the inconsistency measure is one-third, as expected for this framework.

      Expected result: The inconsistency measure should be 1/3 (0.333...).

      See Also:
    • weightedInSumExample2

      public void weightedInSumExample2()
      Tests the WeightedInSumInconsistencyMeasure.inconsistencyMeasure(T) method using the second example framework hunterExample13G2.

      This test creates an instance of WeightedInSumInconsistencyMeasure and applies it to a DungTheory framework represented by hunterExample13G2. It then asserts that the inconsistency measure is one-half, as expected for this framework.

      Expected result: The inconsistency measure should be 1/2 (0.5).

      See Also:
    • weightedInSumWorkedWithCycles

      public void weightedInSumWorkedWithCycles()
      Tests the WeightedInSumInconsistencyMeasure.inconsistencyMeasure(T) method to verify that it works correctly with cyclic DungTheory frameworks.

      This test creates an instance of WeightedInSumInconsistencyMeasure and applies it to a DungTheory framework represented by hunterExample14G1, which contains cycles. It then asserts that the inconsistency measure is 4.0, as expected for this framework.

      Expected result: The inconsistency measure should be 4.0.

      See Also:
    • weightedOutSumExample1

      public void weightedOutSumExample1()
      Tests the weighted out-sum inconsistency measure on the first example graph (hunterExample13G1). Verifies that the inconsistency measure matches the expected value.
    • weightedOutSumExample2

      public void weightedOutSumExample2()
      Tests the weighted out-sum inconsistency measure on the second example graph (hunterExample13G2). Verifies that the inconsistency measure matches the expected value.
    • weightedOutSumWorkedWithCycles

      public void weightedOutSumWorkedWithCycles()
      Tests the weighted out-sum inconsistency measure on a graph with cycles (hunterExample14G1). Verifies that the inconsistency measure matches the expected value.
    • weightedComponentCountExample1

      public void weightedComponentCountExample1()
      Tests the weighted component count inconsistency measure on the first example graph (hunterExample13G1). Verifies that the inconsistency measure matches the expected value.
    • weightedComponentCountExample2

      public void weightedComponentCountExample2()
      Tests the weighted component count inconsistency measure on the second example graph (hunterExample13G2). Verifies that the inconsistency measure matches the expected value.
    • weightedComponentCountWorksWithCycles

      public void weightedComponentCountWorksWithCycles()
      Tests the weighted component count inconsistency measure on a graph with cycles (hunterExample14G1). Verifies that the inconsistency measure matches the expected value.
    • weightedComponentCountWorksWithTwoComponent

      public void weightedComponentCountWorksWithTwoComponent()
      Tests the weighted component count inconsistency measure on a framework with two components (twoComponentFramework). Verifies that the inconsistency measure matches the expected value.
    • cycleCountExample1

      public void cycleCountExample1()
      Tests the cycle count inconsistency measure on the first example graph (hunterExample13G1). Verifies that the inconsistency measure matches the expected value.
    • cycleCountExample2

      public void cycleCountExample2()
      Tests the cycle count inconsistency measure on the second example graph (hunterExample13G2). Verifies that the inconsistency measure matches the expected value.
    • cycleCountExample3

      public void cycleCountExample3()
      Tests the cycle count inconsistency measure on a graph with cycles (hunterExample14G1). Verifies that the inconsistency measure matches the expected value.
    • cycleCountExample4

      public void cycleCountExample4()
      Tests the cycle count inconsistency measure on a different graph with cycles (hunterExample14G2). Verifies that the inconsistency measure matches the expected value.
    • cycleCountExample5

      public void cycleCountExample5()
      Tests the cycle count inconsistency measure on the tenth example graph (hunterExample10). Verifies that the inconsistency measure matches the expected value.
    • cycleCountWorksWithTwoComponents

      public void cycleCountWorksWithTwoComponents()
      Tests the cycle count inconsistency measure on a framework with two components (twoComponentFramework). Verifies that the inconsistency measure matches the expected value.
    • weightedCycleCountExample1

      public void weightedCycleCountExample1()
      Tests the weighted cycle count inconsistency measure on the first example graph (hunterExample13G1). Verifies that the inconsistency measure matches the expected value.
    • weightedCycleCountExample2

      public void weightedCycleCountExample2()
      Tests the weighted cycle count inconsistency measure on the second example graph (hunterExample13G2). Verifies that the inconsistency measure matches the expected value.
    • weightedCycleCountExample3

      public void weightedCycleCountExample3()
      Tests the weighted cycle count inconsistency measure on a graph with cycles (hunterExample14G1). Verifies that the inconsistency measure matches the expected value.
    • weightedCycleCountExample4

      public void weightedCycleCountExample4()
      Tests the weighted cycle count inconsistency measure on a different graph with cycles (hunterExample14G2). Verifies that the inconsistency measure matches the expected value.
    • weightedCycleCountExample5

      public void weightedCycleCountExample5()
      Tests the weighted cycle count inconsistency measure on the tenth example graph (hunterExample10). Verifies that the inconsistency measure matches the expected value.
    • weightedCycleCountWorksWithTwoComponents

      public void weightedCycleCountWorksWithTwoComponents()
      Tests the weighted cycle count inconsistency measure on a framework with two components (twoComponentFramework). Verifies that the inconsistency measure matches the expected value.