OnePointCrossOverOnDoublesUsingBytes | R Documentation |

This function is a C++ wrapper for crossing-over of two double vectors of candidate solutions using their byte representations

```
OnePointCrossOverOnDoublesUsingBytes(d1, d2, cutpoint)
```

`d1` |
A vector of doubles of the first parent |

`d2` |
A vector of doubles of the second parent |

`cutpoint` |
An integer between 1 and chromosome length for crossover cutting |

List of two double vectors of offspring

Mehmet Hakan Satman - mhsatman@istanbul.edu.tr

OnePointCrossOver

UniformCrossOverOnDoublesUsingBytes

```
d1 <- runif(3)
d2 <- runif(3)
cutp <- sample(1:(length(d1)*SizeOfDouble()), 1)[1]
offspring <- OnePointCrossOverOnDoublesUsingBytes(d1,d2, cutp)
print("Parents:")
print(d1)
print(d2)
print("Offspring:")
print(offspring[[1]])
print(offspring[[2]])
```

mcga documentation built on Nov. 27, 2023, 5:12 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.