I'm having troubles with classes of "individuals" and "populations" (I use such for an evolutionary strategy). Here is some sample code, the red line gives me a "NullPointerException":
class individual {
int value;
individual() {
value = 0;
}
void show() {
println(value);
}
}
class population {
int pop_size;
individual[] member;
population(int pop_size_init) {
pop_size = pop_size_init;
member = new individual[pop_size];
}
void show_all() {
for (int ind = 0; ind < pop_size; ind++) {
member[ind].show();
}
}
}
population testpop;
void setup() {
testpop = new population(10);
testpop.show_all();
}
void draw () {
}
Could someone please tell me what I did wrong here?
I'm new to this forum, so I hope I ask my question in the right place.
Does anyone know how to make a gnome screen saver (or X screen saver) from a (non interactive) processing program? The program has some options, too, and it would be extra nice to have the possibility to set them in the usual screen saver settings dialog.