예제 #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))
예제 #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))
예제 #3
0
 def __xor__(self, other):
     """ Outer product (binary ^) """
     return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_out))
예제 #4
0
 def __or__(self, other):
     """ Inner product (binary |) """
     return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_inn))
예제 #5
0
 def __lshift__(self, other):
     """ Left contraction (binary <<) """
     return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_left))
예제 #6
0
파일: ga.py 프로젝트: 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))
예제 #7
0
파일: ga.py 프로젝트: institution/ga
			def __xor__(self, other):
				""" Outer product (binary ^) """
				return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_out))
예제 #8
0
파일: ga.py 프로젝트: institution/ga
			def __or__(self, other):
				""" Inner product (binary |) """
				return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_inn))
예제 #9
0
파일: ga.py 프로젝트: 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))
예제 #10
0
파일: ga.py 프로젝트: institution/ga
			def __lshift__(self, other):
				""" Left contraction (binary <<) """
				return MV(mv.mulmm(ga, self._mv, other._mv, ga._bmt_left))