EBD_utilities: Evolutionary Behaviour Dynamics Utilities

Description Usage bin2int int2bin

Description

This is the documentation for the EBD utility functions.

Usage

1
2
3
4
5
EBD_B_premutate(mutation_rate, pop_size, total_ticks, n_bits)

bin2int(binaries, digits)

int2bin(integers, digits)

bin2int

Convert a binary string from a binary vector to an integer. Works for matrices where each column is a binary string.

Usage

bin2int( binaries )

Arguments

binaries

A numeric vector where each element corresponds to a binary digit, or a matrix where each column corresponds to a binary digit.

Value

Returns a numeric vector of the corresponding integers

int2bin

Converts integers to their corresponding binary representation. Note that the binary string is reversed. For example 1 is 10 as opposed to 01.

Usage

int2bin( integers, digits )

Arguments

integers

A numeric vector of integers

digits

The number of digits for the binary string

Value

Returns a matrix where each column is a binary string and each row is the digit on the given string.


Don-Li/CAB documentation built on May 6, 2019, 2:52 p.m.