Skip to content

Commit 4f7e458

Browse files
committed
Added missing javadoc
1 parent 3d7a0e8 commit 4f7e458

File tree

17 files changed

+138
-14
lines changed

17 files changed

+138
-14
lines changed

org-tweetyproject-arg-adf/src/main/java/org/tweetyproject/arg/adf/syntax/pl/Literal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
* The {@code Literal} interface represents a logical literal, which can be either a positive or negative
2727
* proposition. Literals are fundamental components in propositional logic and SAT solvers. They can be
2828
* used to construct clauses, represent assumptions, and encode constraints.
29-
* <p>
29+
*
3030
*
3131
* @author Mathias Hofer
3232
*/

org-tweetyproject-arg-bipolar/src/main/java/org/tweetyproject/arg/bipolar/examples/CheckIfSelfSupportingExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@
2929

3030
/**
3131
* This class demonstrates the use of the {@link EAFTheory} class to check for self-supporting sets of arguments.
32-
* <p>
32+
*
3333
* In this example, an extended argumentation framework (EAF) is created with a set of arguments and supports/attacks between them.
3434
* The goal is to check whether certain sets of arguments are self-supporting using the {@code checkIsSelfSupporting} method
3535
* of the {@link EAFTheory} class.
36-
* <p>
36+
*
3737
* @author Your Name
3838
*/
3939
public class CheckIfSelfSupportingExample {

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/equivalence/kernel/EquivalenceKernel.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ public static EquivalenceKernel getStrongEquivalenceKernelForSemantics(Semantics
9999
}
100100
}
101101

102+
103+
/**
104+
* Returns the strong expansion equivalence kernel for the given semantics.
105+
*
106+
* @param semantics the semantics
107+
* @return the corresponding equivalence kernel
108+
* @throws IllegalArgumentException if no kernel is defined for the given semantics
109+
*/
102110
public static EquivalenceKernel getStrongExpansionEquivalenceKernelForSemantics(Semantics semantics) {
103111
switch (semantics) {
104112
case SST,EA -> {

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/equivalence/kernel/LocalExpansionCompleteKernel.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@
77
import java.util.Collection;
88
import java.util.HashSet;
99

10+
/**
11+
* Equivalence kernel for local expansion under complete semantics.
12+
*/
1013
public class LocalExpansionCompleteKernel extends EquivalenceKernel {
14+
/**
15+
* Computes the redundant attacks for the given argumentation theory.
16+
*
17+
* @param theory the argumentation framework
18+
* @return the collection of redundant attacks
19+
*/
1120
@Override
1221
public Collection<Attack> getRedundantAttacks(DungTheory theory) {
1322
Collection<Attack> attacks = new HashSet<>();

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/examples/QualifiedSemanticsReasonerExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public static DungTheory example2() {
9999
/**
100100
* Creates and returns an example of a Dung argumentation framework (Dung
101101
* Theory).
102-
* <p>
102+
*
103103
*
104104
* @return A {@link DungTheory} object representing the defined argumentation
105105
* framework.

org-tweetyproject-arg-dung/src/main/java/org/tweetyproject/arg/dung/writer/TikzWriter.java

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,18 @@
3939
*/
4040
public class TikzWriter extends AbstractDungWriter {
4141

42+
/** Mapping from integer identifiers to arguments. */
4243
protected Argument[] intToArg;
44+
45+
/** Mapping from arguments to integer identifiers. */
4346
protected Map<Argument, Integer> argToInt;
4447

48+
49+
/**
50+
* Initializes the internal argument–identifier mappings.
51+
*
52+
* @param aaf the argumentation framework
53+
*/
4554
protected void initialize(DungTheory aaf) {
4655
// Initialize mapping from Argument to ID and vice versa
4756
intToArg = new Argument[aaf.size() + 1];
@@ -54,10 +63,27 @@ protected void initialize(DungTheory aaf) {
5463
}
5564
}
5665

66+
/**
67+
* Computes a planar mapping of the given argumentation framework
68+
* for a grid of the specified dimensions.
69+
*
70+
* @param aaf the argumentation framework
71+
* @param width the grid width
72+
* @param height the grid height
73+
*/
5774
protected void findPlanarMapping(DungTheory aaf, int width, int height) {
5875

5976
}
6077

78+
/**
79+
* Checks whether the given argumentation framework can be laid out sufficiently planar
80+
* on a grid of the given dimensions.
81+
*
82+
* @param aaf the argumentation framework
83+
* @param width the grid width
84+
* @param height the grid height
85+
* @return {@code true} if the layout is sufficiently planar, {@code false} otherwise
86+
*/
6187
protected boolean isSufficientlyPlanar(DungTheory aaf, int width, int height) {
6288
for (Argument argument : aaf) {
6389
Collection<Argument> neighboring = new HashSet<>();
@@ -126,7 +152,14 @@ public String write(DungTheory aaf, int width, int height) {
126152
writer.close();
127153
return out.toString();
128154
}
129-
155+
/**
156+
* Writes TikZ code for the arguments arranged in a grid.
157+
*
158+
* @param aaf the collection of arguments
159+
* @param width the grid width
160+
* @param height the grid height
161+
* @return a string containing the TikZ commands for arguments
162+
*/
130163
protected String writeArguments(Collection<Argument> aaf, int width, int height) {
131164
StringBuilder s = new StringBuilder();
132165
// Write arguments
@@ -190,6 +223,12 @@ protected String writeArgument(Argument arg) {
190223
}
191224
}
192225

226+
/**
227+
* Writes TikZ code for all attacks in the given argumentation framework.
228+
*
229+
* @param aaf the argumentation framework
230+
* @return a string containing the TikZ commands for attacks
231+
*/
193232
protected String writeAttacks(DungTheory aaf) {
194233
StringBuilder s = new StringBuilder();
195234
// Write attacks
@@ -211,10 +250,26 @@ protected String writeAttacks(DungTheory aaf) {
211250
return s.toString();
212251
}
213252

253+
/**
254+
* Writes TikZ code for an attack between two arguments.
255+
*
256+
* @param argId1 the source argument identifier
257+
* @param argId2 the target argument identifier
258+
* @return a string containing the TikZ command for the attack
259+
*/
214260
protected String writeAttack(int argId1, int argId2) {
215261
return writeAttack(argId1, argId2, "single");
216262
}
217263

264+
/**
265+
* Writes TikZ code for an attack between two arguments.
266+
*
267+
* @param argId1 the source argument identifier
268+
* @param argId2 the target argument identifier
269+
* @param mode the attack drawing mode
270+
* @return a string containing the TikZ command for the attack
271+
* @throws IllegalArgumentException if the mode is unknown
272+
*/
218273
protected String writeAttack(int argId1, int argId2, String mode) {
219274
return switch (mode) {
220275
case "single" -> String.format("\\attack{a%s}{a%s}%n", argId1, argId2);
@@ -224,6 +279,14 @@ protected String writeAttack(int argId1, int argId2, String mode) {
224279
};
225280
}
226281

282+
/**
283+
* Writes TikZ code for self-attacks in the given argumentation framework.
284+
*
285+
* @param aaf the argumentation framework
286+
* @param width the grid width
287+
* @param height the grid height
288+
* @return a string containing the TikZ commands for self-attacks
289+
*/
227290
protected String writeSelfAttacks(DungTheory aaf, int width, int height) {
228291
StringBuilder s = new StringBuilder();
229292
// Write self-attacks

org-tweetyproject-arg-explanations/src/main/java/org/tweetyproject/arg/explanations/examples/SequenceExplanationExample.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@
2727

2828
import java.util.Collection;
2929

30+
3031
/**
31-
* Example usage of sequence explanations
32-
*
33-
* @author Lars Bengel
34-
*/
32+
* Runs an example demonstrating sequence explanations.
33+
*
34+
* @author Lars Bengel
35+
*/
3536
public class SequenceExplanationExample {
37+
/**
38+
* Runs an example demonstrating sequence explanations.
39+
*
40+
* @param args command-line arguments (not used)
41+
*/
3642
public static void main(String[] args) {
3743
AbstractSequenceExplanationReasoner reasoner = new DialecticalSequenceExplanationReasoner();
3844
DungTheory theory = new DungTheory();

org-tweetyproject-arg-explanations/src/main/java/org/tweetyproject/arg/explanations/examples/SufficientExplanationExample.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
* @author Lars Bengel
3030
*/
3131
public class SufficientExplanationExample {
32+
/**
33+
* Runs an example demonstrating sufficient explanation relevance.
34+
*
35+
* @param args command-line arguments (not used)
36+
*/
3237
public static void main(String[] args) {
3338
DungTheory theory = new DungTheory();
3439
Argument a = new Argument("a");

org-tweetyproject-arg-explanations/src/main/java/org/tweetyproject/arg/explanations/semantics/Explanation.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ public Argument getArgument() {
4747
*/
4848
protected Explanation(Argument argument) {
4949
this.argument = argument;
50-
}
50+
}
5151

52+
/**
53+
* Returns the set-based explanation.
54+
*
55+
* @return the explanation as a collection of arguments
56+
*/
5257
public abstract Collection<Argument> getSetExplanation();
5358
}

org-tweetyproject-causal/src/main/java/org/tweetyproject/causal/examples/CausalReasoningExampleSurfer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,10 @@
3838
*/
3939
public class CausalReasoningExampleSurfer {
4040
/**
41+
* Runs a demonstration of argumentation-based causal reasoning.
4142
*
42-
* @param args cmdline arguments (unused)
43+
* @param args command-line arguments (not used)
44+
* @throws StructuralCausalModel.CyclicDependencyException if the causal model is cyclic
4345
*/
4446
public static void main(String[] args) throws StructuralCausalModel.CyclicDependencyException {
4547
// Background atoms

0 commit comments

Comments
 (0)