-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
You may want to consider using ObjectifyWithAttributes instead of Objectify where suitable. It is somewhat more efficient. Perhaps it doesn't matter for you now, but if you create a lot of objects, it can add up.
For example, this could
map := Objectify( NewType( CollectionsFamily( GeneralMappingsFamily(
ElementsFamily( FamilyObj( M ) ),
ElementsFamily( FamilyObj( N ) ) ) ),
IsPathAlgebraMatModuleHomomorphism and IsPathAlgebraMatModuleHomomorphismRep ), rec( maps := linmaps ));
SetPathAlgebraOfMatModuleMap(map, A);
SetSource(map, M);
SetRange(map, N);
SetIsWholeFamily(map, true);
could be rewritten like this:
type := NewType( CollectionsFamily( GeneralMappingsFamily(
ElementsFamily( FamilyObj( M ) ),
ElementsFamily( FamilyObj( N ) ) ) ),
IsPathAlgebraMatModuleHomomorphism and IsPathAlgebraMatModuleHomomorphismRep and IsWholeFamily );
map := rec( maps := linmaps );
ObjectifyWithAttributes(
map, type,
PathAlgebraOfMatModuleMap, A,
Source, M,
Range, N
);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels