HxStatistics Class

class hexaly.optimizer.HxStatistics

Statistics of the search.

Summary

Attributes
running_time Running time in seconds.
nb_iterations Number of iterations.
Methods
get_running_time Gets the running time in seconds.
get_nb_iterations Gets the number of iterations.
Special methods
__str__ Returns a string representation of the statistics.

Instance methods

HxStatistics.get_running_time()

Gets the running time in seconds. Note that is the “real” time spent (and not only the CPU or system time). Only allowed in states HxState.PAUSED or HxState.STOPPED.

You can also use the shortcut member running_time

Returns:Running time in seconds
Return type:int
HxStatistics.get_nb_iterations()

Gets the number of iterations. Only allowed in states HxState.PAUSED or HxState.STOPPED.

You can also use the shortcut member nb_iterations

Returns:Number of iterations.
Return type:int

Instance attributes

All get/set methods have their attribute counterpart. You can use them as shortcuts to improve the readability or your models and codes.

HxStatistics.running_time

Running time in seconds. This attribute is read-only. It is a shortcut for get_running_time().

HxStatistics.nb_iterations

Number of iterations. This attribute is read-only. It is a shortcut for get_nb_iterations().

Special operators and methods

HxStatistics.__str__()

Returns a string representation of the statistics. Only allowed in states HxState.PAUSED or HxState.STOPPED. Useful for debugging or logging purposes.

Returns:String representation.
Return type:str