FloatList
void
add(int index,
float amount)
void
append(float value)
Add a new entry to the list.
void
append(float[] values)
void
append(FloatList list)
void
appendUnique(float value)
Add this value, but only if it's not already in the list.
float[]
array()
Create a new array with a copy of all the values.
float[]
array(float[] array)
Copy values into the specified array.
void
clear()
Remove all entries from the list.
FloatList
copy()
void
div(int index,
float amount)
float
get(int index)
Get an entry at a particular index.
FloatList
getPercent()
Returns a normalized version of this array.
FloatList
getSubset(int start)
FloatList
getSubset(int start,
int num)
boolean
hasValue(float value)
int
index(float what)
Return the first index of a particular value.
void
insert(int index,
float value)
void
insert(int index,
float[] values)
void
insert(int index,
FloatList list)
java.util.Iterator<java.lang.Float>
iterator()
Implemented this way so that we can use a FloatList in a for loop.
java.lang.String
join(java.lang.String separator)
float
max()
int
maxIndex()
float
min()
int
minIndex()
void
mult(int index,
float amount)
float
pop()
void
print()
void
push(float value)
Just an alias for append(), but matches pop()
float
remove(int index)
Remove an element from the specified index.
int
removeValue(int value)
int
removeValues(int value)
boolean
replaceValue(float value,
float newValue)
Replace the first instance of a particular value
boolean
replaceValues(float value,
float newValue)
Replace all instances of a particular value
void
resize(int length)
void
reverse()
void
save(java.io.File file)
Save tab-delimited entries to a file (TSV format, UTF-8 encoding)
void
set(int index,
float what)
Set the entry at a particular index.
void
shuffle()
Randomize the order of the list elements.
void
shuffle(PApplet sketch)
Randomize the list order using the random() function from the specified sketch, allowing shuffle() to use its current randomSeed() setting.
int
size()
Get the length of the list.
void
sort()
Sorts the array in place.
void
sortReverse()
Reverse sort, orders values from highest to lowest
void
sub(int index,
float amount)
float
sum()
double
sumDouble()
java.lang.String
toJSON()
Return this dictionary as a String in JSON format.
java.lang.String
toString()
float[]
values()
Returns the actual array being used to store the data.
void
write(java.io.PrintWriter writer)
Write entries to a PrintWriter, one per line