comparison src/samer/mds/GeometricFilter.java @ 0:bf79fb79ee13

Initial Mercurial check in.
author samer
date Tue, 17 Jan 2012 17:50:20 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:bf79fb79ee13
1 package samer.mds;
2
3 import samer.maths.*;
4 import samer.tools.*;
5
6 public class GeometricFilter extends AnonymousTask {
7 int N;
8 Matrix P; // point positions (N by E)
9 Vec F; // filter coefficients (N element)
10 FunctionOfVector fn; // map from proximity to coeff.
11
12 public GeometricFilter(Matrix P, Vec F, FunctionOfVector fn) {
13 this.P=P; this.F=F; this.fn=fn;
14 N=F.size();
15 }
16 public void run() {
17 double [][] _P=P.getArray();
18 double [] _F=F.array();
19 for (int i=0; i<N; i++) _F[i] = fn.apply(_P[i]);
20 }
21 }