pixel* initRandom(unsigned int K, pixel** pixelMatrix,unsigned int height, unsigned int length){ pixel* clusterKernel=malloc(K*sizeof(pixel)); unsigned int i; for (i = 0; i < K; i++) { clusterKernel[i]=randomPixel(pixelMatrix,height,length); } return clusterKernel; }
void Visualizer::Run(){ //std::cout << animationStatus << "..."; switch(animationStatus) { case 0: clear(); break; case 1: stroboscope(); break; case 2: lightchange(); break; case 3: fadeIn(); break; case 4: pulseCircle(); break; case 5: lines(); break; case 6: circles(); break; case 7: randomLines(); break; case 8: square(); break; case 9: randomPixel(); break; case 10: rotateLine(); break; } return; }
Feature SampleContainer::getRandomFeature() const { Pixel first = randomPixel(); Pixel second = randomPixel(); return Feature(first, second, static_cast<size_t > (rand() % FEATURE_NUMBER)); }