samer@0: /* samer@0: * Copyright (c) 2000, Samer Abdallah, King's College London. samer@0: * All rights reserved. samer@0: * samer@0: * This software is provided AS iS and WITHOUT ANY WARRANTY; samer@0: * without even the implied warranty of MERCHANTABILITY or samer@0: * FITNESS FOR A PARTICULAR PURPOSE. samer@0: */ samer@0: samer@0: package samer.maths; samer@0: import samer.core.*; samer@0: import samer.tools.*; samer@0: samer@0: public class ClippedDivide extends AnonymousTask samer@0: { samer@0: VVector out; samer@0: double [] _top, _bot, _F; samer@0: int l; samer@0: samer@0: public ClippedDivide(VVector num, VVector denom) throws Exception samer@0: { samer@0: l = num.size(); // length of input samer@0: out = new VVector("F",l); // output samer@0: samer@0: // add task to compute the desired frequency response samer@0: _top = num.array(); samer@0: _bot = denom.array(); samer@0: _F = out.array(); samer@0: } samer@0: samer@0: public VVector output() { return out; } samer@0: samer@0: public void run() { samer@0: for (int i=0; i