Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes
A
D
G
I
L
M
O
P
R
S
T
W
A
a1
- Static variable in class
A1Test
A1Driver
- class
A1Driver
.
A user interface to drive the Space and Point classes.
A1Driver()
- Constructor for class
A1Driver
A1Test
- class
A1Test
.
Perform some basic tests on A1Driver, Space, and Point
A1Test()
- Constructor for class
A1Test
addPoint(Point)
- Method in class
Space
Add Point p to this space.
D
distanceFrom(Point)
- Method in class
Point
Calculate the distance of this point from point p Requires: p must not be null.
G
get(int)
- Method in class
A1Driver
Print the point at position i in the collection ordered by the current view point.
get(int)
- Method in class
Point
Return the value in the ith dimension of this point Requires: 0 <= i < MAX_DIM
get(int)
- Method in class
Space
Get the point at position i in the collection ordered by the current view point.
I
initSpace()
- Method in class
A1Driver
Create and initialize the space object
L
load(String)
- Method in class
A1Driver
Load the points defined from the file filename into the collection
M
main(String[])
- Static method in class
A1Driver
main(String[])
- Static method in class
A1Test
Run the tests.
O
order()
- Method in class
Space
Sort the points in order of distance from the viewpoint.
P
Point
- class
Point
.
A representation of a point in N-dimensional space.
Point(int, int, int)
- Constructor for class
Point
Create a point in 3 dimensional space given three integers Requires: MAX_DIM == 3
Point(String)
- Constructor for class
Point
Create a new point given a string with MAX_DIM integers on it
printPoints(PrintStream)
- Method in class
Space
Print the list of points.
printSpace()
- Method in class
A1Driver
Print the collection of points from the space in the order of a point's distance from the view point.
R
readPoint()
- Method in class
A1Driver
Prompt for and read a point from the keyboard, and add it to the space.
readViewPoint()
- Method in class
A1Driver
Prompt for and read a point from the keyboard.
S
sameDimension(Point, int)
- Method in class
Point
Returns true if this point has the same value in dimension k as point p.
samePlane(int)
- Method in class
A1Driver
Print the list of points that are in the same kth plane as the view point.
samePlane(int)
- Method in class
Space
Print the list of points that are in the same kth plane as point p.
setView(int, int, int)
- Method in class
Space
Create 3d viewpoint.
setView(Point)
- Method in class
Space
Set the view point to be p.
Space
- class
Space
.
Space maintains a collection of Points, and a current view point.
Space()
- Constructor for class
Space
T
test1()
- Static method in class
A1Test
Test reading individual points from standard input, and printing the space in order of the distance from the viewpoint.
test2()
- Static method in class
A1Test
Test the load method in A1Driver, and test that changing the view point results in a correct reordering of the points in space.
test3()
- Static method in class
A1Test
Test the get method from A1Driver
test4()
- Static method in class
A1Test
Test the samePlane method in each dimension.
test5()
- Static method in class
A1Test
Test the write method in A1Driver by writing to a file and reloading the points.
toString()
- Method in class
Point
Construct the string representation of a Point: a list of the values in for each dimension.
toString()
- Method in class
Space
Create a string represenation of the object where the collection is given in order of a point's distance from the view point.
W
write(String)
- Method in class
A1Driver
Write the collection of points into a file in the same format as the input file.
A
D
G
I
L
M
O
P
R
S
T
W
Package
Class
Tree
Deprecated
Index
Help
PREV NEXT
FRAMES
NO FRAMES
All Classes