本文整理汇总了Python中sage.tensor.modules.free_module_tensor.FreeModuleTensor._del_derived方法的典型用法代码示例。如果您正苦于以下问题:Python FreeModuleTensor._del_derived方法的具体用法?Python FreeModuleTensor._del_derived怎么用?Python FreeModuleTensor._del_derived使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sage.tensor.modules.free_module_tensor.FreeModuleTensor
的用法示例。
在下文中一共展示了FreeModuleTensor._del_derived方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _del_derived
# 需要导入模块: from sage.tensor.modules.free_module_tensor import FreeModuleTensor [as 别名]
# 或者: from sage.tensor.modules.free_module_tensor.FreeModuleTensor import _del_derived [as 别名]
def _del_derived(self):
r"""
Delete the derived quantities.
EXAMPLES::
sage: M = FiniteRankFreeModule(QQ, 3, name='M')
sage: e = M.basis('e')
sage: a = M.automorphism(name='a')
sage: a[e,:] = [[1,0,-1], [0,3,0], [0,0,2]]
sage: b = a.inverse()
sage: a._inverse
Automorphism a^(-1) of the 3-dimensional vector space M over the
Rational Field
sage: a._del_derived()
sage: a._inverse # has been reset to None
"""
# First delete the derived quantities pertaining to FreeModuleTensor:
FreeModuleTensor._del_derived(self)
# Then reset the inverse automorphism to None:
if self._inverse is not None:
self._inverse._inverse = None # (it was set to self)
self._inverse = None
# and delete the matrices:
self._matrices.clear()
示例2: _del_derived
# 需要导入模块: from sage.tensor.modules.free_module_tensor import FreeModuleTensor [as 别名]
# 或者: from sage.tensor.modules.free_module_tensor.FreeModuleTensor import _del_derived [as 别名]
def _del_derived(self):
r"""
Delete the derived quantities.
EXAMPLES::
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
sage: a = M.alternating_form(2)
sage: a._del_derived()
"""
FreeModuleTensor._del_derived(self)