You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mrql.apache.org by Apache Wiki <wi...@apache.org> on 2013/04/22 21:24:17 UTC
[Mrql Wiki] Update of "points.mrql" by LeonidasFegaras
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Mrql Wiki" for change notification.
The "points.mrql" page has been changed by LeonidasFegaras:
http://wiki.apache.org/mrql/points.mrql
New page:
{{{
// generate random points in the 4 squares: [2..4,6..8]*[2..4,6..8]
// used in kmeans.mrql
function randomV ( v: double ) : double {
let x = random(100000)/10000.0
in if ((x >= v and x <= v*2.0)
or (x >= v*3.0 and x <= v*4.0))
then x
else randomV(v)
};
store "points.bin"
from select < X: randomV(2.0), Y: randomV(2.0) >
from i in 1...(toLong(args[0]));
}}}