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
946 B
Python

FluidKDTree : FluidDataClient {
*new {|server,numNeighbours = 1,lookupDataSet = ""|
var env;
var names = [\numNeighbours]
++ this.prServerString(lookupDataSet.asSymbol).collect{|x,i|
("lookupDataSet"++i).asSymbol;
};
var values = [numNeighbours] ++ 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,
this.numNeighbours.collect{string(FluidMessageResponse,_,_)}
);
}
kNearestDist { |buffer, action|
this.prSendMsg(\kNearestDist, [buffer.asUGenInput], action,
[numbers(FluidMessageResponse,_,this.numNeighbours,_)]
);
}
}