Ejemplo n.º 1
0
 def __div__(self, other):
     """ Division (binary /) """
     if isinstance(other, (float, int)):
         return MV(mv.divmf(ga, self._mv, other))
     else:
         return MV(
             mv.mulmm(ga, self._mv,
                      other.inv()._mv, ga._bmt_geo))
Ejemplo n.º 2
0
 def __mul__(self, other):
     """ Multiplication (binary *)"""
     if isinstance(other, float):
         return MV(mv.mulmf(ga, self._mv, other))
     else:
         return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_geo))
Ejemplo n.º 3
0
 def __xor__(self, other):
     """ Outer product (binary ^) """
     return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_out))
Ejemplo n.º 4
0
 def __or__(self, other):
     """ Inner product (binary |) """
     return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_inn))
Ejemplo n.º 5
0
 def __lshift__(self, other):
     """ Left contraction (binary <<) """
     return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_left))
Ejemplo n.º 6
0
Archivo: ga.py Proyecto: institution/ga
			def __mul__(self, other):
				""" Multiplication (binary *)"""
				if isinstance(other, float):
					return MV(mv.mulmf(ga, self._mv, other))
				else: 
					return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_geo))
Ejemplo n.º 7
0
Archivo: ga.py Proyecto: institution/ga
			def __xor__(self, other):
				""" Outer product (binary ^) """
				return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_out))
Ejemplo n.º 8
0
Archivo: ga.py Proyecto: institution/ga
			def __or__(self, other):
				""" Inner product (binary |) """
				return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_inn))
Ejemplo n.º 9
0
Archivo: ga.py Proyecto: institution/ga
			def __div__(self, other):
				""" Division (binary /) """
				if isinstance(other, (float, int)):
					return MV(mv.divmf(ga, self._mv, other))
				else: 
					return MV(mv.mulmm(ga, self._mv, other.inv()._mv, ga._bmt_geo))
Ejemplo n.º 10
0
Archivo: ga.py Proyecto: institution/ga
			def __lshift__(self, other):
				""" Left contraction (binary <<) """
				return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_left))