pike.git / lib / modules / ADT.pmod / Relation.pmod / Binary.pike

version» Context lines:

pike.git/lib/modules/ADT.pmod/Relation.pmod/Binary.pike:102:    {    int i = 0;    need_recount = 0;    foreach(indices(val), mixed left)    i += sizeof(val[left]);    items = i;    }    return items;   }    - //! The expression `rel1 <= rel2' returns true if every relation entry - //! in rel1 is also present in rel2. - mixed `<=(object rel) - { -  foreach(indices(val), mixed left) -  foreach(indices(val[left]), mixed right) -  if (!rel(left, right)) -  return 0; -  return 1; - } -  +    int(0..1) `==(mixed rel)   {    if (!objectp(rel) || !rel->is_binary_relation)    return 0; // different because of having different types       return this <= rel && rel <= this;   }      int(0..1) `>=(object rel)   {
pike.git/lib/modules/ADT.pmod/Relation.pmod/Binary.pike:313:    if(sizeof(lefts)) {    rights = indices(val[lefts[0]]);    finished = 0;    }    else    finished = 1;    return !finished;    }   }    - mixed cast(string to) { -  switch(to) { -  case "mapping": + mixed cast(string to) + { +  if( to=="mapping" )    return copy_value(val); -  default: -  error("Can not cast ADT.Relation.Binary to %O.\n", to); +  return UNDEFINED;   } - } +