/usr/share/doc/autoclass/examples/simple.c is in autoclass 3.3.6.dfsg.1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | /*
simple - manufacture a simple test data set for multimix
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
double gauss(void);
/* return normally distributed random number (zero mean, unit variance) */
double gauss()
{ int i;
double sum=0;
for (i = 0; i < 12; i++) sum += rand();
return sum/RAND_MAX - 6.;
}
int main()
{
int threshold = RAND_MAX/3;
int i;
double x, y;
for (i = 0; i < 1000; i++)
{
if (rand() < threshold)
{
x = gauss();
y = gauss() + 4;
}
else
{
x = gauss()*3 + 5;
y = gauss()*3 + 9;
}
printf("%6.5f %6.5f\n", x, y);
}
}
|