source: trunk/packages/optimizer/src/fitfunc/ff_modules_for_discrete_params.c @ 1049

Last change on this file since 1049 was 1010, checked in by liveletlive, 16 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.
12typedef 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*/
25double get_gene(int geneID){
26        return 0;
27}
28
29/*
30 * Return the actual values of all the genes in the current string
31 */
32double* get_all_genes(){
33        return 0;
34}
35
36/*
37 * Return the gene value raised to a power
38 */
39double gene_value_raised_to_power(int geneID){
40        return 0;
41}
42
43/*
44 * Return the absolute value of a gene.
45 */
46 
47double gene_abs_value(int geneID){
48        return 0;
49}
50 
51double weighted_sum_of_genes(){
52        return 0;
53}
54
55/*
56 * I need to verify this yet.
57 */
58double weighted_sum_of_nth_power_distances(){
59        return 0;
60}
61
62int main(){
63        return 0;
64}
Note: See TracBrowser for help on using the repository browser.