macop.solutions.IntegerSolution

Integer solution class implementation

Classes

IntegerSolution(data, size)

Integer solution class

class macop.solutions.IntegerSolution.IntegerSolution(data, size)[source]

Integer solution class

data

{ndarray} – array of binary values

size

{int} – size of binary array values

score

{float} – fitness score value

random(validator)[source]

Intialize integer array with use of validator to generate valid random solution

Parameters

validator – {function} – specific function which validates or not a solution

Returns

{IntegerSolution} – new generated integer solution