Last change
on this file since 1018 was
1010,
checked in by liveletlive, 15 years ago
|
Comments and a small change made.
|
File size:
1.3 KB
|
Line | |
---|
1 | /* |
---|
2 | * This module contains functions which will help a user write his own Fitness Function in case of discrete variables |
---|
3 | * Have not written the code yet. Need to verify some things first. |
---|
4 | */ |
---|
5 | #include<stdio.h> |
---|
6 | #include<math.h> |
---|
7 | #include<stdlib.h> |
---|
8 | #include<time.h> |
---|
9 | |
---|
10 | //I think this structure needs to be included with PGAPACK code. A list of current gene values can be maintained and |
---|
11 | //before each evaluation the gene values can be updated. |
---|
12 | typedef struct Gene{ |
---|
13 | int geneID; |
---|
14 | double weight; |
---|
15 | double value; |
---|
16 | double rangemin; |
---|
17 | double rangemax; |
---|
18 | }Gene; |
---|
19 | |
---|
20 | |
---|
21 | /*Idea behind this function: Whenever a user would want to get the value of a certain i/p geneeter |
---|
22 | *during the course of a GA, he would use this function. The work of interfacing it to the GA Algo |
---|
23 | * is not yet complete. |
---|
24 | */ |
---|
25 | double get_gene(int geneID){ |
---|
26 | return 0; |
---|
27 | } |
---|
28 | |
---|
29 | /* |
---|
30 | * Return the actual values of all the genes in the current string |
---|
31 | */ |
---|
32 | double* get_all_genes(){ |
---|
33 | return 0; |
---|
34 | } |
---|
35 | |
---|
36 | /* |
---|
37 | * Return the gene value raised to a power |
---|
38 | */ |
---|
39 | double gene_value_raised_to_power(int geneID){ |
---|
40 | return 0; |
---|
41 | } |
---|
42 | |
---|
43 | /* |
---|
44 | * Return the absolute value of a gene. |
---|
45 | */ |
---|
46 | |
---|
47 | double gene_abs_value(int geneID){ |
---|
48 | return 0; |
---|
49 | } |
---|
50 | |
---|
51 | double weighted_sum_of_genes(){ |
---|
52 | return 0; |
---|
53 | } |
---|
54 | |
---|
55 | /* |
---|
56 | * I need to verify this yet. |
---|
57 | */ |
---|
58 | double weighted_sum_of_nth_power_distances(){ |
---|
59 | return 0; |
---|
60 | } |
---|
61 | |
---|
62 | int main(){ |
---|
63 | return 0; |
---|
64 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.