Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9222107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:44:10+00:00 2026-06-18T03:44:10+00:00

In a few words, how do I: go from double to bits, then do

  • 0

In a few words, how do I:

  • go from double to bits,
  • then do the crossover (one point, two point),
  • and go back to double

I can develop the roulette wheel selection. What I don’t see clearly is how mixing two doubles might give me a “better” double. Is that completely random? If the “fittest” of my doubles and my “weakest” one combine, won’t they produce a mid-point double?

Elaboration: Shortest distance from a point to this curve

EDIT 1: Without slowing down the program too much.

EDIT 2: I considered using a byte[], but I don’t know if that would go against the genetic algorithm part.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:44:13+00:00Added an answer on June 18, 2026 at 3:44 am

    This worked for me:

    BitArray BAA1 = new BitArray(BitConverter.GetBytes(a1));
    BitArray BAA2 = new BitArray(BitConverter.GetBytes(a2));
    
        for (int i = r.Next(0, 64); i > 0; i--)
                {
                    temp = BAA1.Get(i);
                    temp2 = BAA2.Get(i);
    
                    BAA1.Set(i, temp2);
                    BAA2.Set(i, temp);
    
    
                    temp = BAB1.Get(i);
                    temp2 = BAB2.Get(i);
    
                    BAB1.Set(i, temp2);
                    BAB2.Set(i, temp);
                }
    
            byte[] tempbytes = new byte[BAA1.Length];
    
            BAA1.CopyTo(tempbytes, 0);
            double baa1 = BitConverter.ToDouble(tempbytes, 0);
    
            BAA2.CopyTo(tempbytes, 0);
            double baa2 = BitConverter.ToDouble(tempbytes, 0);
    

    baa1 and baa2 are the end products of the cross.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to copy a specific item of text (one or a few words)
I am trying to replace few words from a huge string with preg_replace() using
In few words, is it correct way to call keydown and keyup events, that
For example: S1: some filename contains few words.txt S2: some filename contains few words
I want to pass a string that contains few words to jQuery when click
It is not a programming question, but need your views in few words. When
I have a few hundred words in arrays in a plist, somewhat like below:
Have an ASP.net web app which works fine for a few days, but then
I'm implementing IXMLSerializable in one of my classes. It contains a few numeric properties
I have to match all the alphanumeric words from a text. >>> import re

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.