You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
947 B
Python

FluidKDTree : FluidRTDataClient {
*new {|server,numNeighbours = 1, radius = 0, lookupDataSet = ""|
var env;
var names = [\numNeighbours, \radius]
++ this.prServerString(lookupDataSet.asSymbol).collect{|x,i|
("lookupDataSet"++i).asSymbol;
};
var values = [numNeighbours, radius] ++ this.prServerString(lookupDataSet.asSymbol);
var params = [names,values].lace;
/* env = Environment();
synthControls[1..].do{|x|
env.put(x,0);
};
env.put(\numNeighbours,1); */
^super.new1(server,params);
/* env,
[\numNeighbours]++lookupDataSet); */
}
fit{|dataSet,action|
this.prSendMsg(\fit, [dataSet.asSymbol], action);
}
kNearest{ |buffer, action|
this.prSendMsg(\kNearest,
[buffer.asUGenInput], action,
[strings(FluidMessageResponse,_,_)]
);
}
kNearestDist { |buffer, action|
this.prSendMsg(\kNearestDist, [buffer.asUGenInput], action,
[numbers(FluidMessageResponse,_,nil,_)]
);
}
}