Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- actionPerformed(ActionEvent) - Method in class stdlib.Picture
-
Opens a save dialog box when the user selects "Save As" from the menu.
- actionPerformed(ActionEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- arc(double, double, double, double, double) - Static method in class stdlib.StdDraw
-
Draws a circular arc of the specified radius, centered at (x, y), from angle1 to angle2 (in degrees).
B
- bernoulli() - Static method in class stdlib.StdRandom
-
Returns a random boolean from a Bernoulli distribution with success probability 1/2.
- bernoulli(double) - Static method in class stdlib.StdRandom
-
Returns a random boolean from a Bernoulli distribution with success probability p.
- BinaryIn - Class in stdlib
-
This class provides methods for reading in bits from a binary input stream, either one bit at a time (as a
boolean
), 8 bits at a time (as abyte
orchar
), 16 bits at a time (as ashort
), 32 bits at a time (as anint
orfloat
), or 64 bits at a time (as adouble
orlong
). - BinaryIn() - Constructor for class stdlib.BinaryIn
-
Initializes a binary input stream from standard input.
- BinaryIn(InputStream) - Constructor for class stdlib.BinaryIn
-
Initializes a binary input stream from an
InputStream
. - BinaryIn(String) - Constructor for class stdlib.BinaryIn
-
Initializes a binary input stream from a filename or URL name.
- BinaryIn(Socket) - Constructor for class stdlib.BinaryIn
-
Initializes a binary input stream from a socket.
- BinaryIn(URL) - Constructor for class stdlib.BinaryIn
-
Initializes a binary input stream from a URL.
- BinaryOut - Class in stdlib
-
This class provides methods for converting primtive type variables (
boolean
,byte
,char
,int
,long
,float
, anddouble
) to sequences of bits and writing them to an output stream. - BinaryOut() - Constructor for class stdlib.BinaryOut
-
Initializes a binary output stream from standard output.
- BinaryOut(OutputStream) - Constructor for class stdlib.BinaryOut
-
Initializes a binary output stream from an
OutputStream
. - BinaryOut(String) - Constructor for class stdlib.BinaryOut
-
Initializes a binary output stream from a file.
- BinaryOut(Socket) - Constructor for class stdlib.BinaryOut
-
Initializes a binary output stream from a socket.
- BinaryStdIn - Class in stdlib
-
This class provides methods for reading in bits from standard input, either one bit at a time (as a
boolean
), 8 bits at a time (as abyte
orchar
), 16 bits at a time (as ashort
), 32 bits at a time (as anint
orfloat
), or 64 bits at a time (as adouble
orlong
). - BinaryStdOut - Class in stdlib
-
This class provides methods for converting primtive type variables (
boolean
,byte
,char
,int
,long
,float
, anddouble
) to sequences of bits and writing them to standard output. - binomial(int, double) - Static method in class stdlib.StdRandom
-
Flips a coin with bias
p
a total ofn
times and returns the number of heads obtained. - BLACK - Static variable in class stdlib.StdDraw
-
The color black.
- BLUE - Static variable in class stdlib.StdDraw
-
The color blue.
C
- cauchy() - Static method in class stdlib.StdRandom
-
Returns a random real number from the Cauchy distribution.
- circle(double, double, double) - Static method in class stdlib.StdDraw
-
Draws a circle of the specified radius, centered at (x, y).
- clear() - Static method in class stdlib.StdDraw
-
Clears the screen to the default color (white).
- clear(RGBColor) - Static method in class stdlib.StdDraw
-
Clears the screen to the specified color.
- close() - Method in class stdlib.BinaryOut
-
Flushes and closes the binary output stream.
- close() - Static method in class stdlib.BinaryStdIn
-
Close this input stream and release any associated system resources.
- close() - Static method in class stdlib.BinaryStdOut
-
Flushes and closes standard output.
- close() - Method in class stdlib.In
-
Closes this input stream.
- close() - Method in class stdlib.Out
-
Closes the output stream.
- close() - Static method in class stdlib.StdAudio
-
Closes standard audio.
- CYAN - Static variable in class stdlib.StdDraw
-
The color cyan.
D
- DARK_GRAY - Static variable in class stdlib.StdDraw
-
The color dark gray.
- disableDoubleBuffering() - Static method in class stdlib.StdDraw
-
Disables double buffering.
- discrete(double[]) - Static method in class stdlib.StdRandom
-
Returns a random integer from the specified discrete distribution.
- discrete(int[]) - Static method in class stdlib.StdRandom
-
Returns a random integer from the specified discrete distribution.
E
- ellipse(double, double, double, double) - Static method in class stdlib.StdDraw
-
Draws an ellipse with the specified semimajor and semiminor axes, centered at (x, y).
- enableDoubleBuffering() - Static method in class stdlib.StdDraw
-
Enables double buffering.
- exists() - Method in class stdlib.BinaryIn
-
Returns true if this binary input stream exists.
- exists() - Method in class stdlib.In
-
Returns true if this input stream exists.
- exp(double) - Static method in class stdlib.StdRandom
-
Returns a random real number from an exponential distribution with rate λ.
F
- filledCircle(double, double, double) - Static method in class stdlib.StdDraw
-
Draws a filled circle of the specified radius, centered at (x, y).
- filledEllipse(double, double, double, double) - Static method in class stdlib.StdDraw
-
Draws an ellipse with the specified semimajor and semiminor axes, centered at (x, y).
- filledPolygon(double[], double[]) - Static method in class stdlib.StdDraw
-
Draws a polygon with the vertices (x0, y0), (x1, y1), ..., (xn–1, yn–1).
- filledRectangle(double, double, double, double) - Static method in class stdlib.StdDraw
-
Draws a filled rectangle of the specified size, centered at (x, y).
- filledSquare(double, double, double) - Static method in class stdlib.StdDraw
-
Draws a filled square of the specified size, centered at (x, y).
- flush() - Method in class stdlib.BinaryOut
-
Flushes the binary output stream, padding 0s if number of bits written so far is not a multiple of 8.
- flush() - Static method in class stdlib.BinaryStdOut
-
Flushes standard output, padding 0s if number of bits written so far is not a multiple of 8.
G
- gaussian() - Static method in class stdlib.StdRandom
-
Returns a random real number from a standard Gaussian distribution.
- gaussian(double, double) - Static method in class stdlib.StdRandom
-
Returns a random real number from a Gaussian distribution with mean μ and standard deviation σ.
- geometric(double) - Static method in class stdlib.StdRandom
-
Returns a random integer from a geometric distribution with success probability p.
- get(int, int) - Method in class stdlib.Picture
-
Returns the color of pixel (
col
,row
) as a {Color}. - getBlue() - Method in class stdlib.RGBColor
-
Returns the blue component of this color.
- getFont() - Static method in class stdlib.StdDraw
-
Returns the current font.
- getGreen() - Method in class stdlib.RGBColor
-
Returns the green component of this color.
- getJLabel() - Method in class stdlib.Picture
- getPenColor() - Static method in class stdlib.StdDraw
-
Returns the current pen color.
- getPenRadius() - Static method in class stdlib.StdDraw
-
Returns the current pen radius.
- getRed() - Method in class stdlib.RGBColor
-
Returns the red component of this color.
- getSeed() - Static method in class stdlib.StdRandom
-
Returns the seed of the pseudo-random number generator.
- GRAY - Static variable in class stdlib.StdDraw
-
The color gray.
- GREEN - Static variable in class stdlib.StdDraw
-
The color green.
H
- hasNextChar() - Method in class stdlib.In
-
Returns true if this input stream has more input (including whitespace).
- hasNextChar() - Static method in class stdlib.StdIn
-
Returns true if standard input has more input (including whitespace).
- hasNextKeyTyped() - Static method in class stdlib.StdDraw
-
Returns true if the user has typed a key (that has not yet been processed).
- hasNextLine() - Method in class stdlib.In
-
Returns true if this input stream has a next line.
- hasNextLine() - Static method in class stdlib.StdIn
-
Returns true if standard input has a next line.
- height() - Method in class stdlib.Picture
-
Returns the height of the picture.
I
- In - Class in stdlib
-
This class provides methods for reading strings and numbers from standard input, file input, URLs, and sockets.
- In() - Constructor for class stdlib.In
-
Initializes an input stream from standard input.
- In(String) - Constructor for class stdlib.In
-
Initializes an input stream from a filename or web page name.
- In(Socket) - Constructor for class stdlib.In
-
Initializes an input stream from a socket.
- In(URL) - Constructor for class stdlib.In
-
Initializes an input stream from a URL.
- In(Scanner) - Constructor for class stdlib.In
-
Initializes an input stream from a given
Scanner
source; use withnew Scanner(String)
to read from a string. - isCompatible(RGBColor) - Method in class stdlib.RGBColor
-
Returns
true
if this color is compatible withother
, andfalse
otherwise. - isEmpty() - Method in class stdlib.BinaryIn
-
Returns true if this binary input stream is empty.
- isEmpty() - Static method in class stdlib.BinaryStdIn
-
Returns true if standard input is empty.
- isEmpty() - Method in class stdlib.In
-
Returns true if input stream is empty (except possibly whitespace).
- isEmpty() - Static method in class stdlib.StdIn
-
Returns true if standard input is empty (except possibly for whitespace).
- isKeyPressed(int) - Static method in class stdlib.StdDraw
-
Returns true if the given key is being pressed.
- isMousePressed() - Static method in class stdlib.StdDraw
-
Returns true if the mouse is being pressed.
K
- keyPressed(KeyEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- keyReleased(KeyEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- keyTyped(KeyEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
L
- LIGHT_GRAY - Static variable in class stdlib.StdDraw
-
The color light gray.
- line(double, double, double, double) - Static method in class stdlib.StdDraw
-
Draws a line segment between (x0, y0) and (x1, y1).
- loop(String) - Static method in class stdlib.StdAudio
-
Loops an audio file (in .wav, .mid, or .au format) in a background thread.
- luminance() - Method in class stdlib.RGBColor
-
Returns the luminance of this color.
M
- MAGENTA - Static variable in class stdlib.StdDraw
-
The color magenta.
- main(String[]) - Static method in class stdlib.BinaryIn
-
Unit tests the
BinaryIn
data type. - main(String[]) - Static method in class stdlib.BinaryOut
-
Test client.
- main(String[]) - Static method in class stdlib.BinaryStdIn
-
Test client.
- main(String[]) - Static method in class stdlib.BinaryStdOut
-
Tests the methods in this class.
- main(String[]) - Static method in class stdlib.In
-
Unit tests the
In
data type. - main(String[]) - Static method in class stdlib.Out
-
A test client.
- main(String[]) - Static method in class stdlib.Picture
-
Unit tests this
Picture
data type. - main(String[]) - Static method in class stdlib.RGBColor
-
Unit tests this data type.
- main(String[]) - Static method in class stdlib.StdArrayIO
-
Unit tests
StdArrayIO
. - main(String[]) - Static method in class stdlib.StdAudio
-
Test client - play an A major scale to standard audio.
- main(String[]) - Static method in class stdlib.StdDraw
-
Test client.
- main(String[]) - Static method in class stdlib.StdIn
-
Interactive test of basic functionality.
- main(String[]) - Static method in class stdlib.StdOut
-
Unit tests some of the methods in
StdOut
. - main(String[]) - Static method in class stdlib.StdRandom
-
Unit tests the methods in this class.
- main(String[]) - Static method in class stdlib.StdStats
-
Unit tests
StdStats
. - max(double[]) - Static method in class stdlib.StdStats
-
Returns the maximum value in the specified array.
- max(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the maximum value in the specified subarray.
- max(int[]) - Static method in class stdlib.StdStats
-
Returns the maximum value in the specified array.
- mean(double[]) - Static method in class stdlib.StdStats
-
Returns the average value in the specified array.
- mean(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the average value in the specified subarray.
- mean(int[]) - Static method in class stdlib.StdStats
-
Returns the average value in the specified array.
- min(double[]) - Static method in class stdlib.StdStats
-
Returns the minimum value in the specified array.
- min(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the minimum value in the specified subarray.
- min(int[]) - Static method in class stdlib.StdStats
-
Returns the minimum value in the specified array.
- mouseClicked(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mouseDragged(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mouseEntered(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mouseExited(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mouseMoved(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mousePressed(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mouseReleased(MouseEvent) - Method in class stdlib.StdDraw
-
This method cannot be called directly.
- mouseX() - Static method in class stdlib.StdDraw
-
Returns the x-coordinate of the mouse.
- mouseY() - Static method in class stdlib.StdDraw
-
Returns the y-coordinate of the mouse.
N
- nextKeyTyped() - Static method in class stdlib.StdDraw
-
Returns the next key that was typed by the user (that your program has not already processed).
O
- ORANGE - Static variable in class stdlib.StdDraw
-
The color orange.
- Out - Class in stdlib
-
This class provides methods for writing strings and numbers to various output streams, including standard output, file, and sockets.
- Out() - Constructor for class stdlib.Out
-
Initializes an output stream from standard output.
- Out(String) - Constructor for class stdlib.Out
-
Initializes an output stream from a file.
- Out(Socket) - Constructor for class stdlib.Out
-
Initializes an output stream from a socket.
P
- pareto() - Static method in class stdlib.StdRandom
-
Returns a random real number from the standard Pareto distribution.
- pareto(double) - Static method in class stdlib.StdRandom
-
Returns a random real number from a Pareto distribution with shape parameter α.
- pause(int) - Static method in class stdlib.StdDraw
-
Pauses for t milliseconds.
- permutation(int) - Static method in class stdlib.StdRandom
-
Returns a uniformly random permutation of n elements.
- permutation(int, int) - Static method in class stdlib.StdRandom
-
Returns a uniformly random permutation of k of n elements.
- picture(double, double, String) - Static method in class stdlib.StdDraw
-
Draws the specified image centered at (x, y).
- picture(double, double, String, double) - Static method in class stdlib.StdDraw
-
Draws the specified image centered at (x, y), rotated given number of degrees.
- picture(double, double, String, double, double) - Static method in class stdlib.StdDraw
-
Draws the specified image centered at (x, y), rescaled to the specified bounding box.
- picture(double, double, String, double, double, double) - Static method in class stdlib.StdDraw
-
Draws the specified image centered at (x, y), rotated given number of degrees, and rescaled to the specified bounding box.
- Picture - Class in stdlib
-
This class provides methods for manipulating individual pixels of an image using the RGB color format.
- Picture(int, int) - Constructor for class stdlib.Picture
-
Creates a
width
-by-height
picture, withwidth
columns andheight
rows, where each pixel is black. - Picture(String) - Constructor for class stdlib.Picture
-
Creates a picture by reading an image from a file or URL.
- Picture(Picture) - Constructor for class stdlib.Picture
-
Creates a new picture that is a deep copy of the argument picture.
- PINK - Static variable in class stdlib.StdDraw
-
The color pink.
- play(double) - Static method in class stdlib.StdAudio
-
Writes one sample (between -1.0 and +1.0) to standard audio.
- play(double[]) - Static method in class stdlib.StdAudio
-
Writes the array of samples (between -1.0 and +1.0) to standard audio.
- play(String) - Static method in class stdlib.StdAudio
-
Plays an audio file (in .wav, .mid, or .au format) in a background thread.
- plotBars(double[]) - Static method in class stdlib.StdStats
-
Plots bars from (0, ai) to (ai) for each i to standard draw.
- plotLines(double[]) - Static method in class stdlib.StdStats
-
Plots the line segments connecting (i, ai) to (i+1, ai+1) for each i to standard draw.
- plotPoints(double[]) - Static method in class stdlib.StdStats
-
Plots the points (0, a0), (1, a1), ..., (n-1, an-1) to standard draw.
- point(double, double) - Static method in class stdlib.StdDraw
-
Draws a point centered at (x, y).
- poisson(double) - Static method in class stdlib.StdRandom
-
Returns a random integer from a Poisson distribution with mean λ.
- polygon(double[], double[]) - Static method in class stdlib.StdDraw
-
Draws a polygon with the vertices (x0, y0), (x1, y1), ..., (xn–1, yn–1).
- print() - Method in class stdlib.Out
-
Flushes this output stream.
- print() - Static method in class stdlib.StdOut
-
Flushes standard output.
- print(boolean) - Method in class stdlib.Out
-
Prints a boolean to this output stream and flushes this output stream.
- print(boolean) - Static method in class stdlib.StdOut
-
Prints a boolean to standard output and flushes standard output.
- print(boolean[]) - Static method in class stdlib.StdArrayIO
-
Prints a 1D array of booleans to standard output.
- print(boolean[][]) - Static method in class stdlib.StdArrayIO
-
Prints a 2D array of booleans to standard output.
- print(byte) - Method in class stdlib.Out
-
Prints a byte to this output stream and flushes this output stream.
- print(byte) - Static method in class stdlib.StdOut
-
Prints a byte to standard output and flushes standard output.
- print(char) - Method in class stdlib.Out
-
Prints a character to this output stream and flushes this output stream.
- print(char) - Static method in class stdlib.StdOut
-
Prints a character to standard output and flushes standard output.
- print(double) - Method in class stdlib.Out
-
Prints a double to this output stream and flushes this output stream.
- print(double) - Static method in class stdlib.StdOut
-
Prints a double to standard output and flushes standard output.
- print(double[]) - Static method in class stdlib.StdArrayIO
-
Prints an array of doubles to standard output.
- print(double[][]) - Static method in class stdlib.StdArrayIO
-
Prints the 2D array of doubles to standard output.
- print(float) - Method in class stdlib.Out
-
Prints a float to this output stream and flushes this output stream.
- print(float) - Static method in class stdlib.StdOut
-
Prints a float to standard output and flushes standard output.
- print(int) - Method in class stdlib.Out
-
Prints an integer to this output stream and flushes this output stream.
- print(int) - Static method in class stdlib.StdOut
-
Prints an integer to standard output and flushes standard output.
- print(int[]) - Static method in class stdlib.StdArrayIO
-
Prints an array of integers to standard output.
- print(int[][]) - Static method in class stdlib.StdArrayIO
-
Print a 2D array of integers to standard output.
- print(long) - Method in class stdlib.Out
-
Prints a long integer to this output stream and flushes this output stream.
- print(long) - Static method in class stdlib.StdOut
-
Prints a long integer to standard output and flushes standard output.
- print(short) - Static method in class stdlib.StdOut
-
Prints a short integer to standard output and flushes standard output.
- print(Object) - Method in class stdlib.Out
-
Prints an object to this output stream and flushes this output stream.
- print(Object) - Static method in class stdlib.StdOut
-
Prints an object to standard output and flushes standard output.
- printf(String, Object...) - Method in class stdlib.Out
-
Prints a formatted string to this output stream, using the specified format string and arguments, and then flushes this output stream.
- printf(String, Object...) - Static method in class stdlib.StdOut
-
Prints a formatted string to standard output, using the specified format string and arguments, and then flushes standard output.
- printf(Locale, String, Object...) - Method in class stdlib.Out
-
Prints a formatted string to this output stream, using the specified locale, format string, and arguments, and then flushes this output stream.
- printf(Locale, String, Object...) - Static method in class stdlib.StdOut
-
Prints a formatted string to standard output, using the locale and the specified format string and arguments; then flushes standard output.
- println() - Method in class stdlib.Out
-
Terminates the current line by printing the line-separator string.
- println() - Static method in class stdlib.StdOut
-
Terminates the current line by printing the line-separator string.
- println(boolean) - Method in class stdlib.Out
-
Prints a boolean to this output stream and then terminates the line.
- println(boolean) - Static method in class stdlib.StdOut
-
Prints a boolean to standard output and then terminates the line.
- println(byte) - Method in class stdlib.Out
-
Prints a byte to this output stream and then terminates the line.
- println(byte) - Static method in class stdlib.StdOut
-
Prints a byte to standard output and then terminates the line.
- println(char) - Method in class stdlib.Out
-
Prints a character to this output stream and then terminates the line.
- println(char) - Static method in class stdlib.StdOut
-
Prints a character to standard output and then terminates the line.
- println(double) - Method in class stdlib.Out
-
Prints a double to this output stream and then terminates the line.
- println(double) - Static method in class stdlib.StdOut
-
Prints a double to standard output and then terminates the line.
- println(float) - Method in class stdlib.Out
-
Prints a float to this output stream and then terminates the line.
- println(float) - Static method in class stdlib.StdOut
-
Prints an integer to standard output and then terminates the line.
- println(int) - Method in class stdlib.Out
-
Prints an integer to this output stream and then terminates the line.
- println(int) - Static method in class stdlib.StdOut
-
Prints an integer to standard output and then terminates the line.
- println(long) - Method in class stdlib.Out
-
Prints a long to this output stream and then terminates the line.
- println(long) - Static method in class stdlib.StdOut
-
Prints a long to standard output and then terminates the line.
- println(short) - Static method in class stdlib.StdOut
-
Prints a short integer to standard output and then terminates the line.
- println(Object) - Method in class stdlib.Out
-
Prints an object to this output stream and then terminates the line.
- println(Object) - Static method in class stdlib.StdOut
-
Prints an object to this output stream and then terminates the line.
R
- read(String) - Static method in class stdlib.StdAudio
-
Reads audio samples from a file (in .wav or .au format) and returns them as a double array with values between -1.0 and +1.0.
- readAll() - Method in class stdlib.In
-
Reads and returns the remainder of this input stream, as a string.
- readAll() - Static method in class stdlib.StdIn
-
Reads and returns the remainder of the input, as a string.
- readAllDoubles() - Method in class stdlib.In
-
Reads all remaining tokens from this input stream, parses them as doubles, and returns them as an array of doubles.
- readAllDoubles() - Static method in class stdlib.StdIn
-
Reads all remaining tokens from standard input, parses them as doubles, and returns them as an array of doubles.
- readAllInts() - Method in class stdlib.In
-
Reads all remaining tokens from this input stream, parses them as integers, and returns them as an array of integers.
- readAllInts() - Static method in class stdlib.StdIn
-
Reads all remaining tokens from standard input, parses them as integers, and returns them as an array of integers.
- readAllLines() - Method in class stdlib.In
-
Reads all remaining lines from this input stream and returns them as an array of strings.
- readAllLines() - Static method in class stdlib.StdIn
-
Reads all remaining lines from standard input and returns them as an array of strings.
- readAllLongs() - Method in class stdlib.In
-
Reads all remaining tokens from this input stream, parses them as longs, and returns them as an array of longs.
- readAllLongs() - Static method in class stdlib.StdIn
-
Reads all remaining tokens from standard input, parses them as longs, and returns them as an array of longs.
- readAllStrings() - Method in class stdlib.In
-
Reads all remaining tokens from this input stream and returns them as an array of strings.
- readAllStrings() - Static method in class stdlib.StdIn
-
Reads all remaining tokens from standard input and returns them as an array of strings.
- readBoolean() - Method in class stdlib.BinaryIn
-
Reads the next bit of data from this binary input stream and return as a boolean.
- readBoolean() - Static method in class stdlib.BinaryStdIn
-
Reads the next bit of data from standard input and return as a boolean.
- readBoolean() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
boolean
(interpreting either"true"
or"1"
astrue
, and either"false"
or"0"
asfalse
). - readBoolean() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as a boolean, and returns the boolean.
- readBoolean1D() - Static method in class stdlib.StdArrayIO
-
Reads a 1D array of booleans from standard input and returns it.
- readBoolean2D() - Static method in class stdlib.StdArrayIO
-
Reads a 2D array of booleans from standard input and returns it.
- readByte() - Method in class stdlib.BinaryIn
-
Reads the next 8 bits from this binary input stream and return as an 8-bit byte.
- readByte() - Static method in class stdlib.BinaryStdIn
-
Reads the next 8 bits from standard input and return as an 8-bit byte.
- readByte() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
byte
, and returns thebyte
. - readByte() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as a byte, and returns the byte.
- readChar() - Method in class stdlib.BinaryIn
-
Reads the next 8 bits from this binary input stream and return as an 8-bit char.
- readChar() - Static method in class stdlib.BinaryStdIn
-
Reads the next 8 bits from standard input and return as an 8-bit char.
- readChar() - Method in class stdlib.In
-
Reads and returns the next character in this input stream.
- readChar() - Static method in class stdlib.StdIn
-
Reads and returns the next character.
- readChar(int) - Method in class stdlib.BinaryIn
-
Reads the next r bits from this binary input stream and return as an r-bit character.
- readChar(int) - Static method in class stdlib.BinaryStdIn
-
Reads the next r bits from standard input and return as an r-bit character.
- readDouble() - Method in class stdlib.BinaryIn
-
Reads the next 64 bits from this binary input stream and return as a 64-bit double.
- readDouble() - Static method in class stdlib.BinaryStdIn
-
Reads the next 64 bits from standard input and return as a 64-bit double.
- readDouble() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
double
, and returns thedouble
. - readDouble() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as a double, and returns the double.
- readDouble1D() - Static method in class stdlib.StdArrayIO
-
Reads a 1D array of doubles from standard input and returns it.
- readDouble2D() - Static method in class stdlib.StdArrayIO
-
Reads a 2D array of doubles from standard input and returns it.
- readFloat() - Method in class stdlib.BinaryIn
-
Reads the next 32 bits from this binary input stream and return as a 32-bit float.
- readFloat() - Static method in class stdlib.BinaryStdIn
-
Reads the next 32 bits from standard input and return as a 32-bit float.
- readFloat() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
float
, and returns thefloat
. - readFloat() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as a float, and returns the float.
- readInt() - Method in class stdlib.BinaryIn
-
Reads the next 32 bits from this binary input stream and return as a 32-bit int.
- readInt() - Static method in class stdlib.BinaryStdIn
-
Reads the next 32 bits from standard input and return as a 32-bit int.
- readInt() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
int
, and returns theint
. - readInt() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as an integer, and returns the integer.
- readInt(int) - Method in class stdlib.BinaryIn
-
Reads the next r bits from this binary input stream return as an r-bit int.
- readInt(int) - Static method in class stdlib.BinaryStdIn
-
Reads the next r bits from standard input and return as an r-bit int.
- readInt1D() - Static method in class stdlib.StdArrayIO
-
Reads a 1D array of integers from standard input and returns it.
- readInt2D() - Static method in class stdlib.StdArrayIO
-
Reads a 2D array of integers from standard input and returns it.
- readLine() - Method in class stdlib.In
-
Reads and returns the next line in this input stream.
- readLine() - Static method in class stdlib.StdIn
-
Reads and returns the next line, excluding the line separator if present.
- readLong() - Method in class stdlib.BinaryIn
-
Reads the next 64 bits from this binary input stream and return as a 64-bit long.
- readLong() - Static method in class stdlib.BinaryStdIn
-
Reads the next 64 bits from standard input and return as a 64-bit long.
- readLong() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
long
, and returns thelong
. - readLong() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as a long integer, and returns the long integer.
- readShort() - Method in class stdlib.BinaryIn
-
Reads the next 16 bits from this binary input stream and return as a 16-bit short.
- readShort() - Static method in class stdlib.BinaryStdIn
-
Reads the next 16 bits from standard input and return as a 16-bit short.
- readShort() - Method in class stdlib.In
-
Reads the next token from this input stream, parses it as a
short
, and returns theshort
. - readShort() - Static method in class stdlib.StdIn
-
Reads the next token from standard input, parses it as a short integer, and returns the short integer.
- readString() - Method in class stdlib.BinaryIn
-
Reads the remaining bytes of data from this binary input stream and return as a string.
- readString() - Static method in class stdlib.BinaryStdIn
-
Reads the remaining bytes of data from standard input and return as a string.
- readString() - Method in class stdlib.In
-
Reads the next token from this input stream and returns it as a
String
. - readString() - Static method in class stdlib.StdIn
-
Reads the next token and returns the
String
. - rectangle(double, double, double, double) - Static method in class stdlib.StdDraw
-
Draws a rectangle of the specified size, centered at (x, y).
- RED - Static variable in class stdlib.StdDraw
-
The color red.
- resync() - Static method in class stdlib.StdIn
-
If StdIn changes, use this to reinitialize the scanner.
- resync() - Static method in class stdlib.StdOut
-
If StdOut changes, use this to reinitialize the PrintWriter.
- RGBColor - Class in stdlib
-
This class provides a representation for a color in RGB space.
- RGBColor(int, int, int) - Constructor for class stdlib.RGBColor
-
Constructs a color given its RGB components.
S
- SAMPLE_RATE - Static variable in class stdlib.StdAudio
-
The sample rate: 44,100 Hz for CD quality audio.
- save(String) - Method in class stdlib.Picture
-
Saves the picture to a file in either PNG or JPEG format.
- save(String) - Static method in class stdlib.StdDraw
-
Saves the drawing to using the specified filename.
- save(String, double[]) - Static method in class stdlib.StdAudio
-
Saves the double array as an audio file (using .wav or .au format).
- set(int, int, RGBColor) - Method in class stdlib.Picture
-
Sets the color of pixel (
col
,row
) to given color. - setCanvasSize() - Static method in class stdlib.StdDraw
-
Sets the canvas (drawing area) to be 512-by-512 pixels.
- setCanvasSize(int, int) - Static method in class stdlib.StdDraw
-
Sets the canvas (drawing area) to be width-by-height pixels.
- setFont() - Static method in class stdlib.StdDraw
-
Sets the font to the default font (sans serif, 16 point).
- setFont(Font) - Static method in class stdlib.StdDraw
-
Sets the font to the specified value.
- setOriginLowerLeft() - Method in class stdlib.Picture
-
Sets the origin to be the lower left pixel.
- setOriginUpperLeft() - Method in class stdlib.Picture
-
Sets the origin to be the upper left pixel.
- setPenColor() - Static method in class stdlib.StdDraw
-
Sets the pen color to the default color (black).
- setPenColor(int, int, int) - Static method in class stdlib.StdDraw
-
Sets the pen color to the specified RGB color.
- setPenColor(RGBColor) - Static method in class stdlib.StdDraw
-
Sets the pen color to the specified color.
- setPenRadius() - Static method in class stdlib.StdDraw
-
Sets the pen size to the default size (0.002).
- setPenRadius(double) - Static method in class stdlib.StdDraw
-
Sets the radius of the pen to the specified size.
- setScale() - Static method in class stdlib.StdDraw
-
Sets the x-scale and y-scale to be the default (between 0.0 and 1.0).
- setScale(double, double) - Static method in class stdlib.StdDraw
-
Sets both the x-scale and y-scale to the (same) specified range.
- setSeed(long) - Static method in class stdlib.StdRandom
-
Sets the seed of the pseudo-random number generator.
- setXscale() - Static method in class stdlib.StdDraw
-
Sets the x-scale to be the default (between 0.0 and 1.0).
- setXscale(double, double) - Static method in class stdlib.StdDraw
-
Sets the x-scale to the specified range.
- setYscale() - Static method in class stdlib.StdDraw
-
Sets the y-scale to be the default (between 0.0 and 1.0).
- setYscale(double, double) - Static method in class stdlib.StdDraw
-
Sets the y-scale to the specified range.
- show() - Method in class stdlib.Picture
-
Displays the picture in a window on the screen.
- show() - Static method in class stdlib.StdDraw
-
Copies offscreen buffer to onscreen buffer.
- shuffle(double[]) - Static method in class stdlib.StdRandom
-
Rearranges the elements of the specified array in uniformly random order.
- shuffle(double[], int, int) - Static method in class stdlib.StdRandom
-
Rearranges the elements of the specified subarray in uniformly random order.
- shuffle(int[]) - Static method in class stdlib.StdRandom
-
Rearranges the elements of the specified array in uniformly random order.
- shuffle(int[], int, int) - Static method in class stdlib.StdRandom
-
Rearranges the elements of the specified subarray in uniformly random order.
- shuffle(Object[]) - Static method in class stdlib.StdRandom
-
Rearranges the elements of the specified array in uniformly random order.
- shuffle(Object[], int, int) - Static method in class stdlib.StdRandom
-
Rearranges the elements of the specified subarray in uniformly random order.
- square(double, double, double) - Static method in class stdlib.StdDraw
-
Draws a square of side length 2r, centered at (x, y).
- StdArrayIO - Class in stdlib
-
This class provides methods for reading in 1D and 2D arrays from standard input and printing out to standard output.
- StdAudio - Class in stdlib
-
This class provides a basic capability for creating, reading, and saving audio.
- stddev(double[]) - Static method in class stdlib.StdStats
-
Returns the sample standard deviation in the specified array.
- stddev(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the sample standard deviation in the specified subarray.
- stddev(int[]) - Static method in class stdlib.StdStats
-
Returns the sample standard deviation in the specified array.
- stddevp(double[]) - Static method in class stdlib.StdStats
-
Returns the population standard deviation in the specified array.
- stddevp(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the population standard deviation in the specified subarray.
- StdDraw - Class in stdlib
-
This class provides a basic capability for creating drawings with your programs.
- StdIn - Class in stdlib
-
This class provides static methods for reading strings and numbers from standard input.
- stdlib - package stdlib
- StdOut - Class in stdlib
-
This class provides methods for printing strings and numbers to standard output.
- StdRandom - Class in stdlib
-
This class provides static methods for generating random number from various discrete and continuous distributions, including uniform, Binomial, Bernoulli, geometric, Gaussian, exponential, Pareto, Poisson, and Cauchy.
- StdStats - Class in stdlib
-
This class provides static methods for computing statistics such as min, max, mean, sample standard deviation, and sample variance.
T
- text(double, double, String) - Static method in class stdlib.StdDraw
-
Writes the given text string in the current font, centered at (x, y).
- text(double, double, String, double) - Static method in class stdlib.StdDraw
-
Writes the given text string in the current font, centered at (x, y) and rotated by the specified number of degrees.
- textLeft(double, double, String) - Static method in class stdlib.StdDraw
-
Writes the given text string in the current font, left-aligned at (x, y).
- textRight(double, double, String) - Static method in class stdlib.StdDraw
-
Writes the given text string in the current font, right-aligned at (x, y).
- toGray() - Method in class stdlib.RGBColor
-
Returns the grayscale equivalent of this color.
- toString() - Method in class stdlib.RGBColor
-
Returns a string representation of this color.
U
- uniform() - Static method in class stdlib.StdRandom
-
Returns a random real number uniformly in [0, 1).
- uniform(double, double) - Static method in class stdlib.StdRandom
-
Returns a random real number uniformly in [a, b).
- uniform(int) - Static method in class stdlib.StdRandom
-
Returns a random integer uniformly in [0, n).
- uniform(int, int) - Static method in class stdlib.StdRandom
-
Returns a random integer uniformly in [a, b).
- uniform(long) - Static method in class stdlib.StdRandom
-
Returns a random long integer uniformly in [0, n).
V
- var(double[]) - Static method in class stdlib.StdStats
-
Returns the sample variance in the specified array.
- var(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the sample variance in the specified subarray.
- var(int[]) - Static method in class stdlib.StdStats
-
Returns the sample variance in the specified array.
- varp(double[]) - Static method in class stdlib.StdStats
-
Returns the population variance in the specified array.
- varp(double[], int, int) - Static method in class stdlib.StdStats
-
Returns the population variance in the specified subarray.
W
- WHITE - Static variable in class stdlib.StdDraw
-
The color white.
- width() - Method in class stdlib.Picture
-
Returns the width of the picture.
- write(boolean) - Method in class stdlib.BinaryOut
-
Writes the specified bit to the binary output stream.
- write(boolean) - Static method in class stdlib.BinaryStdOut
-
Writes the specified bit to standard output.
- write(byte) - Method in class stdlib.BinaryOut
-
Writes the 8-bit byte to the binary output stream.
- write(byte) - Static method in class stdlib.BinaryStdOut
-
Writes the 8-bit byte to standard output.
- write(char) - Method in class stdlib.BinaryOut
-
Writes the 8-bit char to the binary output stream.
- write(char) - Static method in class stdlib.BinaryStdOut
-
Writes the 8-bit char to standard output.
- write(char, int) - Method in class stdlib.BinaryOut
-
Writes the r-bit char to the binary output stream.
- write(char, int) - Static method in class stdlib.BinaryStdOut
-
Writes the r-bit char to standard output.
- write(double) - Method in class stdlib.BinaryOut
-
Writes the 64-bit double to the binary output stream.
- write(double) - Static method in class stdlib.BinaryStdOut
-
Writes the 64-bit double to standard output.
- write(float) - Method in class stdlib.BinaryOut
-
Writes the 32-bit float to the binary output stream.
- write(float) - Static method in class stdlib.BinaryStdOut
-
Writes the 32-bit float to standard output.
- write(int) - Method in class stdlib.BinaryOut
-
Writes the 32-bit int to the binary output stream.
- write(int) - Static method in class stdlib.BinaryStdOut
-
Writes the 32-bit int to standard output.
- write(int, int) - Method in class stdlib.BinaryOut
-
Writes the r-bit int to the binary output stream.
- write(int, int) - Static method in class stdlib.BinaryStdOut
-
Writes the r-bit int to standard output.
- write(long) - Method in class stdlib.BinaryOut
-
Writes the 64-bit long to the binary output stream.
- write(long) - Static method in class stdlib.BinaryStdOut
-
Writes the 64-bit long to standard output.
- write(short) - Method in class stdlib.BinaryOut
-
Write the 16-bit int to the binary output stream.
- write(short) - Static method in class stdlib.BinaryStdOut
-
Writes the 16-bit int to standard output.
- write(String) - Method in class stdlib.BinaryOut
-
Writes the string of 8-bit characters to the binary output stream.
- write(String) - Static method in class stdlib.BinaryStdOut
-
Writes the string of 8-bit characters to standard output.
- write(String, int) - Method in class stdlib.BinaryOut
-
Writes the string of r-bit characters to the binary output stream.
- write(String, int) - Static method in class stdlib.BinaryStdOut
-
Writes the string of r-bit characters to standard output.
Y
A B C D E F G H I K L M N O P R S T U V W YAll Classes and Interfaces|All Packages|Constant Field Values