Commit 7f1a1240 authored by Ferdinand Fischer's avatar Ferdinand Fischer
Browse files

#25 inputNormalizer is not required any more!

parent 13d39ec8
......@@ -2579,35 +2579,6 @@ classdef (InferiorClasses = {?quantity.Symbolic}) Discrete ...
q = reshape(mat2cell(value, s{:}), valueSize);
end % value2cell()
function [p, q, parameters, gridSize] = inputNormalizer(a, b)
parameters = [];
function s = innerInputNormalizer(A, B)
if isa(A, 'double')
s.name = num2str(A(:)');
s.gridName = {};
s.grid = {};
s.value = A;
s.size = size(A);
s.nargin = 0;
elseif isa(A, 'quantity.Discrete')
s.name = A(1).name;
s.value = A.on();
s.gridName = A(1).gridName;
s.grid = A(1).grid;
s.size = size(A);
s.nargin = A.nargin();
parameters = struct(A);
gridSize = A.domain.gridLength();
end
end % innerInputNormalizer()
q = innerInputNormalizer(b, a);
p = innerInputNormalizer(a, b);
end % inputNormalizer()
end %% (Static)
methods(Access = protected)
......
......@@ -802,32 +802,6 @@ classdef Symbolic < quantity.Function
P = quantity.Symbolic(zeros(valueSize), varargin{:});
end
function [p, q, parameters] = inputNormalizer(a, b)
parameters = [];
function s = innerInputNormalizer(a)
if isa(a, 'double')
s.name = num2str(a(:)');
s.value = a;
% s.variable = [];
elseif isa(a, 'sym')
s.name = char(a);
s.value = a;
% s.variable = [];
elseif isa(a, 'quantity.Symbolic')
s.name = a(1).name;
s.value = a.sym();
% s.variable = a.variable;
parameters = struct(a);
parameters = rmfield(parameters, 'gridName');
end
end
p = innerInputNormalizer(a);
q = innerInputNormalizer(b);
end % inputNormalizer()
end % methods (Static)
methods (Static, Access = protected)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment