|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.io.array.ArrayOfFloatsWritable
public class ArrayOfFloatsWritable
An array of floats that implements Writable class.
| Constructor Summary | |
|---|---|
ArrayOfFloatsWritable()
Constructor with no arguments. |
|
ArrayOfFloatsWritable(float[] array)
Constructor take in a one-dimensional array. |
|
ArrayOfFloatsWritable(int size)
Constructor that takes the size of the array as an argument. |
|
| Method Summary | |
|---|---|
float |
get(int i)
Returns the float value at position i. |
float[] |
getArray()
Get a shallow copy of the array. |
float[] |
getClone()
Get a deep copy of the array. |
void |
readFields(DataInput in)
|
void |
set(int i,
float f)
Sets the float at position i to f. |
void |
setArray(float[] array)
Set the array. |
int |
size()
Returns the size of the float array. |
String |
toString()
|
void |
write(DataOutput out)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayOfFloatsWritable()
public ArrayOfFloatsWritable(float[] array)
array - input float arraypublic ArrayOfFloatsWritable(int size)
size - number of floats in array| Method Detail |
|---|
public void readFields(DataInput in)
throws IOException
readFields in interface WritableIOException
public void write(DataOutput out)
throws IOException
write in interface WritableIOExceptionpublic float[] getClone()
public float[] getArray()
public void setArray(float[] array)
array - public float get(int i)
i - index of float to be returned
public void set(int i,
float f)
i - position in arrayf - float value to be setpublic int size()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||