josiann.parallel.ParallelArgument

class josiann.parallel.ParallelArgument(positions, nb_evaluations, args=_Nothing.NOTHING)[source]

Object passed to parallel cost functions which holds instructions on what should be computed.

Parameters:
  • positions (ndarray[Any, dtype[Union[float64, int64]]]) – matrix of position vectors at current iteration

  • nb_evaluations (ndarray[Any, dtype[int64]]) – array indicating the number of evaluations to compute per position vector

  • args (tuple[ndarray[Any, dtype[Any]], ...] (default: NOTHING)) – parallel arguments

Method generated by attrs for class ParallelArgument.

Attributes

ParallelArgument.positions

matrix of position vectors at current iteration

ParallelArgument.nb_evaluations

array indicating the number of evaluations to compute per position vector

ParallelArgument.args

parallel arguments

ParallelArgument.result

Array of costs of length equal to the total number of function evaluations required at current iteration.

ParallelArgument.where_evaluations

Convenience attribute for getting formatted tuples of (position vector, parallel arguments ...) repeated as many times as required by nb_evaluations.

Methods

ParallelArgument.__init__

Method generated by attrs for class ParallelArgument.

ParallelArgument.result_iter

rtype:

Generator[ndarray[Any, dtype[float64]], None, None]

Attributes

ParallelArgument.positions: ndarray[Any, dtype[Union[float64, int64]]]

matrix of position vectors at current iteration

ParallelArgument.nb_evaluations: ndarray[Any, dtype[int64]]

array indicating the number of evaluations to compute per position vector

ParallelArgument.args: tuple[ndarray[Any, dtype[Any]], ...]

parallel arguments

ParallelArgument.result

Array of costs of length equal to the total number of function evaluations required at current iteration.

ParallelArgument.where_evaluations

Convenience attribute for getting formatted tuples of (position vector, parallel arguments …) repeated as many times as required by nb_evaluations.

Methods

ParallelArgument.__init__(positions, nb_evaluations, args=_Nothing.NOTHING)

Method generated by attrs for class ParallelArgument.

Parameters:
Return type:

None

ParallelArgument.result_iter()[source]
Return type:

Generator[ndarray[Any, dtype[float64]], None, None]