One Point Crossover operation on the two vectors of bytes
This function is a C++ wrapper for crossing-over of two byte vectors of candidate solutions
OnePointCrossOver(bytes1, bytes2, cutpoint)
bytes1
: A vector of bytes of the first parentbytes2
: A vector of bytes of the second parentcutpoint
: Cut-point for the single point crossing-overList of two byte vectors of offspring
b1 <- DoubleVectorToBytes(c(56.54, 89.7666, 98.565)) b2 <- DoubleVectorToBytes(c(79.76, 56.4443, 34.22121)) result <- OnePointCrossOver(b1,b2, round(runif(1,1,SizeOfDouble() * 3))) print(ByteVectorToDoubles(result[[1]])) print(ByteVectorToDoubles(result[[2]]))
Mehmet Hakan Satman - mhsatman@istanbul.edu.tr
UniformCrossOver
UniformCrossOverOnDoublesUsingBytes
Useful links
Downloads (last 30 days):