/*********************************************************************
 * This file is part of the cpplibs suite.
 *
 * Copyright (C) 2001 Topi Mäenpää 
 * All rights reserved.
 *
 * This program is free software. You can redistribute and/or modify
 * it under the terms of the free software licence found in the
 * accompanying file "COPYING". The licence terms must always be
 * redistributed with this source file. The above copyright notice
 * must be reproduced in all modified and unmodified copies of this
 * source file.
 *
 * $Revision: 1.3 $
 *********************************************************************/

#ifndef _DAUBECHIES_H
#define _DAUBECHIES_H

#include <List.h>

namespace prapi { namespace dsp {

	/**
	 * A class for creating wavelet scaling filters for the Daubechies
	 * wavelet.
	 **/
	class Daubechies
	{
	public:
		static double db1[];
		static double db2[];
		static double db3[];
		static double db4[];
		static double db5[];
		static double db6[];
		static double db7[];
		static double db8[];
		static double db9[];
		static double db10[];

		static double *filters[];

		/**
		 * Get the <i>index</i>th Daubechies scaling wavelet. The first
		 * filter (index 1) is a two-tap filter and equals to the Haar
		 * wavelet. Filter 2 is a four-tap filter, filter 3 a six-tap
		 * filter and so on.
		 *
		 * @param index filter index, must be in the range [1,10]
		 * @return the filter coefficients
		 **/
		static util::List<double> getFilter(int index)
		{
			return util::List<double>(filters[index-1],index<<1);
		}
	};
}}
	

#endif
