Class GraphStructureInconsistencyMeasure
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Tests the cycle count inconsistency measure on the first example graph (hunterExample13G1).void
Tests the cycle count inconsistency measure on the second example graph (hunterExample13G2).void
Tests the cycle count inconsistency measure on a graph with cycles (hunterExample14G1).void
Tests the cycle count inconsistency measure on a different graph with cycles (hunterExample14G2).void
Tests the cycle count inconsistency measure on the tenth example graph (hunterExample10).void
Tests the cycle count inconsistency measure on a framework with two components (twoComponentFramework).void
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.void
Tests theDrasticInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it returns zero when applied to an attack-freeDungTheory
framework.void
Tests theInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it returns zero when applied to an attack-freeDungTheory
framework.void
Tests theInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it returns three when applied to aDungTheory
framework with three edges.void
Tests theInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it works correctly with cyclicDungTheory
frameworks.static void
Sets up test frameworks before all tests are executed.void
Tests the weighted component count inconsistency measure on the first example graph (hunterExample13G1).void
Tests the weighted component count inconsistency measure on the second example graph (hunterExample13G2).void
Tests the weighted component count inconsistency measure on a graph with cycles (hunterExample14G1).void
Tests the weighted component count inconsistency measure on a framework with two components (twoComponentFramework).void
Tests the weighted cycle count inconsistency measure on the first example graph (hunterExample13G1).void
Tests the weighted cycle count inconsistency measure on the second example graph (hunterExample13G2).void
Tests the weighted cycle count inconsistency measure on a graph with cycles (hunterExample14G1).void
Tests the weighted cycle count inconsistency measure on a different graph with cycles (hunterExample14G2).void
Tests the weighted cycle count inconsistency measure on the tenth example graph (hunterExample10).void
Tests the weighted cycle count inconsistency measure on a framework with two components (twoComponentFramework).void
Tests theWeightedInSumInconsistencyMeasure.inconsistencyMeasure(T)
method using the first example frameworkhunterExample13G1
.void
Tests theWeightedInSumInconsistencyMeasure.inconsistencyMeasure(T)
method using the second example frameworkhunterExample13G2
.void
Tests theWeightedInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it works correctly with cyclicDungTheory
frameworks.void
Tests the weighted out-sum inconsistency measure on the first example graph (hunterExample13G1).void
Tests the weighted out-sum inconsistency measure on the second example graph (hunterExample13G2).void
Tests the weighted out-sum inconsistency measure on a graph with cycles (hunterExample14G1).
-
Constructor Details
-
GraphStructureInconsistencyMeasure
public GraphStructureInconsistencyMeasure()
-
-
Method Details
-
setUpBeforeClass
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 theDrasticInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it returns zero when applied to an attack-freeDungTheory
framework.This test creates an instance of
DrasticInconsistencyMeasure
and applies it to aDungTheory
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 theInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it returns three when applied to aDungTheory
framework with three edges.This test creates an instance of
InSumInconsistencyMeasure
and applies it to aDungTheory
framework represented byhunterExample13G1
, 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 theInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it returns zero when applied to an attack-freeDungTheory
framework.This test creates an instance of
InSumInconsistencyMeasure
and applies it to aDungTheory
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 theInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it works correctly with cyclicDungTheory
frameworks.This test creates an instance of
InSumInconsistencyMeasure
and applies it to aDungTheory
framework represented byhunterExample14G1
, 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 theWeightedInSumInconsistencyMeasure.inconsistencyMeasure(T)
method using the first example frameworkhunterExample13G1
.This test creates an instance of
WeightedInSumInconsistencyMeasure
and applies it to aDungTheory
framework represented byhunterExample13G1
. 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 theWeightedInSumInconsistencyMeasure.inconsistencyMeasure(T)
method using the second example frameworkhunterExample13G2
.This test creates an instance of
WeightedInSumInconsistencyMeasure
and applies it to aDungTheory
framework represented byhunterExample13G2
. 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 theWeightedInSumInconsistencyMeasure.inconsistencyMeasure(T)
method to verify that it works correctly with cyclicDungTheory
frameworks.This test creates an instance of
WeightedInSumInconsistencyMeasure
and applies it to aDungTheory
framework represented byhunterExample14G1
, 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.
-