Skip to content

Commit

Permalink
fixes documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-wayne committed Jan 7, 2019
1 parent 4564f64 commit d8d3258
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/main/java/edu/princeton/cs/algs4/BinaryDump.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/******************************************************************************
* Compilation: javac BinaryDump.java
* Execution: java BinaryDump N < file
* Execution: java BinaryDump n < file
* Dependencies: BinaryStdIn.java
* Data file: http://introcs.cs.princeton.edu/stdlib/abra.txt
* Data file: https://introcs.cs.princeton.edu/stdlib/abra.txt
*
* Reads in a binary file and writes out the bits, N per line.
* Reads in a binary file and writes out the bits, n per line.
*
* % more abra.txt
* ABRACADABRA!
Expand All @@ -30,7 +30,7 @@
* {@code od} (octal dump) and {@code hexdump} (hexadecimal dump).
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
* <p>
* See also {@link HexDump} and {@link PictureDump}.
Expand Down
1 change: 1 addition & 0 deletions src/main/java/edu/princeton/cs/algs4/Draw.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ private void init() {
frame.setResizable(false);
// frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window
frame.setFocusTraversalKeysEnabled(false); // to recognize VK_TAB with isKeyPressed()
frame.setTitle(name);
frame.setJMenuBar(createMenuBar());
frame.pack();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/Genome.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* and expanding a genomic sequence using a 2-bit code.
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
*
* @author Robert Sedgewick
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/HexDump.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* of a binary file in hexadecimal.
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
* <p>
* See also {@link BinaryDump} and {@link PictureDump}.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/Huffman.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* ASCII alphabet.
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
*
* @author Robert Sedgewick
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/IndexMaxPQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* <em>change-key</em>, <em>decrease-key</em>, and <em>increase-key</em>
* operations take logarithmic time.
* The <em>is-empty</em>, <em>size</em>, <em>max-index</em>, <em>max-key</em>,
* and <em>key-of</em> operations take constant time.
* <em>contains</em>, and <em>key-of</em> operations take constant time.
* Construction takes time proportional to the specified capacity.
* <p>
* For additional documentation, see <a href="https://algs4.cs.princeton.edu/24pq">Section 2.4</a> of
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/IndexMinPQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* <em>change-key</em>, <em>decrease-key</em>, and <em>increase-key</em>
* operations take logarithmic time.
* The <em>is-empty</em>, <em>size</em>, <em>min-index</em>, <em>min-key</em>,
* and <em>key-of</em> operations take constant time.
* <em>contains</em>, and <em>key-of</em> operations take constant time.
* Construction takes time proportional to the specified capacity.
* <p>
* For additional documentation, see <a href="https://algs4.cs.princeton.edu/24pq">Section 2.4</a> of
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/KruskalMST.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/******************************************************************************
* Compilation: javac KruskalMST.java
* Execution: java KruskalMST filename.txt
* Dependencies: EdgeWeightedGraph.java Edge.java Queue.java
* Dependencies: EdgeWeightedGraph.java Edge.java Queue.java MinPQ.java
* UF.java In.java StdOut.java
* Data files: https://algs4.cs.princeton.edu/43mst/tinyEWG.txt
* https://algs4.cs.princeton.edu/43mst/mediumEWG.txt
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/LZW.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* ASCII alphabet with 12-bit codewords.
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
*
* @author Robert Sedgewick
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/PictureDump.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* of a binary file as a black-and-white picture.
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
* <p>
* See also {@link BinaryDump} and {@link HexDump}.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/RunLength.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* run lengths.
* <p>
* For additional documentation,
* see <a href="https://algs4.cs.princeton.edu/55compress">Section 5.5</a> of
* see <a href="https://algs4.cs.princeton.edu/55compression">Section 5.5</a> of
* <i>Algorithms, 4th Edition</i> by Robert Sedgewick and Kevin Wayne.
*
* @author Robert Sedgewick
Expand Down
1 change: 1 addition & 0 deletions src/main/java/edu/princeton/cs/algs4/StdDraw.java
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,7 @@ private static void init() {

frame.setContentPane(draw);
frame.addKeyListener(std); // JLabel cannot get keyboard focus
frame.setFocusTraversalKeysEnabled(false); // allow VK_TAB with isKeyPressed()
frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // closes all windows
// frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // closes only current window
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/edu/princeton/cs/algs4/StdRandom.java
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public static double cauchy() {
*/
public static int discrete(double[] probabilities) {
if (probabilities == null) throw new IllegalArgumentException("argument array is null");
double EPSILON = 1E-14;
double EPSILON = 1.0E-14;
double sum = 0.0;
for (int i = 0; i < probabilities.length; i++) {
if (!(probabilities[i] >= 0.0))
Expand Down

0 comments on commit d8d3258

Please sign in to comment.