Invert or deinvert *relation*.
483060
def invert_relation(self, relation):
        
        if self.is_relation_inverted(relation):
            rel = self._deinversions.get(relation, relation[:-3])
        else:
            rel = self._inversions.get(relation, relation + '-of')
        if rel is None:
             raise PenmanError(
                'Cannot (de)invert {}; not allowed'.format(relation)
            )
        return rel
969067
private void readRelation(Relationship relation)
   {
      Task predecessor = m_activityMap.get(relation.getPredecessor());
      Task successor = m_activityMap.get(relation.getSuccessor());
      if (predecessor != null && successor != null)
      {
         Duration lag = relation.getLag();
         RelationType type = relation.getType();
         successor.addPredecessor(predecessor, type, lag);
      }
   }
687721
def inatoms(self, reverse=False):
        """"""
        if reverse:
            return filterfalse(self.__and__, reversed(self._atoms))
        return filterfalse(self.__and__, self._atoms)
1279686
def inverse(self):
        """"""
        inv = np.empty(self.size, np.int)
        inv[self.sorter] = self.sorted_group_rank_per_key
        return inv
859897
protected static function buildOppositeRelation($relation)
    {
        if (!$relation) {
            return null;
        }
        $opposite = static::buildRelation($relation->recipient, $relation->initiator);
        if ($relation->relationType == static::$relationSingle) {
            $opposite->relationType = static::$relationSingle;
        } elseif ($relation->relationType == static::$relationMutual) {
            $opposite->setMutualType($relation->getMutualType());
        }
        return $opposite;
    }
222854
def reverse(d):
    """"""
    r={}
    for k in d:
        r[d[k]]=k
    return r
711797
def inverse(self):
        
        result = G2Element()
        librelic.g2_neg_abi(byref(result), byref(self))
        return result
41260
def invert(d):
    
    out = {}
    for k, v in iteritems(d):
        try:
            out[v].add(k)
        except KeyError:
            out[v] = {k}
    return out
649578
def inverted(self):
        '''
        
        '''
        return Instance(input=self.output, output=self.input,
                        annotated_input=self.annotated_output,
                        annotated_output=self.annotated_input,
                        alt_inputs=self.alt_outputs,
                        alt_outputs=self.alt_inputs,
                        source=self.source)
395700
def invert(a, b):
    
    if HAVE_GMP:
        s = int(gmpy2.invert(a, b))
        # according to documentation, gmpy2.invert might return 0 on
        # non-invertible element, although it seems to actually raise an
        # exception; for consistency, we always raise the exception
        if s == 0:
            raise ZeroDivisionError('invert() no inverse exists')
        return s
    else:
        r, s, _ = extended_euclidean_algorithm(a, b)
        if r != 1:
            raise ZeroDivisionError('invert() no inverse exists')
        return s % b
839439
def convert_relational(relational):
    
    rel = relational.rel_op
    if rel in ['==', '>=', '>']:
        return relational.lhs-relational.rhs
    elif rel in ['<=', '<']:
        return relational.rhs-relational.lhs
    else:
        raise Exception("The relational operation ' + rel + ' is not "
                        "implemented!")
166792
def inverse(self):
        """"""
        result = self.__class__()
        result.forward = copy.copy(self.reverse)
        result.reverse = copy.copy(self.forward)
        return result
768310
private Set<Conversion> getRelatedConversions(Collection<Interaction> inters)
	{
		Set<Conversion> set = new HashSet<Conversion>();

		for (Interaction inter : inters)
		{
			if (inter instanceof Conversion)
			{
				set.add((Conversion) inter);
			}
			else if (inter instanceof Control)
			{
				getRelatedConversions((Control) inter, set);
			}
		}
		return set;
	}
724998
def invert
      build(precision: precision, deg: (deg + 180) % 360, suffix: SUFFIX_INVERSIONS.fetch(suffix, suffix))
    end
327543
public void reverse() {
	// overridden for performance only.
	double tmp;
	int limit=size/2;
	int j=size-1;

	double[] theElements = elements;
	for (int i=0; i<limit;) { //swap
		tmp=theElements[i];
		theElements[i++]=theElements[j];
		theElements[j--]=tmp;
	}
}
878478
def _protected_inverse(x1):
    """"""
    with np.errstate(divide='ignore', invalid='ignore'):
        return np.where(np.abs(x1) > 0.001, 1. / x1, 0.)
1275234
protected function guessInverseRelation()
    {
        $relation = Str::plural(class_basename($this->getParent()));

        return Str::camel($relation);
    }