home *** CD-ROM | disk | FTP | other *** search
/ ftp.sunet.sepub/pictures / 2014.11.ftp.sunet.se-pictures.tar / ftp.sunet.se / pub / pictures / ACiD-artpacks / programs / unix / editors / gimp-plugins-unstable-0_99_23_tar.gz / gimp-plugins-unstable-0_99_23_tar / gimp-plugins-unstable-0.99.23 / gag / gas.h < prev    next >
C/C++ Source or Header  |  1998-02-19  |  1KB  |  52 lines

  1. #ifndef _GAS_H_
  2. #define _GAS_H_
  3.  
  4. #include "expressions.h"
  5.  
  6. extern int expression_max_depth;
  7. extern DBL gas_const_prob;
  8.  
  9. extern DBL (*gas_leaf_probability)(int depth);        /* determines if end expression now or not */
  10. extern DBL (*gas_operator_weight)(int index);        /* weight of operator */
  11. extern DBL (*random_number)();
  12.  
  13. DBL gas_leaf_prob_const(int);
  14. DBL gas_leaf_prob_desc(int);
  15.  
  16. DBL gas_operator_weight_const(int);
  17.  
  18. NODE *gas_random(int, int);
  19. NODE *gas_mate(DBL, NODE *, NODE *);
  20.  
  21. /*
  22.   functions & variables for MUTATING
  23. */
  24.  
  25. extern DBL gas_mutate_prob;
  26.  
  27. typedef NODE *(*gas_mutate_func)(NODE *, NODE *, int );
  28.  
  29. typedef struct  {
  30.   gas_mutate_func    func;
  31.   char            *desc;
  32.   DBL            weight;
  33.   char            noo;        /* how many arguments must have such node to aply this mutate function ? */
  34. } gas_mutate_methods_struct;        /* -1 .. arbitrary, 
  35.                        -2 - greater than zero (ie non constant), 
  36.                        -3 nofd != 0 
  37.                        -4 op->nofp == -1
  38.                      */
  39.  
  40. NODE *gas_mutate( NODE *, NODE *, int );
  41.  
  42. extern int Number_of_MutFunc;
  43. extern gas_mutate_methods_struct  MutFuncs[];
  44.  
  45. DBL gas_mfw_array( int, NODE *, int );
  46. DBL gas_mfw_const( int, NODE *, int );
  47.  
  48. extern DBL  (*gas_get_mf_weight)( int, NODE *, int);
  49.  
  50. #endif
  51.  
  52.