addLoadMethod(typeName, f)This methods registers a deserialization method so that loadMRDI knows how to reconstruct objects of a given type within a given namespace.
The namespace allows the same file format to be used across different computer algebra systems. The Macaulay2 namespace is "Macaulay2" and the OSCAR namespace is "Oscar". Each namespace maintains its own type registry. Use addNamespace to register a new namespace before adding load methods to it.
The loading function f receives two arguments:
The List form allows registering the same function for multiple type names at once, which is useful when systems use different names for equivalent types.
Here we register a load method for a custom namespace.
|
|
|
The object addLoadMethod is a method function with options.
The source of this document is in /build/reproducible-path/macaulay2-1.26.05+ds/M2/Macaulay2/packages/MRDI.m2:795:0.