🧮 MATLAB THAUMATURGY DIFFICULTY: Apprentice Creational

The Prototype of Matrix Cloning

Clone existing spell matrices instead of forging new ones from the ether.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Prototype
ARCANUM SCHOOL: Conjuration // Replication
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// MATLAB PATTERN //
classdef SpellCloneable < matlab.mixin.Copyable
    properties
        ArcaneMatrix
        ResonanceFreq
    end

    methods
        function obj = SpellCloneable(matrix, freq)
            obj.ArcaneMatrix = matrix;
            obj.ResonanceFreq = freq;
        end

        function cloned = cloneSpell(obj)
            cloned = copy(obj);
            cloned.ResonanceFreq = cloned.ResonanceFreq * 1.01; % Slight mutation
        end
    end
end

Prototype

A true magus knows that computing a massive spectral decomposition twice is a waste of mana. Clone it!

Runic Tags: #prototype #cloning #matrices