view src/samer/models/ICAScalerSync.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.models;

import samer.maths.*;
import samer.tools.*;

/**
	This is a task which subsumes a post-scaling into an ICA weight matrix
*/

public class ICAScalerSync extends AnonymousTask {
	Matrix	W;
	VVector	w;

	public ICAScalerSync(ICA ica, DiffScaler sc) {
		W=ica.getWeightMatrix();
		w=sc.weights();
	}

	public void run() {
		double [][] _W=W.getArray();
		double [] _w=w.array();
		int			n=w.size();
		for (int i=0; i<n; i++) Mathx.mul(_W[i],_w[i]);
		Mathx.setAll(_w,1);
		w.changed();
		W.changed();
	}
}