Public Member Functions | |
| FloatVector () | |
| Creates an empty vector. | |
| FloatVector (int n) | |
| Constructs a vector with the specified capacity. | |
| int | size () |
| Gets the vector size. | |
| void | setSize (int n) |
| Sets the array size. | |
| void | add (float x) |
| Adds an element to the end of the vector. | |
| float | get (int i) |
| Gets an element. | |
| void | set (int i, float x) |
| Sets an element. | |
| void | copy (int start, float[] dst, int dstPos, int len) |
| Copies elements into an array. | |
| void | add (float[] src, int srcPos, int n) |
| Adds array elements. | |
| void | set (int i, float[] src, int srcPos, int n) |
| Sets array elements. | |
| float[] | toArray () |
| Converts the vector contents to an array. | |
| float[] | internalArray () |
| Gets the internal array object. | |
| void | ensureCapacity (int n) |
| Increases the capacity if necessary, to ensure that the vector can hold at least the number of elements specified by the argument. | |
| gridripper::util::FloatVector::FloatVector | ( | int | n | ) | [inline] |
Constructs a vector with the specified capacity.
| n | the initial capacity |
| int gridripper::util::FloatVector::size | ( | ) | [inline] |
Gets the vector size.
| void gridripper::util::FloatVector::setSize | ( | int | n | ) | [inline] |
Sets the array size.
| n | the new size |
| void gridripper::util::FloatVector::add | ( | float | x | ) | [inline] |
Adds an element to the end of the vector.
| x | the value |
| float gridripper::util::FloatVector::get | ( | int | i | ) | [inline] |
Gets an element.
| i | index |
| void gridripper::util::FloatVector::set | ( | int | i, | |
| float | x | |||
| ) | [inline] |
Sets an element.
| i | index | |
| x | value |
| void gridripper::util::FloatVector::copy | ( | int | start, | |
| float[] | dst, | |||
| int | dstPos, | |||
| int | len | |||
| ) | [inline] |
Copies elements into an array.
| start | starting position | |
| dst | the output array | |
| dstPos | starting position in the output array | |
| len | number of elements to copy |
| void gridripper::util::FloatVector::add | ( | float[] | src, | |
| int | srcPos, | |||
| int | n | |||
| ) | [inline] |
Adds array elements.
| src | the source array | |
| srcPos | starting position in the source array | |
| n | number of elements to copy |
| void gridripper::util::FloatVector::set | ( | int | i, | |
| float[] | src, | |||
| int | srcPos, | |||
| int | n | |||
| ) | [inline] |
Sets array elements.
| i | index of first element to overwrite | |
| src | the source array | |
| srcPos | starting position in the source array | |
| n | number of elements to copy |
| float [] gridripper::util::FloatVector::toArray | ( | ) | [inline] |
Converts the vector contents to an array.
Note that the returned array is a copy, hence it can only be used for reading, writing it has no effect on the vector contents.
| float [] gridripper::util::FloatVector::internalArray | ( | ) | [inline] |
Gets the internal array object.
Note that its length is usually larger than size().
| void gridripper::util::FloatVector::ensureCapacity | ( | int | n | ) | [inline] |
Increases the capacity if necessary, to ensure that the vector can hold at least the number of elements specified by the argument.
| n | the desired minimum capacity |
1.5.6