saealib.IntegerVariable#

class saealib.IntegerVariable(lb, ub)[ソース]#

ベースクラス: Variable

Integer-valued variable on [lb, ub] (both inclusive).

Stored as float64 in population arrays; rounded by repair().

パラメータ:
  • lb (int) -- Lower and upper bounds (inclusive).

  • ub (int) -- Lower and upper bounds (inclusive).

Methods

__init__

repair

Round x to the nearest integer and clip to [lb, ub].

Method Details

IntegerVariable.__init__(lb, ub)[ソース]#
パラメータ:
  • lb (int)

  • ub (int)

戻り値の型:

None

IntegerVariable.repair(x)[ソース]#

Round x to the nearest integer and clip to [lb, ub].

パラメータ:

x (np.ndarray) -- Values for this dimension.

戻り値:

Rounded and clipped values.

戻り値の型:

np.ndarray