Mercurial > hg > jslab
view src/samer/mds/GeometricFilter.java @ 0:bf79fb79ee13
Initial Mercurial check in.
author | samer |
---|---|
date | Tue, 17 Jan 2012 17:50:20 +0000 |
parents | |
children |
line wrap: on
line source
package samer.mds; import samer.maths.*; import samer.tools.*; public class GeometricFilter extends AnonymousTask { int N; Matrix P; // point positions (N by E) Vec F; // filter coefficients (N element) FunctionOfVector fn; // map from proximity to coeff. public GeometricFilter(Matrix P, Vec F, FunctionOfVector fn) { this.P=P; this.F=F; this.fn=fn; N=F.size(); } public void run() { double [][] _P=P.getArray(); double [] _F=F.array(); for (int i=0; i<N; i++) _F[i] = fn.apply(_P[i]); } }