SYMBOL INDEX (1084 symbols across 130 files) FILE: code/algs4/Alphabet.java class Alphabet (line 17) | public class Alphabet { method Alphabet (line 90) | public Alphabet(String alpha) { method Alphabet (line 117) | private Alphabet(int radix) { method Alphabet (line 132) | public Alphabet() { method contains (line 143) | public boolean contains(char c) { method R (line 153) | @Deprecated method radix (line 163) | public int radix() { method lgR (line 172) | public int lgR() { method toIndex (line 186) | public int toIndex(char c) { method toIndices (line 201) | public int[] toIndices(String s) { method toChar (line 216) | public char toChar(int index) { method toChars (line 231) | public String toChars(int[] indices) { method main (line 243) | public static void main(String[] args) { FILE: code/algs4/Bag.java class Bag (line 54) | public class Bag implements Iterable { class Node (line 59) | private static class Node { method Bag (line 67) | public Bag() { method isEmpty (line 78) | public boolean isEmpty() { method size (line 87) | public int size() { method add (line 96) | public void add(Item item) { method iterator (line 110) | public Iterator iterator() { class ListIterator (line 115) | private class ListIterator implements Iterator { method ListIterator (line 118) | public ListIterator(Node first) { method hasNext (line 122) | public boolean hasNext() { return current != null; ... method remove (line 123) | public void remove() { throw new UnsupportedOperationException(... method next (line 125) | public Item next() { method main (line 138) | public static void main(String[] args) { FILE: code/algs4/BinarySearch.java class BinarySearch (line 42) | public class BinarySearch { method BinarySearch (line 47) | private BinarySearch() { } method indexOf (line 56) | public static int indexOf(int[] a, int key) { method rank (line 79) | @Deprecated method main (line 91) | public static void main(String[] args) { FILE: code/algs4/BinaryStdIn.java class BinaryStdIn (line 38) | public final class BinaryStdIn { method BinaryStdIn (line 51) | private BinaryStdIn() { } method fillBuffer (line 53) | private static void fillBuffer() { method close (line 68) | public static void close() { method isEmpty (line 81) | public static boolean isEmpty() { method readBoolean (line 91) | public static boolean readBoolean() { method readChar (line 107) | public static char readChar() { method readChar (line 138) | public static char readChar(int r) { method readString (line 160) | public static String readString() { method readShort (line 178) | public static short readShort() { method readInt (line 194) | public static int readInt() { method readInt (line 212) | public static int readInt(int r) { method readLong (line 233) | public static long readLong() { method readDouble (line 250) | public static double readDouble() { method readFloat (line 260) | public static float readFloat() { method readByte (line 271) | public static byte readByte() { method main (line 282) | public static void main(String[] args) { FILE: code/algs4/BinaryStdOut.java class BinaryStdOut (line 35) | public final class BinaryStdOut { method BinaryStdOut (line 42) | private BinaryStdOut() { } method writeBit (line 47) | private static void writeBit(boolean bit) { method writeByte (line 60) | private static void writeByte(int x) { method clearBuffer (line 82) | private static void clearBuffer() { method flush (line 99) | public static void flush() { method close (line 113) | public static void close() { method write (line 128) | public static void write(boolean x) { method write (line 136) | public static void write(byte x) { method write (line 144) | public static void write(int x) { method write (line 158) | public static void write(int x, int r) { method write (line 179) | public static void write(double x) { method write (line 187) | public static void write(long x) { method write (line 202) | public static void write(float x) { method write (line 210) | public static void write(short x) { method write (line 220) | public static void write(char x) { method write (line 232) | public static void write(char x, int r) { method write (line 251) | public static void write(String s) { method write (line 264) | public static void write(String s, int r) { method main (line 274) | public static void main(String[] args) { FILE: code/algs4/Counter.java class Counter (line 33) | public class Counter implements Comparable { method Counter (line 43) | public Counter(String id) { method increment (line 50) | public void increment() { method tally (line 59) | public int tally() { method toString (line 68) | public String toString() { method compareTo (line 83) | @Override method main (line 97) | public static void main(String[] args) { FILE: code/algs4/Draw.java class Draw (line 89) | public final class Draw implements ActionListener, MouseListener, MouseM... method Draw (line 247) | public Draw(String name) { method Draw (line 255) | public Draw() { method init (line 259) | private void init() { method setLocationOnScreen (line 308) | public void setLocationOnScreen(int x, int y) { method setDefaultCloseOperation (line 320) | public void setDefaultCloseOperation(int value) { method setCanvasSize (line 336) | public void setCanvasSize(int canvasWidth, int canvasHeight) { method createMenuBar (line 347) | private JMenuBar createMenuBar() { method setXscale (line 367) | public void setXscale() { method setYscale (line 374) | public void setYscale() { method setXscale (line 384) | public void setXscale(double min, double max) { method setYscale (line 396) | public void setYscale(double min, double max) { method scaleX (line 403) | private double scaleX(double x) { return width * (x - xmin) / (xmax ... method scaleY (line 404) | private double scaleY(double y) { return height * (ymax - y) / (ymax ... method factorX (line 405) | private double factorX(double w) { return w * width / Math.abs(xmax -... method factorY (line 406) | private double factorY(double h) { return h * height / Math.abs(ymax -... method userX (line 407) | private double userX(double x) { return xmin + x * (xmax - xmin) / w... method userY (line 408) | private double userY(double y) { return ymax - y * (ymax - ymin) / h... method clear (line 414) | public void clear() { method clear (line 423) | public void clear(Color color) { method getPenRadius (line 435) | public double getPenRadius() { method setPenRadius (line 442) | public void setPenRadius() { method setPenRadius (line 452) | public void setPenRadius(double r) { method getPenColor (line 465) | public Color getPenColor() { method setPenColor (line 472) | public void setPenColor() { method setPenColor (line 481) | public void setPenColor(Color color) { method setPenColor (line 494) | public void setPenColor(int red, int green, int blue) { method xorOn (line 505) | public void xorOn() { method xorOff (line 512) | public void xorOff() { method getJLabel (line 521) | public JLabel getJLabel() { method getFont (line 530) | public Font getFont() { method setFont (line 537) | public void setFont() { method setFont (line 546) | public void setFont(Font font) { method line (line 563) | public void line(double x0, double y0, double x1, double y1) { method pixel (line 574) | private void pixel(double x, double y) { method point (line 584) | public void point(double x, double y) { method circle (line 604) | public void circle(double x, double y, double r) { method filledCircle (line 623) | public void filledCircle(double x, double y, double r) { method ellipse (line 644) | public void ellipse(double x, double y, double semiMajorAxis, double s... method filledEllipse (line 664) | public void filledEllipse(double x, double y, double semiMajorAxis, do... method arc (line 687) | public void arc(double x, double y, double r, double angle1, double an... method square (line 707) | public void square(double x, double y, double r) { method filledSquare (line 726) | public void filledSquare(double x, double y, double r) { method rectangle (line 747) | public void rectangle(double x, double y, double halfWidth, double hal... method filledRectangle (line 768) | public void filledRectangle(double x, double y, double halfWidth, doub... method polygon (line 786) | public void polygon(double[] x, double[] y) { method filledPolygon (line 803) | public void filledPolygon(double[] x, double[] y) { method getImage (line 820) | private static BufferedImage getImage(String filename) { method picture (line 860) | public void picture(double x, double y, String filename) { method picture (line 884) | public void picture(double x, double y, String filename, double degree... method picture (line 911) | public void picture(double x, double y, String filename, double w, dou... method picture (line 943) | public void picture(double x, double y, String filename, double w, dou... method text (line 975) | public void text(double x, double y, String s) { method text (line 995) | public void text(double x, double y, String s, double degrees) { method textLeft (line 1010) | public void textLeft(double x, double y, String s) { method show (line 1035) | public void show(int t) { method show (line 1053) | public void show() { method draw (line 1059) | private void draw() { method save (line 1070) | public void save(String filename) { method actionPerformed (line 1113) | @Override method addListener (line 1134) | public void addListener(DrawListener listener) { method mousePressed (line 1157) | public boolean mousePressed() { method mouseX (line 1167) | public double mouseX() { method mouseY (line 1178) | public double mouseY() { method mouseClicked (line 1189) | @Override method mouseEntered (line 1197) | @Override method mouseExited (line 1205) | @Override method mousePressed (line 1213) | @Override method mouseReleased (line 1230) | @Override method mouseDragged (line 1244) | @Override method mouseMoved (line 1258) | @Override method hasNextKeyTyped (line 1276) | public boolean hasNextKeyTyped() { method nextKeyTyped (line 1287) | public char nextKeyTyped() { method isKeyPressed (line 1305) | public boolean isKeyPressed(int keycode) { method keyTyped (line 1314) | @Override method keyPressed (line 1328) | @Override method keyReleased (line 1342) | @Override method main (line 1361) | public static void main(String[] args) { FILE: code/algs4/DrawListener.java type DrawListener (line 11) | public interface DrawListener { method mousePressed (line 19) | void mousePressed(double x, double y); method mouseDragged (line 27) | void mouseDragged(double x, double y); method mouseReleased (line 35) | void mouseReleased(double x, double y); method keyTyped (line 42) | void keyTyped(char c); method keyPressed (line 49) | void keyPressed(int keycode); method keyReleased (line 56) | void keyReleased(int keycode); FILE: code/algs4/Heap.java class Heap (line 36) | public class Heap { method Heap (line 39) | private Heap() { } method sort (line 45) | public static void sort(Comparable[] pq) { method sink (line 59) | private static void sink(Comparable[] pq, int k, int n) { method less (line 73) | private static boolean less(Comparable[] pq, int i, int j) { method exch (line 77) | private static void exch(Object[] pq, int i, int j) { method less (line 84) | private static boolean less(Comparable v, Comparable w) { method isSorted (line 92) | private static boolean isSorted(Comparable[] a) { method show (line 100) | private static void show(Comparable[] a) { method main (line 112) | public static void main(String[] args) { FILE: code/algs4/HexDump.java class HexDump (line 45) | public class HexDump { method HexDump (line 48) | private HexDump() { } method main (line 59) | public static void main(String[] args) { FILE: code/algs4/In.java class In (line 56) | public final class In { method In (line 87) | public In() { method In (line 99) | public In(Socket socket) { method In (line 118) | public In(URL url) { method In (line 138) | public In(File file) { method In (line 161) | public In(String name) { method In (line 208) | public In(Scanner scanner) { method exists (line 218) | public boolean exists() { method isEmpty (line 233) | public boolean isEmpty() { method hasNextLine (line 246) | public boolean hasNextLine() { method hasNextChar (line 258) | public boolean hasNextChar() { method readLine (line 271) | public String readLine() { method readChar (line 287) | public char readChar() { method readAll (line 302) | public String readAll() { method readString (line 318) | public String readString() { method readInt (line 328) | public int readInt() { method readDouble (line 338) | public double readDouble() { method readFloat (line 348) | public float readFloat() { method readLong (line 358) | public long readLong() { method readShort (line 368) | public short readShort() { method readByte (line 380) | public byte readByte() { method readBoolean (line 391) | public boolean readBoolean() { method readAllStrings (line 406) | public String[] readAllStrings() { method readAllLines (line 424) | public String[] readAllLines() { method readAllInts (line 439) | public int[] readAllInts() { method readAllLongs (line 453) | public long[] readAllLongs() { method readAllDoubles (line 467) | public double[] readAllDoubles() { method close (line 480) | public void close() { method readInts (line 492) | @Deprecated method readDoubles (line 505) | @Deprecated method readStrings (line 518) | @Deprecated method readInts (line 530) | @Deprecated method readDoubles (line 542) | @Deprecated method readStrings (line 554) | @Deprecated method main (line 564) | public static void main(String[] args) { FILE: code/algs4/IndexMinPQ.java class IndexMinPQ (line 44) | public class IndexMinPQ> implements Iterable... method IndexMinPQ (line 58) | public IndexMinPQ(int maxN) { method isEmpty (line 75) | public boolean isEmpty() { method contains (line 87) | public boolean contains(int i) { method size (line 97) | public int size() { method insert (line 110) | public void insert(int i, Key key) { method minIndex (line 126) | public int minIndex() { method minKey (line 137) | public Key minKey() { method delMin (line 147) | public int delMin() { method keyOf (line 167) | public Key keyOf(int i) { method changeKey (line 181) | public void changeKey(int i, Key key) { method change (line 197) | @Deprecated method decreaseKey (line 211) | public void decreaseKey(int i, Key key) { method increaseKey (line 229) | public void increaseKey(int i, Key key) { method delete (line 245) | public void delete(int i) { method greater (line 260) | private boolean greater(int i, int j) { method exch (line 264) | private void exch(int i, int j) { method swim (line 276) | private void swim(int k) { method sink (line 283) | private void sink(int k) { method iterator (line 305) | public Iterator iterator() { return new HeapIterator(); } class HeapIterator (line 307) | private class HeapIterator implements Iterator { method HeapIterator (line 313) | public HeapIterator() { method hasNext (line 319) | public boolean hasNext() { return !copy.isEmpty(); ... method remove (line 320) | public void remove() { throw new UnsupportedOperationException(... method next (line 322) | public Integer next() { method main (line 334) | public static void main(String[] args) { FILE: code/algs4/Interval1D.java class Interval1D (line 29) | public class Interval1D { method Interval1D (line 60) | public Interval1D(double min, double max) { method left (line 83) | @Deprecated method right (line 93) | @Deprecated method min (line 103) | public double min() { method max (line 112) | public double max() { method intersects (line 123) | public boolean intersects(Interval1D that) { method contains (line 136) | public boolean contains(double x) { method length (line 145) | public double length() { method toString (line 154) | public String toString() { method equals (line 165) | public boolean equals(Object other) { method hashCode (line 178) | public int hashCode() { class MinEndpointComparator (line 185) | private static class MinEndpointComparator implements Comparator { method compare (line 208) | public int compare(Interval1D a, Interval1D b) { method main (line 225) | public static void main(String[] args) { FILE: code/algs4/Interval2D.java class Interval2D (line 29) | public class Interval2D { method Interval2D (line 38) | public Interval2D(Interval1D x, Interval1D y) { method intersects (line 49) | public boolean intersects(Interval2D that) { method contains (line 60) | public boolean contains(Point2D p) { method area (line 68) | public double area() { method toString (line 77) | public String toString() { method equals (line 86) | public boolean equals(Object other) { method hashCode (line 99) | public int hashCode() { method draw (line 108) | public void draw() { method main (line 119) | public static void main(String[] args) { FILE: code/algs4/MinPQ.java class MinPQ (line 48) | public class MinPQ implements Iterable { method MinPQ (line 58) | public MinPQ(int initCapacity) { method MinPQ (line 66) | public MinPQ() { method MinPQ (line 77) | public MinPQ(int initCapacity, Comparator comparator) { method MinPQ (line 88) | public MinPQ(Comparator comparator) { method MinPQ (line 99) | public MinPQ(Key[] keys) { method isEmpty (line 115) | public boolean isEmpty() { method size (line 124) | public int size() { method min (line 134) | public Key min() { method resize (line 140) | private void resize(int capacity) { method insert (line 154) | public void insert(Key x) { method delMin (line 170) | public Key delMin() { method swim (line 186) | private void swim(int k) { method sink (line 193) | private void sink(int k) { method greater (line 206) | private boolean greater(int i, int j) { method exch (line 215) | private void exch(int i, int j) { method isMinHeap (line 222) | private boolean isMinHeap() { method isMinHeap (line 227) | private boolean isMinHeap(int k) { method iterator (line 245) | public Iterator iterator() { return new HeapIterator(); } class HeapIterator (line 247) | private class HeapIterator implements Iterator { method HeapIterator (line 253) | public HeapIterator() { method hasNext (line 260) | public boolean hasNext() { return !copy.isEmpty(); ... method remove (line 261) | public void remove() { throw new UnsupportedOperationException(... method next (line 263) | public Key next() { method main (line 274) | public static void main(String[] args) { FILE: code/algs4/Out.java class Out (line 33) | public class Out { method Out (line 48) | public Out(OutputStream os) { method Out (line 61) | public Out() { method Out (line 70) | public Out(Socket socket) { method Out (line 86) | public Out(String filename) { method close (line 100) | public void close() { method println (line 107) | public void println() { method println (line 116) | public void println(Object x) { method println (line 125) | public void println(boolean x) { method println (line 134) | public void println(char x) { method println (line 143) | public void println(double x) { method println (line 152) | public void println(float x) { method println (line 161) | public void println(int x) { method println (line 170) | public void println(long x) { method println (line 181) | public void println(byte x) { method print (line 190) | public void print() { method print (line 199) | public void print(Object x) { method print (line 209) | public void print(boolean x) { method print (line 219) | public void print(char x) { method print (line 229) | public void print(double x) { method print (line 239) | public void print(float x) { method print (line 249) | public void print(int x) { method print (line 259) | public void print(long x) { method print (line 269) | public void print(byte x) { method printf (line 281) | public void printf(String format, Object... args) { method printf (line 294) | public void printf(Locale locale, String format, Object... args) { method main (line 305) | public static void main(String[] args) { FILE: code/algs4/Particle.java class Particle (line 29) | public class Particle { method Particle (line 51) | public Particle(double rx, double ry, double vx, double vy, double rad... method Particle (line 66) | public Particle() { method move (line 82) | public void move(double dt) { method draw (line 90) | public void draw() { method count (line 105) | public int count() { method timeToHit (line 118) | public double timeToHit(Particle that) { method timeToHitVerticalWall (line 144) | public double timeToHitVerticalWall() { method timeToHitHorizontalWall (line 159) | public double timeToHitHorizontalWall() { method bounceOff (line 172) | public void bounceOff(Particle that) { method bounceOffVerticalWall (line 203) | public void bounceOffVerticalWall() { method bounceOffHorizontalWall (line 213) | public void bounceOffHorizontalWall() { method kineticEnergy (line 225) | public double kineticEnergy() { FILE: code/algs4/Picture.java class Picture (line 63) | public final class Picture implements ActionListener { method Picture (line 79) | public Picture(int width, int height) { method Picture (line 94) | public Picture(Picture picture) { method Picture (line 110) | public Picture(String filename) { method Picture (line 146) | public Picture(File file) { method getJLabel (line 167) | public JLabel getJLabel() { method setOriginUpperLeft (line 176) | public void setOriginUpperLeft() { method setOriginLowerLeft (line 183) | public void setOriginLowerLeft() { method show (line 190) | public void show() { method height (line 226) | public int height() { method width (line 235) | public int width() { method validateRow (line 239) | private void validateRow(int row) { method validateCol (line 244) | private void validateCol(int col) { method get (line 257) | public Color get(int col, int row) { method set (line 273) | public void set(int col, int row, Color color) { method equals (line 288) | public boolean equals(Object other) { method hashCode (line 307) | public int hashCode() { method save (line 317) | public void save(String name) { method save (line 326) | public void save(File file) { method actionPerformed (line 346) | @Override method main (line 364) | public static void main(String[] args) { FILE: code/algs4/PictureDump.java class PictureDump (line 35) | public class PictureDump { method PictureDump (line 38) | private PictureDump() { } method main (line 48) | public static void main(String[] args) { FILE: code/algs4/Point2D.java class Point2D (line 31) | public final class Point2D implements Comparable { method Point2D (line 59) | public Point2D(double x, double y) { method x (line 75) | public double x() { method y (line 83) | public double y() { method r (line 91) | public double r() { method theta (line 99) | public double theta() { method angleTo (line 107) | private double angleTo(Point2D that) { method ccw (line 120) | public static int ccw(Point2D a, Point2D b, Point2D c) { method area2 (line 134) | public static double area2(Point2D a, Point2D b, Point2D c) { method distanceTo (line 143) | public double distanceTo(Point2D that) { method distanceSquaredTo (line 154) | public double distanceSquaredTo(Point2D that) { method compareTo (line 172) | public int compareTo(Point2D that) { method polarOrder (line 185) | public Comparator polarOrder() { method atan2Order (line 194) | public Comparator atan2Order() { method distanceToOrder (line 203) | public Comparator distanceToOrder() { class XOrder (line 208) | private static class XOrder implements Comparator { method compare (line 209) | public int compare(Point2D p, Point2D q) { class YOrder (line 217) | private static class YOrder implements Comparator { method compare (line 218) | public int compare(Point2D p, Point2D q) { class ROrder (line 226) | private static class ROrder implements Comparator { method compare (line 227) | public int compare(Point2D p, Point2D q) { class Atan2Order (line 236) | private class Atan2Order implements Comparator { method compare (line 237) | public int compare(Point2D q1, Point2D q2) { class PolarOrder (line 247) | private class PolarOrder implements Comparator { method compare (line 248) | public int compare(Point2D q1, Point2D q2) { class DistanceToOrder (line 268) | private class DistanceToOrder implements Comparator { method compare (line 269) | public int compare(Point2D p, Point2D q) { method equals (line 286) | @Override method toString (line 299) | @Override method hashCode (line 308) | @Override method draw (line 318) | public void draw() { method drawTo (line 326) | public void drawTo(Point2D that) { method main (line 336) | public static void main(String[] args) { FILE: code/algs4/Queue.java class Queue (line 41) | public class Queue implements Iterable { class Node (line 47) | private static class Node { method Queue (line 55) | public Queue() { method isEmpty (line 66) | public boolean isEmpty() { method size (line 75) | public int size() { method peek (line 85) | public Item peek() { method enqueue (line 95) | public void enqueue(Item item) { method dequeue (line 111) | public Item dequeue() { method toString (line 125) | public String toString() { method iterator (line 139) | public Iterator iterator() { class ListIterator (line 144) | private class ListIterator implements Iterator { method ListIterator (line 147) | public ListIterator(Node first) { method hasNext (line 151) | public boolean hasNext() { return current != null; ... method remove (line 152) | public void remove() { throw new UnsupportedOperationException(... method next (line 154) | public Item next() { method main (line 168) | public static void main(String[] args) { FILE: code/algs4/SET.java class SET (line 53) | public class SET> implements Iterable { method SET (line 59) | public SET() { method SET (line 68) | public SET(SET x) { method add (line 78) | public void add(Key key) { method contains (line 92) | public boolean contains(Key key) { method delete (line 103) | public void delete(Key key) { method size (line 113) | public int size() { method isEmpty (line 123) | public boolean isEmpty() { method iterator (line 134) | public Iterator iterator() { method max (line 144) | public Key max() { method min (line 155) | public Key min() { method ceiling (line 169) | public Key ceiling(Key key) { method floor (line 184) | public Key floor(Key key) { method union (line 198) | public SET union(SET that) { method intersects (line 217) | public SET intersects(SET that) { method equals (line 245) | @Override method hashCode (line 260) | @Override method toString (line 271) | @Override method main (line 282) | public static void main(String[] args) { FILE: code/algs4/ST.java class ST (line 53) | public class ST, Value> implements Iterable<... method ST (line 60) | public ST() { method get (line 73) | public Value get(Key key) { method put (line 88) | public void put(Key key, Value val) { method delete (line 101) | public void delete(Key key) { method contains (line 114) | public boolean contains(Key key) { method size (line 124) | public int size() { method isEmpty (line 133) | public boolean isEmpty() { method keys (line 145) | public Iterable keys() { method iterator (line 160) | @Deprecated method min (line 171) | public Key min() { method max (line 182) | public Key max() { method ceiling (line 195) | public Key ceiling(Key key) { method floor (line 210) | public Key floor(Key key) { method main (line 222) | public static void main(String[] args) { FILE: code/algs4/Stack.java class Stack (line 49) | public class Stack implements Iterable { class Node (line 54) | private static class Node { method Stack (line 62) | public Stack() { method isEmpty (line 72) | public boolean isEmpty() { method size (line 81) | public int size() { method push (line 90) | public void push(Item item) { method pop (line 104) | public Item pop() { method peek (line 119) | public Item peek() { method toString (line 129) | public String toString() { method iterator (line 144) | public Iterator iterator() { class ListIterator (line 149) | private class ListIterator implements Iterator { method ListIterator (line 152) | public ListIterator(Node first) { method hasNext (line 156) | public boolean hasNext() { method remove (line 160) | public void remove() { method next (line 164) | public Item next() { method main (line 178) | public static void main(String[] args) { FILE: code/algs4/StdDraw.java class StdDraw (line 470) | public final class StdDraw implements ActionListener, MouseListener, Mou... method StdDraw (line 621) | private StdDraw() { } method setCanvasSize (line 636) | public static void setCanvasSize() { method setCanvasSize (line 652) | public static void setCanvasSize(int canvasWidth, int canvasHeight) { method init (line 661) | private static void init() { method createMenuBar (line 703) | private static JMenuBar createMenuBar() { method setXscale (line 723) | public static void setXscale() { method setYscale (line 730) | public static void setYscale() { method setScale (line 738) | public static void setScale() { method setXscale (line 750) | public static void setXscale(double min, double max) { method setYscale (line 766) | public static void setYscale(double min, double max) { method setScale (line 782) | public static void setScale(double min, double max) { method scaleX (line 794) | private static double scaleX(double x) { return width * (x - xmin) /... method scaleY (line 795) | private static double scaleY(double y) { return height * (ymax - y) /... method factorX (line 796) | private static double factorX(double w) { return w * width / Math.abs... method factorY (line 797) | private static double factorY(double h) { return h * height / Math.abs... method userX (line 798) | private static double userX(double x) { return xmin + x * (xmax - xm... method userY (line 799) | private static double userY(double y) { return ymax - y * (ymax - ym... method clear (line 805) | public static void clear() { method clear (line 814) | public static void clear(Color color) { method getPenRadius (line 826) | public static double getPenRadius() { method setPenRadius (line 836) | public static void setPenRadius() { method setPenRadius (line 849) | public static void setPenRadius(double radius) { method getPenColor (line 863) | public static Color getPenColor() { method setPenColor (line 870) | public static void setPenColor() { method setPenColor (line 886) | public static void setPenColor(Color color) { method setPenColor (line 901) | public static void setPenColor(int red, int green, int blue) { method getFont (line 913) | public static Font getFont() { method setFont (line 920) | public static void setFont() { method setFont (line 929) | public static void setFont(Font font) { method line (line 948) | public static void line(double x0, double y0, double x1, double y1) { method pixel (line 961) | private static void pixel(double x, double y) { method point (line 973) | public static void point(double x, double y) { method circle (line 996) | public static void circle(double x, double y, double radius) { method filledCircle (line 1015) | public static void filledCircle(double x, double y, double radius) { method ellipse (line 1038) | public static void ellipse(double x, double y, double semiMajorAxis, d... method filledEllipse (line 1061) | public static void filledEllipse(double x, double y, double semiMajorA... method arc (line 1086) | public static void arc(double x, double y, double radius, double angle... method square (line 1106) | public static void square(double x, double y, double halfLength) { method filledSquare (line 1125) | public static void filledSquare(double x, double y, double halfLength) { method rectangle (line 1146) | public static void rectangle(double x, double y, double halfWidth, dou... method filledRectangle (line 1167) | public static void filledRectangle(double x, double y, double halfWidt... method polygon (line 1191) | public static void polygon(double[] x, double[] y) { method filledPolygon (line 1218) | public static void filledPolygon(double[] x, double[] y) { method getImage (line 1239) | private static Image getImage(String filename) { method picture (line 1329) | public static void picture(double x, double y, String filename) { method picture (line 1355) | public static void picture(double x, double y, String filename, double... method picture (line 1387) | public static void picture(double x, double y, String filename, double... method picture (line 1422) | public static void picture(double x, double y, String filename, double... method text (line 1454) | public static void text(double x, double y, String text) { method text (line 1474) | public static void text(double x, double y, String text, double degree... method textLeft (line 1490) | public static void textLeft(double x, double y, String text) { method textRight (line 1508) | public static void textRight(double x, double y, String text) { method show (line 1528) | @Deprecated method pause (line 1553) | public static void pause(int t) { method show (line 1574) | public static void show() { method draw (line 1580) | private static void draw() { method enableDoubleBuffering (line 1590) | public static void enableDoubleBuffering() { method disableDoubleBuffering (line 1600) | public static void disableDoubleBuffering() { method save (line 1616) | public static void save(String filename) { method actionPerformed (line 1660) | @Override method mousePressed (line 1680) | public static boolean mousePressed() { method mouseX (line 1691) | public static double mouseX() { method mouseY (line 1702) | public static double mouseY() { method mouseClicked (line 1712) | @Override method mouseEntered (line 1718) | @Override method mouseExited (line 1724) | @Override method mousePressed (line 1730) | @Override method mouseReleased (line 1742) | @Override method mouseDragged (line 1752) | @Override method mouseMoved (line 1763) | @Override method hasNextKeyTyped (line 1782) | public static boolean hasNextKeyTyped() { method nextKeyTyped (line 1800) | public static char nextKeyTyped() { method isKeyPressed (line 1821) | public static boolean isKeyPressed(int keycode) { method keyTyped (line 1831) | @Override method keyPressed (line 1841) | @Override method keyReleased (line 1851) | @Override method main (line 1866) | public static void main(String[] args) { FILE: code/algs4/StdIn.java class StdIn (line 192) | public final class StdIn { method StdIn (line 217) | private StdIn() { } method isEmpty (line 230) | public static boolean isEmpty() { method hasNextLine (line 243) | public static boolean hasNextLine() { method hasNextChar (line 255) | public static boolean hasNextChar() { method readLine (line 269) | public static String readLine() { method readChar (line 286) | public static char readChar() { method readAll (line 302) | public static String readAll() { method readString (line 319) | public static String readString() { method readInt (line 330) | public static int readInt() { method readDouble (line 341) | public static double readDouble() { method readFloat (line 352) | public static float readFloat() { method readLong (line 363) | public static long readLong() { method readShort (line 374) | public static short readShort() { method readByte (line 385) | public static byte readByte() { method readBoolean (line 399) | public static boolean readBoolean() { method readAllStrings (line 413) | public static String[] readAllStrings() { method readAllLines (line 431) | public static String[] readAllLines() { method readAllInts (line 445) | public static int[] readAllInts() { method readAllLongs (line 459) | public static long[] readAllLongs() { method readAllDoubles (line 473) | public static double[] readAllDoubles() { method resync (line 492) | private static void resync() { method setScanner (line 496) | private static void setScanner(Scanner scanner) { method readInts (line 508) | @Deprecated method readDoubles (line 520) | @Deprecated method readStrings (line 530) | @Deprecated method main (line 541) | public static void main(String[] args) { FILE: code/algs4/StdOut.java class StdOut (line 62) | public final class StdOut { method StdOut (line 84) | private StdOut() { } method close (line 89) | public static void close() { method println (line 96) | public static void println() { method println (line 105) | public static void println(Object x) { method println (line 114) | public static void println(boolean x) { method println (line 123) | public static void println(char x) { method println (line 132) | public static void println(double x) { method println (line 141) | public static void println(float x) { method println (line 150) | public static void println(int x) { method println (line 159) | public static void println(long x) { method println (line 168) | public static void println(short x) { method println (line 179) | public static void println(byte x) { method print (line 186) | public static void print() { method print (line 195) | public static void print(Object x) { method print (line 205) | public static void print(boolean x) { method print (line 215) | public static void print(char x) { method print (line 225) | public static void print(double x) { method print (line 235) | public static void print(float x) { method print (line 245) | public static void print(int x) { method print (line 255) | public static void print(long x) { method print (line 265) | public static void print(short x) { method print (line 275) | public static void print(byte x) { method printf (line 288) | public static void printf(String format, Object... args) { method printf (line 301) | public static void printf(Locale locale, String format, Object... args) { method main (line 311) | public static void main(String[] args) { FILE: code/algs4/StdRandom.java class StdRandom (line 67) | public final class StdRandom { method StdRandom (line 80) | private StdRandom() { } method setSeed (line 90) | public static void setSeed(long s) { method getSeed (line 100) | public static long getSeed() { method uniform (line 109) | public static double uniform() { method uniform (line 120) | public static int uniform(int n) { method random (line 136) | @Deprecated method uniform (line 150) | public static int uniform(int a, int b) { method uniform (line 164) | public static double uniform(double a, double b) { method bernoulli (line 178) | public static boolean bernoulli(double p) { method bernoulli (line 191) | public static boolean bernoulli() { method gaussian (line 201) | public static double gaussian() { method gaussian (line 224) | public static double gaussian(double mu, double sigma) { method geometric (line 238) | public static int geometric(double p) { method poisson (line 252) | public static int poisson(double lambda) { method pareto (line 274) | public static double pareto() { method pareto (line 287) | public static double pareto(double alpha) { method cauchy (line 298) | public static double cauchy() { method discrete (line 312) | public static int discrete(double[] probabilities) { method discrete (line 347) | public static int discrete(int[] frequencies) { method exp (line 382) | public static double exp(double lambda) { method shuffle (line 394) | public static void shuffle(Object[] a) { method shuffle (line 411) | public static void shuffle(double[] a) { method shuffle (line 428) | public static void shuffle(int[] a) { method shuffle (line 450) | public static void shuffle(Object[] a, int lo, int hi) { method shuffle (line 472) | public static void shuffle(double[] a, int lo, int hi) { method shuffle (line 494) | public static void shuffle(int[] a, int lo, int hi) { method main (line 512) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/BinarySearch.java class BinarySearch (line 10) | public class BinarySearch { method rank (line 12) | public static int rank(int key, int[] a) { method main (line 28) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/BouncingBall.java class BouncingBall (line 5) | public class BouncingBall { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex1.java class Ex1 (line 5) | public class Ex1 { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex10.java class Ex10 (line 5) | public class Ex10 { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex11.java class Ex11 (line 6) | public class Ex11 { method main (line 8) | public static void main(String[] args) { method printBoolArr (line 25) | public static void printBoolArr (boolean[][] arr) { FILE: code/chapter1_1_Programming_Model/Ex13.java class Ex13 (line 6) | public class Ex13 { method main (line 8) | public static void main(String[] args) { method arrReverse (line 22) | public static int[][] arrReverse(int[][] arr) { method printArr (line 31) | public static void printArr(int[][] arr) { FILE: code/chapter1_1_Programming_Model/Ex14.java class Ex14 (line 5) | public class Ex14 { method main (line 7) | public static void main(String[] args) { method lg (line 13) | public static int lg(int N) { method n2 (line 21) | public static int n2(int n) { FILE: code/chapter1_1_Programming_Model/Ex15.java class Ex15 (line 5) | public class Ex15 { method main (line 7) | public static void main(String[] args) { method histogram (line 16) | public static int[] histogram(int[] a, int M) { FILE: code/chapter1_1_Programming_Model/Ex19.java class Ex19 (line 5) | public class Ex19 { method F (line 10) | public static long F(int N) { method main (line 20) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex2.java class Ex2 (line 5) | public class Ex2 { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex20.java class Ex20 (line 5) | public class Ex20 { method main (line 7) | public static void main(String[] args) { method ln10 (line 13) | public static double ln10(int N) { FILE: code/chapter1_1_Programming_Model/Ex3.java class Ex3 (line 6) | public class Ex3 { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex30.java class Ex30 (line 5) | public class Ex30 { method main (line 7) | public static void main(String[] args) { method setArrBoolean (line 21) | public static void setArrBoolean(boolean[][] arr) { FILE: code/chapter1_1_Programming_Model/Ex31.java class Ex31 (line 8) | public class Ex31 { class Point (line 10) | static class Point { method Point (line 13) | public Point(double x, double y) { method main (line 20) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex32.java class Ex32 (line 8) | public class Ex32 { method main (line 10) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex6.java class Ex6 (line 5) | public class Ex6 { method main (line 6) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex7a.java class Ex7a (line 5) | public class Ex7a { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex7b.java class Ex7b (line 5) | public class Ex7b { method main (line 6) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex7c.java class Ex7c (line 5) | public class Ex7c { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex8.java class Ex8 (line 3) | public class Ex8 { method main (line 5) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Ex9.java class Ex9 (line 5) | public class Ex9 { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/RightTriangle.java class RightTriangle (line 5) | public class RightTriangle { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/Sattolo.java class Sattolo (line 6) | public class Sattolo { method Sattolo (line 8) | private Sattolo() { } method cycle (line 10) | public static void cycle(Object[] a) { method main (line 20) | public static void main(String[] args) { FILE: code/chapter1_1_Programming_Model/StdDrawTest.java class StdDrawTest (line 6) | public class StdDrawTest { method main (line 7) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/Accumulator.java class Accumulator (line 3) | public class Accumulator { method addDataValue (line 6) | public void addDataValue(double val) { method mean (line 10) | public double mean() { method toString (line 13) | public String toString() { FILE: code/chapter1_2_Data_Abstraction/AccumulatorTest.java class AccumulatorTest (line 6) | public class AccumulatorTest { method main (line 8) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/Cat.java class Cat (line 6) | public class Cat { method main (line 8) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/Date.java class Date (line 3) | public class Date { method Date (line 8) | public Date(int m, int d, int y) { method month (line 13) | public int month() { method day (line 16) | public int day() { method year (line 19) | public int year() { method toString (line 22) | public String toString() { method equals (line 25) | public boolean equals(Object x) { FILE: code/chapter1_2_Data_Abstraction/Flips.java class Flips (line 7) | public class Flips { method main (line 9) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/FlipsMax.java class FlipsMax (line 7) | public class FlipsMax { method max (line 9) | public static Counter max(Counter x, Counter y) { method main (line 16) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/Interval2DTest.java class Interval2DTest (line 9) | public class Interval2DTest { method main (line 11) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/Rolls.java class Rolls (line 7) | public class Rolls { method main (line 9) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/StaticSETofInts.java class StaticSETofInts (line 5) | public class StaticSETofInts { method StaticSETofInts (line 7) | public StaticSETofInts(int[] keys) { method contains (line 14) | public boolean contains(int key) { method rank (line 17) | private int rank(int key) { FILE: code/chapter1_2_Data_Abstraction/VisualAccumulator.java class VisualAccumulator (line 5) | public class VisualAccumulator { method VisualAccumulator (line 9) | public VisualAccumulator(int trials, double max) { method addDataValue (line 15) | public void addDataValue(double val) { method mean (line 23) | public double mean() { method toString (line 26) | public String toString() { FILE: code/chapter1_2_Data_Abstraction/VisualAccumulatorTest.java class VisualAccumulatorTest (line 6) | public class VisualAccumulatorTest { method main (line 8) | public static void main(String[] args) { FILE: code/chapter1_2_Data_Abstraction/WhiteList.java class WhiteList (line 7) | public class WhiteList { method main (line 8) | public static void main(String[] args) { FILE: code/chapter1_3_Bags_Queues_Stacks/ResizingArrayStack.java class ResizingArrayStack (line 5) | public class ResizingArrayStack implements Iterable{ method isEmpty (line 8) | public boolean isEmpty() { method size (line 11) | public int size() { method resize (line 14) | public void resize(int max) { method push (line 21) | public void push(Item item) { method pop (line 26) | public Item pop() { method iterator (line 34) | @Override class ReverseArrayIterator (line 38) | private class ReverseArrayIterator implements Iterator { method hasNext (line 40) | public boolean hasNext() { method next (line 43) | public Item next() { method remove (line 46) | public void remove() {} FILE: code/chapter1_4_Analysis_of_Algorithms/DoublingRatio.java class DoublingRatio (line 6) | public class DoublingRatio { method timeTrial (line 8) | public static double timeTrial(int N) { method main (line 19) | public static void main(String[] args) { FILE: code/chapter1_4_Analysis_of_Algorithms/DoublingTest.java class DoublingTest (line 6) | public class DoublingTest { method timeTrial (line 8) | public static double timeTrial(int N) { method main (line 19) | public static void main(String[] args) { FILE: code/chapter1_4_Analysis_of_Algorithms/Stopwatch.java class Stopwatch (line 3) | public class Stopwatch { method Stopwatch (line 5) | public Stopwatch() { method elapsedTime (line 8) | public double elapsedTime() { FILE: code/chapter1_4_Analysis_of_Algorithms/StopwatchTest.java class StopwatchTest (line 6) | public class StopwatchTest { method main (line 8) | public static void main(String[] args) { FILE: code/chapter1_4_Analysis_of_Algorithms/ThreeSum.java class ThreeSum (line 6) | public class ThreeSum { method count (line 8) | public static int count(int[] a) { method main (line 19) | public static void main(String[] args) { FILE: code/chapter1_5_Case_Study_Union_Find/UF.java class UF (line 6) | public class UF { method UF (line 10) | public UF(int N) { method count (line 18) | public int count() { method connected (line 22) | public boolean connected(int p, int q) { method find (line 48) | private int find(int p) { method union (line 55) | private void union(int p, int q) { method main (line 67) | public static void main(String[] args) { FILE: code/chapter1_5_Case_Study_Union_Find/WeightedQuickUnionUF.java class WeightedQuickUnionUF (line 7) | public class WeightedQuickUnionUF { method WeightedQuickUnionUF (line 12) | public WeightedQuickUnionUF(int N) { method count (line 22) | public int count() { method connected (line 26) | public boolean connected(int p, int q) { method find (line 30) | public int find(int p) { method union (line 37) | public void union(int p, int q) { FILE: code/chapter2_1_Elementary_Sorts/Insertion.java class Insertion (line 9) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 11) | public static void sort(Comparable[] a) { method less (line 22) | private static boolean less(Comparable v, Comparable w) { method exch (line 27) | private static void exch(Comparable[] a, int i, int j) { method show (line 34) | private static void show(Comparable[] a) { method isSorted (line 41) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_1_Elementary_Sorts/Selection.java class Selection (line 9) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 11) | public static void sort(Comparable[] a) { method less (line 24) | private static boolean less(Comparable v, Comparable w) { method exch (line 29) | private static void exch(Comparable[] a, int i, int j) { method show (line 36) | private static void show(Comparable[] a) { method isSorted (line 43) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_1_Elementary_Sorts/Shell.java class Shell (line 9) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 11) | public static void sort(Comparable[] a) { method less (line 28) | private static boolean less(Comparable v, Comparable w) { method exch (line 33) | private static void exch(Comparable[] a, int i, int j) { method show (line 40) | private static void show(Comparable[] a) { method isSorted (line 47) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_1_Elementary_Sorts/SortCompare.java class SortCompare (line 11) | @SuppressWarnings({"rawtypes"}) method time (line 13) | public static double time(String alg, Comparable[] a) { method timeRandomInput (line 30) | public static double timeRandomInput(String alg, int N, int T) { method main (line 43) | public static void main(String[] args) { FILE: code/chapter2_2_Mergesort/Merge.java class Merge (line 9) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 13) | public static void sort(Comparable[] a) { method sort (line 18) | private static void sort(Comparable[] a, int lo, int hi) { method merge (line 29) | public static void merge(Comparable[] a, int lo, int mid, int hi) { method less (line 47) | private static boolean less(Comparable v, Comparable w) { method exch (line 52) | private static void exch(Comparable[] a, int i, int j) { method show (line 59) | private static void show(Comparable[] a) { method isSorted (line 66) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_2_Mergesort/MergeBU.java class MergeBU (line 9) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 13) | public static void sort(Comparable[] a) { method merge (line 22) | public static void merge(Comparable[] a, int lo, int mid, int hi) { method less (line 40) | private static boolean less(Comparable v, Comparable w) { method exch (line 45) | private static void exch(Comparable[] a, int i, int j) { method show (line 52) | private static void show(Comparable[] a) { method isSorted (line 59) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_3_Quicksort/Ex25.java class Ex25 (line 14) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method main (line 16) | public static void main(String[] args) { method sort (line 32) | public static void sort(Comparable[] a, int M) { method sort (line 37) | private static void sort(Comparable[] a, int lo, int hi, int M) { method insertSort (line 47) | private static void insertSort(Comparable[] a, int lo, int hi) { method partition (line 55) | private static int partition(Comparable[] a, int lo, int hi) { method less (line 75) | private static boolean less(Comparable v, Comparable w) { method exch (line 80) | private static void exch(Comparable[] a, int i, int j) { method show (line 87) | private static void show(Comparable[] a) { method isSorted (line 94) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_3_Quicksort/Quick.java class Quick (line 10) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 12) | public static void sort(Comparable[] a) { method sort (line 17) | private static void sort(Comparable[] a, int lo, int hi) { method partition (line 25) | private static int partition(Comparable[] a, int lo, int hi) { method less (line 45) | private static boolean less(Comparable v, Comparable w) { method exch (line 50) | private static void exch(Comparable[] a, int i, int j) { method show (line 57) | private static void show(Comparable[] a) { method isSorted (line 64) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_3_Quicksort/Quick3way.java class Quick3way (line 10) | @SuppressWarnings({"rawtypes", "unused", "unchecked"}) method sort (line 12) | public static void sort(Comparable[] a) { method sort (line 17) | private static void sort(Comparable[] a, int lo, int hi) { method partition (line 35) | private static int partition(Comparable[] a, int lo, int hi) { method less (line 55) | private static boolean less(Comparable v, Comparable w) { method exch (line 60) | private static void exch(Comparable[] a, int i, int j) { method show (line 67) | private static void show(Comparable[] a) { method isSorted (line 74) | public static boolean isSorted(Comparable[] a) { FILE: code/chapter2_4_Priority_Queues/MaxPQ.java class MaxPQ (line 8) | public class MaxPQ> { method MaxPQ (line 13) | @SuppressWarnings("unchecked") method insert (line 19) | void insert(Key v) { method delMax (line 25) | public Key delMax() { method isEmpty (line 33) | boolean isEmpty() { // 返回队列是否为空 method size (line 37) | int size() { // 返回优先队列中的元素个数 method less (line 41) | private boolean less(int i, int j) { method exch (line 45) | private void exch(int i, int j) { method swim (line 52) | private void swim(int k) { method sink (line 60) | private void sink(int k) { FILE: code/chapter2_4_Priority_Queues/TopM.java class TopM (line 8) | public class TopM { method main (line 9) | public static void main(String[] args) { FILE: code/chapter3_1_Symbol_Tables/BinarySearchST.java class BinarySearchST (line 5) | @SuppressWarnings("unchecked") method BinarySearchST (line 10) | public BinarySearchST(int capacity) { method resize (line 15) | private void resize(int max) { method size (line 27) | public int size() { method get (line 31) | public Value get(Key key) { method isEmpty (line 41) | public boolean isEmpty() { method rank (line 45) | public int rank(Key key) { method put (line 60) | public void put(Key key, Value val) { method min (line 78) | public Key min() { method max (line 82) | public Key max() { method select (line 86) | public Key select(int k) { method ceiling (line 90) | public Key ceiling(Key key) { method delete (line 99) | public Key delete(Key key) { method keys (line 116) | public Iterable keys(Key lo, Key hi) { method contains (line 125) | public boolean contains(Key key) { FILE: code/chapter3_1_Symbol_Tables/FrequencyCounter.java class FrequencyCounter (line 11) | public class FrequencyCounter { method main (line 12) | public static void main(String[] args) { FILE: code/chapter3_1_Symbol_Tables/SequentialSearchST.java class SequentialSearchST (line 3) | public class SequentialSearchST{ class Node (line 5) | private class Node { method Node (line 9) | public Node(Key key, Value val, Node next) { method get (line 16) | public Value get(Key key) { method put (line 24) | public void put(Key key, Value val) { FILE: code/chapter3_2_Binary_Search_Trees/BST.java class BST (line 5) | public class BST, Value> { class Node (line 8) | private class Node { method Node (line 14) | public Node(Key key, Value val, int N) { method size (line 21) | public int size() { method size (line 25) | private int size(Node x) { method get (line 32) | public Value get(Key key) { method get (line 36) | private Value get(Node x, Key key) { method put (line 49) | public void put(Key key, Value val) { method put (line 54) | private Node put(Node x, Key key, Value val) { method min (line 70) | public Key min() { method min (line 74) | private Node min(Node x) { method max (line 80) | public Key max() { method max (line 84) | private Node max(Node x) { method floor (line 90) | public Key floor(Key key) { method floor (line 97) | private Node floor(Node x, Key key) { method select (line 112) | public Key select(int k) { method select (line 116) | private Node select(Node x, int k) { method rank (line 129) | public int rank(Key key) { method rank (line 133) | private int rank(Key key, Node x) { method deleteMin (line 146) | public void deleteMin() { method deleteMin (line 150) | private Node deleteMin(Node x) { method delete (line 158) | public void delete(Key key) { method delete (line 162) | private Node delete(Node x, Key key) { method keys (line 184) | public Iterable keys() { method keys (line 188) | public Iterable keys(Key lo, Key hi) { method keys (line 194) | private void keys(Node x, Queue queue, Key lo, Key hi) { FILE: code/chapter3_4_Hash_Tables/LinearProbingHashST.java class LinearProbingHashST (line 5) | @SuppressWarnings("unchecked") method LinearProbingHashST (line 12) | public LinearProbingHashST() { method LinearProbingHashST (line 17) | public LinearProbingHashST(int cap) { method size (line 23) | public int size() { method hash (line 27) | private int hash(Key key) { method resize (line 31) | private void resize(int cap) { method put (line 42) | public void put(Key key, Value val) { method get (line 56) | public Value get(Key key) { method contains (line 63) | public boolean contains(Key key) { method delete (line 67) | public void delete(Key key) { method keys (line 90) | public Iterable keys() { FILE: code/chapter3_4_Hash_Tables/SeparateChainingHashST.java class SeparateChainingHashST (line 8) | @SuppressWarnings("unchecked") method SeparateChainingHashST (line 14) | public SeparateChainingHashST() { method SeparateChainingHashST (line 18) | public SeparateChainingHashST(int M) { method hash (line 26) | private int hash(Key key) { method get (line 30) | public Value get(Key key) { method put (line 34) | public void put(Key key, Value val) { method keys (line 38) | public Iterable keys() { FILE: code/chapter3_5_Searching_Applications/SparseVector.java class SparseVector (line 9) | public class SparseVector { method SparseVector (line 11) | public SparseVector() { method size (line 14) | public int size() { method put (line 17) | public void put(int i, double x) { method get (line 20) | public double get(int i) { method dot (line 25) | public double dot(double[] that) { FILE: code/chapter3_5_Searching_Applications/WhiteFilter.java class WhiteFilter (line 13) | public class WhiteFilter { method main (line 14) | public static void main(String[] args) { FILE: code/chapter4_1_Undirected_Graphs/BreadthFirstPaths.java class BreadthFirstPaths (line 6) | public class BreadthFirstPaths { method BreadthFirstPaths (line 11) | public BreadthFirstPaths(Graph G, int s) { method bfs (line 18) | private void bfs(Graph G, int s) { method hasPathTo (line 33) | public boolean hasPathTo(int v) { method pathTo (line 37) | public Iterable pathTo(int v) { FILE: code/chapter4_1_Undirected_Graphs/CC.java class CC (line 7) | public class CC { method CC (line 12) | public CC(Graph G) { method dfs (line 22) | private void dfs(Graph G, int v) { method connected (line 30) | public boolean connected(int v, int w) { method id (line 34) | public int id(int v) { method count (line 38) | public int count() { FILE: code/chapter4_1_Undirected_Graphs/Cycle.java class Cycle (line 7) | public class Cycle { method Cycle (line 10) | public Cycle(Graph G) { method dfs (line 17) | private void dfs(Graph G, int v, int u) { method hasCycle (line 27) | public boolean hasCycle() { FILE: code/chapter4_1_Undirected_Graphs/DegreesOfSeparation.java class DegreesOfSeparation (line 10) | public class DegreesOfSeparation { method main (line 12) | public static void main(String[] args) { FILE: code/chapter4_1_Undirected_Graphs/DepthFirstPaths.java class DepthFirstPaths (line 10) | public class DepthFirstPaths { method DepthFirstPaths (line 15) | public DepthFirstPaths(Graph G, int s) { method dfs (line 22) | private void dfs(Graph G, int v) { method hasPathTo (line 31) | public boolean hasPathTo(int v) { method pathTo (line 35) | public Iterable pathTo(int v) { FILE: code/chapter4_1_Undirected_Graphs/DepthFirstSearch.java class DepthFirstSearch (line 3) | public class DepthFirstSearch { method DepthFirstSearch (line 7) | public DepthFirstSearch(Graph G, int s) { method dfs (line 12) | private void dfs(Graph G, int v) { method marked (line 20) | public boolean marked(int w) { method count (line 24) | public int count() { FILE: code/chapter4_1_Undirected_Graphs/Graph.java class Graph (line 6) | public class Graph { method Graph (line 11) | @SuppressWarnings("unchecked") method Graph (line 19) | public Graph(In in) { method V (line 29) | public int V() { method E (line 32) | public int E() { method addEdge (line 35) | public void addEdge(int v, int w) { method adj (line 40) | public Iterable adj(int v) { FILE: code/chapter4_1_Undirected_Graphs/SymbolGraph.java class SymbolGraph (line 6) | public class SymbolGraph { method SymbolGraph (line 12) | public SymbolGraph(String filename, String delim) { method contains (line 37) | boolean contains(String key) { method index (line 42) | int index(String key) { method name (line 47) | String name(int v) { method G (line 52) | Graph G() { FILE: code/chapter4_1_Undirected_Graphs/TestCC.java class TestCC (line 11) | public class TestCC { method main (line 12) | @SuppressWarnings("unchecked") FILE: code/chapter4_1_Undirected_Graphs/TestPaths.java class TestPaths (line 10) | public class TestPaths { method main (line 12) | public static void main(String[] args) { FILE: code/chapter4_1_Undirected_Graphs/TestSearch.java class TestSearch (line 6) | public class TestSearch { method main (line 8) | public static void main(String[] args) { FILE: code/chapter4_1_Undirected_Graphs/TestSymbolGraph.java class TestSymbolGraph (line 6) | public class TestSymbolGraph { method main (line 8) | public static void main(String[] args) { FILE: code/chapter4_1_Undirected_Graphs/TwoColor.java class TwoColor (line 7) | public class TwoColor { method TwoColor (line 11) | public TwoColor(Graph G) { method dfs (line 19) | private void dfs(Graph G, int v) { method isBipartite (line 30) | public boolean isBipartite() { FILE: code/chapter4_2_Directed_Graphs/DepthFirstOrder.java class DepthFirstOrder (line 6) | public class DepthFirstOrder { method DepthFirstOrder (line 12) | public DepthFirstOrder(Digraph G) { method dfs (line 23) | private void dfs(Digraph G, int v) { method pre (line 34) | public Iterable pre() { method post (line 38) | public Iterable post() { method reversePost (line 42) | public Iterable reversePost() { FILE: code/chapter4_2_Directed_Graphs/Digraph.java class Digraph (line 6) | public class Digraph { method Digraph (line 12) | @SuppressWarnings("unchecked") method Digraph (line 22) | public Digraph(In in) { // 从输入流 in 中读取一幅有向图 method V (line 33) | public int V() { // 顶点总数 method E (line 37) | public int E() { // 边的总数 method addEdge (line 41) | void addEdge(int v, int w) { // 向有向图中添加一条边 v -> w method adj (line 46) | public Iterable adj(int v) { // 由 v 指出的边所连接的所有顶点 method reverse (line 50) | public Digraph reverse() { // 该图的反向图 FILE: code/chapter4_2_Directed_Graphs/DirectedCycle.java class DirectedCycle (line 5) | public class DirectedCycle { method DirectedCycle (line 11) | public DirectedCycle(Digraph G) { method dfs (line 21) | private void dfs(Digraph G, int v) { method hasCycle (line 41) | public boolean hasCycle() { method cycle (line 45) | public Iterable cycle() { FILE: code/chapter4_2_Directed_Graphs/DirectedDFS.java class DirectedDFS (line 10) | public class DirectedDFS { method DirectedDFS (line 13) | public DirectedDFS(Digraph G, int s) { method DirectedDFS (line 18) | public DirectedDFS(Digraph G, Iterable sources) { method dfs (line 25) | private void dfs(Digraph G, int v) { method marked (line 32) | public boolean marked(int v) { method main (line 36) | public static void main(String[] args) { FILE: code/chapter4_2_Directed_Graphs/KosarajuSCC.java class KosarajuSCC (line 6) | public class KosarajuSCC { method KosarajuSCC (line 11) | public KosarajuSCC(Digraph G) { method dfs (line 22) | private void dfs(Digraph G, int v) { method stronglyConnected (line 30) | public boolean stronglyConnected(int v, int w) { method id (line 34) | public int id(int v) { method count (line 38) | public int count() { FILE: code/chapter4_2_Directed_Graphs/SymbolDigraph.java class SymbolDigraph (line 6) | public class SymbolDigraph { method SymbolDigraph (line 12) | public SymbolDigraph(String filename, String delim) { method contains (line 37) | boolean contains(String key) { method index (line 42) | int index(String key) { method name (line 47) | public String name(int v) { method G (line 52) | public Digraph G() { FILE: code/chapter4_2_Directed_Graphs/Topological.java class Topological (line 8) | public class Topological { method Topological (line 11) | public Topological(Digraph G) { method order (line 19) | public Iterable order() { method isDAG (line 23) | public boolean isDAG() { method main (line 27) | public static void main(String[] args) { FILE: code/chapter4_2_Directed_Graphs/TransitiveClosure.java class TransitiveClosure (line 6) | public class TransitiveClosure { method TransitiveClosure (line 8) | public TransitiveClosure(Digraph G) { method reachable (line 14) | public boolean reachable(int v, int w) { FILE: code/chapter4_3_Minimum_Spanning_Tree/Edge.java class Edge (line 6) | public class Edge implements Comparable { method Edge (line 11) | public Edge(int v, int w, double weight) { method weight (line 17) | public double weight() { method either (line 22) | public int either() { method other (line 27) | public int other(int vertex) { method compareTo (line 36) | public int compareTo(Edge that) { method toString (line 45) | public String toString() { FILE: code/chapter4_3_Minimum_Spanning_Tree/EdgeWeightedGraph.java class EdgeWeightedGraph (line 9) | public class EdgeWeightedGraph { method EdgeWeightedGraph (line 14) | @SuppressWarnings("unchecked") method EdgeWeightedGraph (line 23) | public EdgeWeightedGraph(In in) { method V (line 36) | public int V() { method E (line 40) | public int E() { method addEdge (line 44) | public void addEdge(Edge e) { method adj (line 52) | public Iterable adj(int v) { method edges (line 57) | public Iterable edges() { FILE: code/chapter4_3_Minimum_Spanning_Tree/KruskalMST.java class KruskalMST (line 6) | public class KruskalMST { method KruskalMST (line 9) | public KruskalMST(EdgeWeightedGraph G) { method edges (line 26) | public Iterable edges() { method weight (line 30) | public double weight() { FILE: code/chapter4_3_Minimum_Spanning_Tree/LazyPrimMST.java class LazyPrimMST (line 11) | public class LazyPrimMST { method LazyPrimMST (line 16) | public LazyPrimMST(EdgeWeightedGraph G) { method visit (line 37) | private void visit(EdgeWeightedGraph G, int v) { method edges (line 45) | public Iterable edges() { method weight (line 49) | public double weight() { FILE: code/chapter4_3_Minimum_Spanning_Tree/PrimMST.java class PrimMST (line 8) | public class PrimMST { method PrimMST (line 14) | public PrimMST(EdgeWeightedGraph G) { method visit (line 28) | private void visit(EdgeWeightedGraph G, int v) { method edges (line 47) | public Iterable edges() { method weight (line 51) | public double weight() { FILE: code/chapter4_3_Minimum_Spanning_Tree/TestMST.java class TestMST (line 9) | public class TestMST { method main (line 11) | public static void main(String[] args) { FILE: code/chapter4_3_Minimum_Spanning_Tree/UF.java class UF (line 6) | public class UF { method UF (line 10) | public UF(int N) { method count (line 18) | public int count() { method connected (line 22) | public boolean connected(int p, int q) { method find (line 48) | private int find(int p) { method union (line 55) | public void union(int p, int q) { method main (line 67) | public static void main(String[] args) { FILE: code/chapter4_4_Shortest_Paths/DijkstraSP.java class DijkstraSP (line 10) | public class DijkstraSP implements SP { method DijkstraSP (line 15) | public DijkstraSP(EdgeWeightedDigraph G, int s) { method relax (line 28) | private void relax(EdgeWeightedDigraph G, int v) { method distTo (line 42) | public double distTo(int v) { method hasPathTo (line 46) | public boolean hasPathTo(int v) { method pathTo (line 50) | public Iterable pathTo(int v) { FILE: code/chapter4_4_Shortest_Paths/DirectedEdge.java class DirectedEdge (line 7) | public class DirectedEdge { method DirectedEdge (line 12) | public DirectedEdge(int v, int w, double weight) { method weight (line 18) | public double weight() { method from (line 22) | public int from() { method to (line 26) | public int to() { method toString (line 30) | public String toString() { FILE: code/chapter4_4_Shortest_Paths/EdgeWeightedDigraph.java class EdgeWeightedDigraph (line 10) | public class EdgeWeightedDigraph { method EdgeWeightedDigraph (line 15) | @SuppressWarnings("unchecked") method EdgeWeightedDigraph (line 24) | public EdgeWeightedDigraph(In in) { method V (line 33) | public int V() { method E (line 37) | public int E() { method addEdge (line 41) | public void addEdge(DirectedEdge e) { method adj (line 46) | public Iterable adj(int v) { method edges (line 50) | public Iterable edges() { FILE: code/chapter4_4_Shortest_Paths/SP.java type SP (line 7) | public interface SP { method distTo (line 9) | double distTo(int v); method hasPathTo (line 11) | boolean hasPathTo(int v); method pathTo (line 13) | Iterable pathTo(int v); FILE: code/chapter4_4_Shortest_Paths/TestSP.java class TestSP (line 10) | public class TestSP { method main (line 11) | public static void main(String[] args) { FILE: code/chapter5_3_Substring_Search/BoyerMoore.java class BoyerMoore (line 9) | public class BoyerMoore { method BoyerMoore (line 15) | public BoyerMoore(String pat) { method search (line 27) | public int search(String txt) { method main (line 47) | public static void main(String[] args) { FILE: code/chapter5_3_Substring_Search/KMP.java class KMP (line 9) | public class KMP { method KMP (line 13) | public KMP(String pat) { method search (line 28) | public int search(String txt) { method main (line 38) | public static void main(String[] args) { FILE: code/chapter5_3_Substring_Search/RabinKarp.java class RabinKarp (line 12) | public class RabinKarp { method RabinKarp (line 20) | public RabinKarp(String pat) { method check (line 30) | public boolean check(int i) { // 蒙特卡洛算法直接返回 true method hash (line 34) | private long hash(String key, int M) { // Horner 方法计算 key[0..M-1] 的散列值 method search (line 41) | private int search(String txt) { method longRandomPrime (line 59) | private static long longRandomPrime() { method main (line 64) | public static void main(String[] args) { FILE: code/chapter6_3_Suffix_Arrays/KWIC.java class KWIC (line 12) | public class KWIC { method main (line 13) | public static void main(String[] args) { FILE: code/chapter6_3_Suffix_Arrays/LRS.java class LRS (line 10) | public class LRS { method main (line 11) | public static void main(String[] args) { FILE: code/chapter6_3_Suffix_Arrays/SuffixArray.java class SuffixArray (line 9) | public class SuffixArray { method SuffixArray (line 13) | public SuffixArray(String s) { method length (line 21) | public int length() { method select (line 25) | public String select(int i) { method index (line 29) | public int index(int i) { method lcp (line 33) | private static int lcp(String s, String t) { method lcp (line 41) | public int lcp(int i) { method rank (line 45) | public int rank(String key) {