Skip to content

Commit 27a3f91

Browse files
Ruediger.LundeRuediger.Lunde
authored andcommitted
javadoc documentation improved, warnings fixed.
1 parent 02af834 commit 27a3f91

10 files changed

Lines changed: 39 additions & 39 deletions

File tree

src/aima/basic/BasicEnvironmentView.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package aima.basic;
22

3+
/**
4+
* @author Ravi Mohan
5+
*
6+
*/
37
public class BasicEnvironmentView {
48

5-
/**
6-
* @author Ravi Mohan
7-
*
8-
*/
9-
109
public void envChanged(String command) {
1110
System.out.println(command);
1211

src/aima/gui/applications/search/map/MapAgentModel.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
* Provides a ready-to-use implementation of a model for route planning agent
1212
* applications. It is based on a scenario description and a list of
1313
* destinations. Some features are not used. Subclasses can support those
14-
* features by overriding the methods {@link #hasSignpost(String)},
15-
* {@link #hasInfos(String)}, and {@link #hasObjects(String)}.
14+
* features by overriding the methods {@link #hasInfos(String)}, and
15+
* {@link #hasObjects(String)}.
1616
*
1717
* @author R. Lunde
1818
*/

src/aima/gui/framework/package.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
frame. It is configurable in many ways, even without subclassing. A
1212
demo application with model, view, and controller, but still without any content,
1313
can be seen when starting the <code>SimpleAgentAppDemo</code>. Look for classes
14-
with the ending ...<code>AppDemo</code> to see agents at work.</p>
14+
with the ending ...<code>AppDemo</code> in the <code>aima.gui.applications</code>
15+
package to see agents at work.</p>
1516

1617
<p>This simple framework is strongly based on inheritance. You can extend any
1718
of the given base classes with the features you need. To be very flexible with

src/aima/learning/framework/DataSetSpecification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void defineStringAttribute(String name, String[] attributeValues) {
7070
}
7171

7272
/**
73-
* @param targetAttribute
73+
* @param target
7474
* The targetAttribute to set.
7575
*/
7676
public void setTarget(String target) {

src/aima/logic/fol/inference/InferenceResultPrinter.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ public class InferenceResultPrinter {
1212
* Utility method for outputting InferenceResults in a formatted textual
1313
* representation.
1414
*
15-
* @param an
16-
* InferenceResult
15+
* @param ir
16+
* an InferenceResult
1717
* @return a String representation of the InferenceResult.
1818
*/
1919
public static String printInferenceResult(InferenceResult ir) {
@@ -28,13 +28,14 @@ public static String printInferenceResult(InferenceResult ir) {
2828
sb.append("\n");
2929
sb.append("InferenceResult.isPartialResultDueToTimeout="
3030
+ ir.isPartialResultDueToTimeout());
31-
sb.append("\n");
31+
sb.append("\n");
3232
sb.append("InferenceResult.#Proofs=" + ir.getProofs().size());
3333
sb.append("\n");
3434
int proofNo = 0;
3535
for (Proof p : ir.getProofs()) {
3636
proofNo++;
37-
sb.append("InferenceResult.Proof#"+proofNo+"=\n" + ProofPrinter.printProof(p));
37+
sb.append("InferenceResult.Proof#" + proofNo + "=\n"
38+
+ ProofPrinter.printProof(p));
3839
}
3940

4041
return sb.toString();

src/aima/probability/reasoning/HMMFactory.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55

66
import aima.probability.RandomVariable;
77

8+
/**
9+
* @author Ravi Mohan
10+
*
11+
*/
812
public class HMMFactory {
913

10-
/**
11-
* @author Ravi Mohan
12-
*
13-
*/
14-
1514
public static HiddenMarkovModel createRobotHMM() {
1615

1716
// Example adopted from Sebastian Thrun's "Probabilistic Robotics"

src/aima/search/map/package.html

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
<body>
22
<html>
3-
<p>This package contains classes which are useful to create
4-
map agents. The contained <code>MapWithSLD</code> class extends
5-
the original <code>aima.search.map.Map</code> by features
6-
such as location coordinates and straight-line distances.
3+
<p>This package contains classes, which are useful to create
4+
map agents. The contained <code>Map</code> class maintains
5+
named locations with coordinates, links between them, and
6+
straight-line distances. The <code>MapEnvironment</code>
7+
enables a <code>MapAgent</code> to travel trough a world
8+
whose topology is described by a map.
79
Adaptable heuristic functions let the agent modify the
810
heuristic function with respect to the current goal. Standardized
9-
dynamic attribute names make information exchange between environment
10-
and agent safer without introducing direct dependencies.
11+
dynamic attribute names in class <code>DynAttributeNames</code>
12+
make information exchange between environment
13+
and agent a bit safer without introducing direct dependencies.
1114
</p>
1215
</html>
1316
</body>

src/aima/util/LUDecomposition.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class LUDecomposition implements java.io.Serializable {
2525
*
2626
* @serial internal array storage.
2727
*/
28-
private double[][] LU;
28+
private final double[][] LU;
2929

3030
/**
3131
* Row and column dimensions, and pivot sign.
@@ -34,25 +34,26 @@ public class LUDecomposition implements java.io.Serializable {
3434
* @serial row dimension.
3535
* @serial pivot sign.
3636
*/
37-
private int m, n, pivsign;
37+
private final int m, n;
38+
39+
private int pivsign;
3840

3941
/**
4042
* Internal storage of pivot vector.
4143
*
4244
* @serial pivot vector.
4345
*/
44-
private int[] piv;
46+
private final int[] piv;
4547

4648
/*
4749
* ------------------------ Constructor ------------------------
4850
*/
4951

5052
/**
51-
* LU Decomposition
53+
* LU Decomposition, a structure to access L, U and piv.
5254
*
5355
* @param A
5456
* Rectangular matrix
55-
* @return Structure to access L, U and piv.
5657
*/
5758

5859
public LUDecomposition(Matrix A) {

src/aima/util/LabeledGraph.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package aima.util;
22

33
import java.util.ArrayList;
4-
import java.util.Enumeration;
54
import java.util.Hashtable;
65
import java.util.List;
76

@@ -86,11 +85,8 @@ public List<VertexLabelType> getSuccessors(VertexLabelType v) {
8685
List<VertexLabelType> result = new ArrayList<VertexLabelType>();
8786
Hashtable<VertexLabelType, EdgeLabelType> localEdgeLookup = globalEdgeLookup
8887
.get(v);
89-
if (localEdgeLookup != null) {
90-
Enumeration<VertexLabelType> successors = localEdgeLookup.keys();
91-
while (successors.hasMoreElements())
92-
result.add(successors.nextElement());
93-
}
88+
if (localEdgeLookup != null)
89+
result.addAll(localEdgeLookup.keySet());
9490
return result;
9591
}
9692

src/aima/util/Matrix.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ public class Matrix implements Cloneable, java.io.Serializable {
7171
*
7272
* @serial internal array storage.
7373
*/
74-
private double[][] A;
74+
private final double[][] A;
7575

7676
/**
7777
* Row and column dimensions.
7878
*
7979
* @serial row dimension.
8080
* @serial column dimension.
8181
*/
82-
private int m, n;
82+
private final int m, n;
8383

8484
/*
8585
* ------------------------ Constructors ------------------------
@@ -436,9 +436,9 @@ public Matrix getMatrix(int i0, int i1, int[] c) {
436436
*
437437
* @param r
438438
* Array of row indices.
439-
* @param i0
439+
* @param j0
440440
* Initial column index
441-
* @param i1
441+
* @param j1
442442
* Final column index
443443
* @return A(r(:),j0:j1)
444444
* @exception ArrayIndexOutOfBoundsException

0 commit comments

Comments
 (0)