Skip to content

Perhaps use ObjectifyWithAttributes instead of Objectify #2

@fingolfin

Description

@fingolfin

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
    );

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions