ok. I got rid of the vars and was getting unhandled exception error.
I did some reading about C# can only inherit from a base class but can indirectly inherit thru other classes.
So I moved...
Type: Posts; User: Dale
ok. I got rid of the vars and was getting unhandled exception error.
I did some reading about C# can only inherit from a base class but can indirectly inherit thru other classes.
So I moved...
public class ColorGenetics
{
public static hk1Class jw;
public static linkedClass link;
static void Main(string[] args)
{
I see what your saying about formatting now. This was a case where my COBOL background was bleeding through :). It was drilled into me to always comment everything.
Thanks to all for all the help. I have finished the program.
This last problem was solved by haveing the ide create the method stub. I don't understand why that worked and the copy/paste did...
The program is color genetics probability dealing with 2 linked locii (genes) that only crossover at a rate of 25.7%. I have 4 permutations to choose from of which 2 only occur 25.7% of the time. ...
public static void linked_parent_setup()
{
// linked section
{ // check if valid pair
if ((jw.siredata[x, 2] == jw.sb1) && (jw.siredata[x, 3]...
Dictionary childcolor1 the key is color name and the value is how many.
Dictionary chidgeneo1 the key is geneotype and value is color name.
I need to output to screen color name, corresponding...
I'm just not seeing :(
Can you please show what in my code is wrong and the proper way to do it.
My train of thought was that since I converted to an array; I could treat it like a normal 2d...
I'm trying to parse an element of a string array to an int.
public static void child_calc()
{
I've reworked the code and now the problem is in the writeline parameters setup.
public class hk1Class
public char colorpct;
// create dictionaries
public Dictionary<string,...
// declare child arrays
public string[,] childcolor;
public string[,] childgeneo;
// create dictionaries
public Dictionary<string, int> colors = new Dictionary<string, int>();...
// create dictionaries
public Dictionary<string, int> colors = new Dictionary<string, int>();
public string color; // name for dictionary
public Dictionary<string, string> geneo =...
public static void tan_chin()
{
switch (jw.offspring[10])
{
case 1:
tan_chin_normal();
break;
...
Thank you. That solved the problem.
{ // check if valid pair
{
jw.paired [0] = jw.siredata[x,2];
jw.paired [1] = jw.siredata[x,3];}
...
Thanks for the suggestions.
This is how I now have it coded.
// linked section
{
public static Random random = new Random(); public static int num = random.Next(100, 1000);
public static void linked_group()
{
if (num == 257)
{ group2(); }
...
public static void dam_data_setup()
{
// fill list
jw.damgtype.Add(jw.den1);
jw.damgtype.Add(jw.den2);
jw.damgtype.Add(jw.da1);
...
Thanks. That did the trick.
It then showed another error where I couldn't access var rows.
Seems I can not use an instance to access it. So I used JWClass.rows and it works.
Also found...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace RabbitGenetics
{