/* 
 * Thomas Pantzer: t_deq.h, v0.4.7  8.6.99 16:32 
 * 
 * 
 * Copyright 1999 by Thomas Pantzer
 * 
 * Permission to use, copy, modify, and distribute this software for noncommercial 
 * use and without fee is hereby granted, provided that the above copyright notice 
 * appear in all copies and that both that copyright notice and this permission 
 * notice appear in supporting documentation, and that the name of the Author not be 
 * used in advertising or publicity pertaining to distribution of the software 
 * without specific, written prior permission. The Author makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is" 
 * without expressed or implied warranty. 
 * 
 * 
 * pantec@isys2.informatik.uni-leipzig.de   (Thomas Pantzer) 
 * 
 */


#ifndef T_DEQ_H
#define T_DEQ_H

#define pMaxMax		0.999 // 999


#include "graphix.h"
#include "trigonom.h"

#define ARG param[0]
#define dg_angle param[3]
#define old_angle param[4]


typedef enum { e_basic, e_line, e_circle } t_object;

class t_deq {

public:
   	void Init(int i, double a, t_deq *N);
   	void Done(void);
   
	virtual void Show(t_vertex_2i *vcenter, double size_, t_deq *BP, t_deq *BF, t_deq *SE);
	virtual double Error(t_vector &Df, double ds, double da_avg, double ds_avg);	
	virtual void Update(double factor, t_vector &Df, double ds, double da_avg, double ds_avg);
							// parameter	

	virtual double Angle_Drift(char reset);	

	double GetFactor(double eps, double avgfit, int num);
	double Fit(double err_sum);
        char Update(double NY, double avg_fit, double max);  	// probability

	int id;
	double prob,fit,err,quality;
	double param[4];
	char best;
	t_object type;

	t_deq *next;

	double angle_diff(double a2);


// für die Wirkung
	double W,rho,Tw;

};

#endif







/**/
/**/
/**/
/**/
/**/
/**/
/**/
/**/
/*****  End Of File  ****************************/
