Mercurial > hg > jslab
comparison src/samer/models/ICAScalerSync.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.models; | |
2 | |
3 import samer.maths.*; | |
4 import samer.tools.*; | |
5 | |
6 /** | |
7 This is a task which subsumes a post-scaling into an ICA weight matrix | |
8 */ | |
9 | |
10 public class ICAScalerSync extends AnonymousTask { | |
11 Matrix W; | |
12 VVector w; | |
13 | |
14 public ICAScalerSync(ICA ica, DiffScaler sc) { | |
15 W=ica.getWeightMatrix(); | |
16 w=sc.weights(); | |
17 } | |
18 | |
19 public void run() { | |
20 double [][] _W=W.getArray(); | |
21 double [] _w=w.array(); | |
22 int n=w.size(); | |
23 for (int i=0; i<n; i++) Mathx.mul(_W[i],_w[i]); | |
24 Mathx.setAll(_w,1); | |
25 w.changed(); | |
26 W.changed(); | |
27 } | |
28 } |