Mercurial > hg > jslab
view src/samer/mds/GeometricFilter.java @ 8:5e3cbbf173aa tip
Reorganise some more
author | samer |
---|---|
date | Fri, 05 Apr 2019 22:41:58 +0100 |
parents | bf79fb79ee13 |
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]); } }