-
-
Notifications
You must be signed in to change notification settings - Fork 703
Description
Currently, elements of a FiniteRankFreeModule and its tensor modules are mutable and therefore cannot be hashed.
In analogy to sage.modules.FreeModuleElement and sage.matrix.Matrix, a method set_immutable() should be added.
In this ticket, we do this by creating a subclass ModuleElementWithMutability of ModuleElement. The existing classes Vector (and thus FreeModuleElement from sage.modules) and FreeModuleTensor (from sage.tensor) are changed to subclass it.
The methods from FreeModuleElement implementing mutability are moved to ModuleElementWithMutability and become available for FreeModuleTensor in this way. (The class Vector also gets them for free.)
CC: @egourgoulhon @tscrim @mjungmath
Component: linear algebra
Author: Matthias Koeppe
Branch/Commit: a2ee8be
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/30181