Comparisons

Ever and Always Comparisons

The probe operand may be a bare h3index H3 cell identifier or another th3index trajectory; both are supported in either operand position.

  • Return true if a temporal H3 cell is ever equal to the probe at at least one instant

    eEq({h3index,th3index},th3index) → boolean

    eEq(th3index,h3index) → boolean

    {h3index,th3index} ?= th3index

    th3index ?= h3index

    SELECT th3index
      '[831c02fffffffff@2001-01-01, 880326b885fffff@2001-01-05]'
      ?= 880326b885fffff::h3index;
    -- true
    
  • Return true if a temporal H3 cell is always equal to the probe across its entire time axis

    aEq({h3index,th3index},th3index) → boolean

    aEq(th3index,h3index) → boolean

    {h3index,th3index} %= th3index

    th3index %= h3index

    SELECT aEq(th3index '871fa44a8ffffff@2001-01-01', h3index '871fa44a8ffffff');
    -- t
    
  • Return true if a temporal H3 cell is ever different from the probe

    eNe({h3index,th3index},th3index) → boolean

    eNe(th3index,h3index) → boolean

    {h3index,th3index} ?<> th3index

    th3index ?<> h3index

    SELECT eNe(th3index '871fa44a8ffffff@2001-01-01', h3index '871fa44aeffffff');
    -- t
    
  • Return true if a temporal H3 cell is always different from the probe

    aNe({h3index,th3index},th3index) → boolean

    aNe(th3index,h3index) → boolean

    {h3index,th3index} %<> th3index

    th3index %<> h3index

    SELECT aNe(th3index '871fa44a8ffffff@2001-01-01', h3index '871fa44aeffffff');
    -- t
    

Temporal Comparisons

  • Return a temporal boolean giving the per-instant equality (or inequality) between a temporal H3 cell and a probe

    tEq({h3index,th3index},th3index) → tbool

    tEq(th3index,h3index) → tbool

    tNe({h3index,th3index},th3index) → tbool

    tNe(th3index,h3index) → tbool

    {h3index,th3index} #= th3index

    th3index #= h3index

    {h3index,th3index} #<> th3index

    th3index #<> h3index

    SELECT tEq(th3index '871fa44a8ffffff@2001-01-01', h3index '871fa44a8ffffff');
    -- t@2001-01-01
    SELECT tNe(th3index '871fa44a8ffffff@2001-01-01', h3index '871fa44a8ffffff');
    -- f@2001-01-01