module documentation

This module contains various utility functions and classes for the MOArchiving package.

Class ArchiveSortedList A class to represent a sorted list of nodes, together with additional methods that follow the definition in the paper.
Class DLNode A class to represent a node in a doubly linked list.
Function add_to_z Add a new node to the list sorted by z
Function compute_area_simple Computes the area as described in the paper
Function hv3dplus Computes the hypervolume indicator in d=3 in linear time
Function hv4dplusR Compute the hypervolume indicator in d=4 by iteratively computing the hypervolume indicator in d=3 (using hv3d+)
Function hv4dplusU Compute the hypervolume indicator in d=4 by iteratively computing the one contribution problem in d=3.
Function init_sentinels_new Initialize the sentinel nodes for the list of nodes given the reference point and the dimensionality
Function lexicographic_less Returns True if a is lexicographically less than b, False otherwise
Function my_lexsort Sort an array of keys in lexicographic order and return the indices. Equivalent to np.lexsort
Function one_contribution_3_obj Computes the contribution of adding a new point to the archive in three dimensions
Function remove_from_z Remove a node from the list sorted by z
Function restart_base_setup_z_and_closest Undocumented
Function restart_list_y Resets the cnext pointers for the y-dimension.
Function setup_cdllist Set up a circular doubly linked list from the given data and reference point
Function setup_z_and_closest Sets up the closest[0] and closest[1] pointers for the new node
Function strictly_dominates Return True if a strictly dominates b, False otherwise
Function update_links Undocumented
Function weakly_dominates Return True if a weakly dominates b, False otherwise
def add_to_z(new):

Add a new node to the list sorted by z

def compute_area_simple(p, di, s, u, Fc):

Computes the area as described in the paper

def hv3dplus(head, Fc):

Computes the hypervolume indicator in d=3 in linear time

def hv4dplusR(head, Fc):

Compute the hypervolume indicator in d=4 by iteratively computing the hypervolume indicator in d=3 (using hv3d+)

def hv4dplusU(head, Fc):

Compute the hypervolume indicator in d=4 by iteratively computing the one contribution problem in d=3.

def init_sentinels_new(list_nodes, ref, dim):

Initialize the sentinel nodes for the list of nodes given the reference point and the dimensionality

def lexicographic_less(a, b):

Returns True if a is lexicographically less than b, False otherwise

def my_lexsort(keys):

Sort an array of keys in lexicographic order and return the indices. Equivalent to np.lexsort

def one_contribution_3_obj(head, new, Fc):

Computes the contribution of adding a new point to the archive in three dimensions

def remove_from_z(old, archive_dim):

Remove a node from the list sorted by z

def restart_base_setup_z_and_closest(head, new):

Undocumented

def restart_list_y(head):

Resets the cnext pointers for the y-dimension.

def setup_cdllist(n_obj, points, ref, infos):

Set up a circular doubly linked list from the given data and reference point

def setup_z_and_closest(head, new):

Sets up the closest[0] and closest[1] pointers for the new node

def strictly_dominates(a, b, n_obj):

Return True if a strictly dominates b, False otherwise

>>> strictly_dominates([1, 2, 3], [2, 3, 3], n_obj=3)
True
>>> strictly_dominates([1, 2, 3], [2, 2, 2], n_obj=3)
False
>>> strictly_dominates([1, 2, 3], [1, 2, 3], n_obj=3)
False
def update_links(head, new, p):

Undocumented

def weakly_dominates(a, b, n_obj):

Return True if a weakly dominates b, False otherwise

>>> weakly_dominates([1, 2, 3], [2, 3, 3], n_obj=3)
True
>>> weakly_dominates([1, 2, 3], [2, 2, 2], n_obj=3)
False
>>> weakly_dominates([1, 2, 3], [1, 2, 3], n_obj=3)
True