/* 
 *  Copyright 2002 by Soos, Antal 
 *  All rights reserved. Property of Soos, Antal. 
 *  Restricted rights to use, duplicate or disclose this code are 
 *  granted through contract.   
 */ 
/***************************************************************************/ 
/*                                                                         */ 
/*     IQR_RLS . hpp		                                               */ 
/*                                                                         */ 
/*     Recoursive Least Mean Square Algorithm inplementation.              */ 
/*																	       */ 
/*                                                                         */ 
/***************************************************************************/ 
 
#ifndef _IQR_RLS_HPP_ 
#define _IQR_RLS_HPP_ 
 
#include "sysIdent.hpp" 

class IQR_RLS_alg : public sysid { 
	protected:
 
	float Mtemp_v[1+2]; 
	Matrix Mtemp; // Temporary result holder matrix 

    float R_v[(ARMAX_dim* ARMAX_dim)+2];
	float  *R;		// Matrix pointer: 
    float u_v[((ARMAX_dim+1)* (ARMAX_dim+1))+2];
	float  *u;		// Matrix pointer: 

	float b_v[ARMAX_dim+2]; 
	float *b;		// Vector pointer; 
    float a_v[ARMAX_dim+2];
	float *a;		// Vector pointer 
    float s_v[ARMAX_dim+2];
	float *s;		// Vector pointer 
    float c_v[ARMAX_dim+2];
	float *c;		// Vector pointer
	
 
	float lambdaisqrt; 
 
public: 
 
	void update(float y_n, float u_n_1); 
	IQR_RLS_alg(float fa) ; 
	~IQR_RLS_alg(); 
}; 
 
 
#endif // _IQR_RLS_HPP_
