BaseUnboundedArchive#
- class moocore.BaseUnboundedArchive(dim, maximise)[source]#
Interface implemented by objects returned by
UnboundedArchive().This class defines the common interface for
BaseUnboundedArchiveobjects. It is not intended to be instantiated directly. See Examples inUnboundedArchive().- __iter__()[source]#
Return z vectors and, if available, their associated x object one at a time.
For efficiency, iterating does not make copies of the vectors nor the objects. However, the vectors are marked as read-only, thus modifying them requires that the user makes a copy.
Modifying the archive while iterating raises a
RuntimeError.
- __len__()[source]#
Return the total number of points stored in the archive (including duplicates).
- Return type:
- add(z, x=None)[source]#
Add a point if it is not (weakly-)dominated by the archive.
Points dominated by the added point are discarded. With
allow_duplicates=True, weakly-dominated points are accepted. Otherwise, they are rejected.- Returns:
bool–Trueif added orFalseif rejected.
- add_many(z, x=None)[source]#
Add several points sequentially and return acceptance as a boolean list.
- property dim#
Return the dimension of the points (objective vectors) stored in the archive.
- get_unique_vectors()[source]#
Return the unique objective vectors stored in the archive.
- Return type: