PointAttractionObjective:: PointAttractionObjective(string const & name, size_t node, double px, double py, double pz, double distance) : Objective(name) { Vector silly(3); silly << px, py, pz; construct(node, silly, distance); }
int main() { // Our program's first thread starts in the main() function. printf( "Now in the main() function.\n" ); // Let's now create our second thread and ask it to start // in the silly() function. _beginthread( silly, 0, (void*)12 ); // From here on there are two separate threads executing // our one program. // This main thread can call the silly() function if it wants to. silly( (void*)-5 ); Sleep( 100 ); }
/* String Arduino50::check_pin() * @param1: solution s * purpose: reads the pin id, (set using set_pin) if matches solution return hash : error msg */ String Arduino50::check_pin(solution s) { return (_pin == s.pin) ? silly(s.hash, s.num) : s.error; }
/* String Arduino50::check_number() * @param1: solution s * purpose: reads the number value, (set using set_number) if matches solution return hash : error msg */ String Arduino50::check_number(solution s) { return (_number == s.val) ? silly(s.hash, s.num) : s.error; }
/* String Arduino50::check_read() * @param1: solution s * purpose: reads the digital pin value, if matches solution return hash : error msg */ String Arduino50::check_read(solution s) { return (digitalRead(s.pin) == s.val) ? silly(s.hash, s.num) : s.error; }