Make help file actually work

nix
Owen Green 6 years ago
parent aec77e0b14
commit 5df8513bd6

@ -83,26 +83,25 @@ EXAMPLES::
code:: code::
//Make some 2D points and place into a dataset //Make some 2D points and place into a dataset
s.reboot;
( (
~points = 100.collect{ [ 1.0.linrand,1.0.linrand] }; ~points = 100.collect{ [ 1.0.linrand,1.0.linrand] };
~dataset= FluidDataSet(s,\kdtree_help_rand2d); ~dataset= FluidDataSet(s,\kdtree_help_rand2d);
~dataset.free ~tmpbuf = Buffer.alloc(s,2);
~tmpbuf = Buffer.alloc(s,2) ;
fork{ fork{
~dataset.ready.wait; s.bind{
~points.do{|x,i| ~dataset.ready.wait;
(""++(i+1)++"/100").postln; ~points.do{|x,i|
~tmpbuf.setn(0,x); (""++(i+1)++"/100").postln;
~dataset.addPoint(i,~tmpbuf); ~tmpbuf.setn(0,x);
s.sync ~dataset.addPoint(i,~tmpbuf);
s.sync
};
"Data loaded".postln;
} }
} }
) )
//Make a new tree, and fit it to the dataset //Make a new tree, and fit it to the dataset
( (
fork{ fork{

Loading…
Cancel
Save