thank you Iain for your kind response, it is some Genetic Algorithm, it has
some structures like that one for chromosome:
typedef struct{
allele_t *allele; fitness_t *fitness;}chromosome_t; and that one for
Population:typedef struct { int nochromosome; chromosome_t *chromosome;
int chromosome_length; allele_t minimum_allele_value; allele_t
maximum_allele_value; fitness_t *minimum_fitness; fitness_t
*total_fitness; chromosome_t *fittest_chromosome; chromosome_t
*fittest_acceptable_chromosome;}population_t;and some action like this
one:/************************************************** ********************
* crossover
************************************************** ********************/
inline int crossover( chromosome_t *young_a, chromosome_t *young_b,
const chromosome_t *male, const chromosome_t *female, const int
chromosome_length);cheersValko
"Iain Simpson" <is******@kelvinconnect.com> wrote in message
news:OT**************@tk2msftngp13.phx.gbl...
"valko" <va***@nms-admin.ch> wrote in message
news:ew**************@TK2MSFTNGP12.phx.gbl...
I am new to C#, but I have very intersting ANSI C code, which I want to
see in .net action.
Does anybody knows some translator which can convert ANSI C code to C#?
C isn't an object oriented language, so what you'll end up with is a C
program with a bit of C# syntax wrapped around it.
If you just want to see the algorithm in action under .Net, you could
probably copy/paste it into a C# class, and modify it slightly.
What does this C code that you have do? If it uses lots of malloc() and
library calls from stdio, stdlib, etc.. it's probably going to be more
work to convert it than to rewrite it in C# from scratch.
--
Iain Simpson