# macop.solutions.BinarySolution — macop v1.0.1 documentation

# macop.solutions.BinarySolution

Binary solution class implementation

Classes

`BinarySolution`(data, size) | Binary integer solution class

class `macop.solutions.BinarySolution.``BinarySolution`(data, size)

  Binary integer solution class

  `data`

    {ndarray} – array of binary values

  `size`

    {int} – size of binary array values

  `score`

    {float} – fitness score value

  `random`(validator)

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

    Parameters

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

    Returns

      {BinarySolution} – new generated binary solution