class_docstr: An NDS class, inherited from Optimizer.
  
  This is the designed class to define NDS-related
  variables and methods.
  
  References:
      P. Godfrey, R. Shipley and J. Gryz.
      Algorithms and Analyses for Maximal Vector Computation.
      The VLDB Journal (2007).
docstr: Calculates whether `i` dominates `j`.
  
  Args:
      agent_i: Agent `i`.
      agent_j: Agent `j`.
  
  Returns:
      (bool): Boolean indicating whether `i` dominated `j` or not.
docstr_tok: ["Calculates","whether","`","i","`","dominates","`","j","`",".","Args",":","agent_i",":","Agent","`","i","`",".","agent_j",":","Agent","`","j","`",".","Returns",":","(","bool",")",":","Boolean","indicating","whether","`","i","`","dominated","`","j","`","or","not","."]
code: def _compare_domination(self, agent_i: Agent, agent_j: Agent) -> bool:
      """Calculates whether `i` dominates `j`.
  
      Args:
          agent_i: Agent `i`.
          agent_j: Agent `j`.
  
      Returns:
          (bool): Boolean indicating whether `i` dominated `j` or not.
  
      """
  
      gt, gte = 0, 0
  
      n_objectives = agent_i.position.shape[0]
      for k in range(n_objectives):
          if agent_i.position[k] >= agent_j.position[k]:
              gte += 1
  
              if agent_i.position[k] > agent_j.position[k]:
                  gt += 1
  
      return gte == n_objectives and gt > 0
  
imports: import copy
  from typing import Any, Dict, Optional
  import numpy
  import opytimizer.utils.exception
  from opytimizer.core import Optimizer
  from opytimizer.core.agent import Agent
  from opytimizer.core.space import Space
  from opytimizer.utils import logging
label_desc: Use image node_id 11 for calling the NDS obj's underlying member method code with example usage: obj._compare_domination(agent_i, agent_j) and returns: unknown