From 3a07e886900f2ca1674a6a1d6b78690744001d15 Mon Sep 17 00:00:00 2001 From: Elian Dib <elian.di@laposte.net> Date: Tue, 23 Jan 2018 17:52:35 +0100 Subject: [PATCH] Renamed functions accordingly --- completeGlobal.m | 2 +- completeLF.m | 2 +- completeLocal.m | 2 +- completeSR.m | 2 +- factorize.m | 2 +- factorizeGlobal.m | 3 ++- factorizeLF.m | 2 +- factorizeLocal.m | 2 +- factorizeSR.m | 2 +- multiply.m | 10 +++++----- multiplyLF.m | 16 ++++++++-------- multiplyLocal.m | 14 ++++++++++++++ multiplySR.m | 2 +- 13 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 multiplyLocal.m diff --git a/completeGlobal.m b/completeGlobal.m index e09f512..0e5a58d 100644 --- a/completeGlobal.m +++ b/completeGlobal.m @@ -1,5 +1,5 @@ function SRCompSet = completeGlobal(SRRefSet,varargin) -%COMPLETE Summary of this function goes here +%COMPLETEGLOBAL Summary of this function goes here % Detailed explanation goes here SRSize = []; maxSize = []; diff --git a/completeLF.m b/completeLF.m index f60eee2..37dca6c 100644 --- a/completeLF.m +++ b/completeLF.m @@ -1,5 +1,5 @@ function [LFComp,LFMaskComp] = completeLF(LFRef,varargin) -%COMPLETE Summary of this function goes here +%COMPLETELF Summary of this function goes here % Detailed explanation goes here validMethods = {'none','trace','rank'}; diff --git a/completeLocal.m b/completeLocal.m index 54ecdb1..cb48645 100644 --- a/completeLocal.m +++ b/completeLocal.m @@ -1,5 +1,5 @@ function SRCompSet = completeLocal(SRRefSet,varargin) -%COMPLETE Summary of this function goes here +%COMPLETELOCAL Summary of this function goes here % Detailed explanation goes here SRCompSet = struct(SRRefSet); diff --git a/completeSR.m b/completeSR.m index 5d5b443..060f526 100644 --- a/completeSR.m +++ b/completeSR.m @@ -1,5 +1,5 @@ function [SRComp,SRMaskComp] = completeSR(SRRef,varargin) -%COMPLETE Summary of this function goes here +%COMPLETESR Summary of this function goes here % Detailed explanation goes here [SRComp,SRMaskComp] = cellfun(@(SRRef)(SR.completeLF(SRRef,varargin{:})),SRRef,... diff --git a/factorize.m b/factorize.m index b0adcc8..bded811 100644 --- a/factorize.m +++ b/factorize.m @@ -1,5 +1,5 @@ function [SRBSet,SRC,SRU,SRS,SRV] = factorize(SRRefSet) -%SRTOBC Summary of this function goes here +%FACTORIZE Summary of this function goes here % Detailed explanation goes here SRBSet = struct(SRRefSet); diff --git a/factorizeGlobal.m b/factorizeGlobal.m index dcd46db..f24af9e 100644 --- a/factorizeGlobal.m +++ b/factorizeGlobal.m @@ -1,5 +1,5 @@ function [SRBSet,LFC,LFU,LFS,LFV] = factorizeGlobal(SRRefSet) -%SRTOBC Summary of this function goes here +%FACTORIZEGLOBAL Summary of this function goes here % Detailed explanation goes here SRSize = []; maxSize = []; @@ -11,6 +11,7 @@ LFRef = SRtoLF(SRRef); [LFB,LFC,LFU,LFS,LFV] = SR.factorizeLF(LFRef); SRB = LFtoSR(LFB); + for lab=1:numel(SRRef) SRBSet(lab).Value = SRB{lab}; end diff --git a/factorizeLF.m b/factorizeLF.m index 32f2a79..1dd184c 100644 --- a/factorizeLF.m +++ b/factorizeLF.m @@ -1,5 +1,5 @@ function [B,C,U,S,V] = factorizeLF(LF) -%LFTOBC Summary of this function goes here +%FACTORIZELF Summary of this function goes here % Detailed explanation goes here Mask = isnan(LF); LF(Mask) = 0; diff --git a/factorizeLocal.m b/factorizeLocal.m index 54fb31d..1604c05 100644 --- a/factorizeLocal.m +++ b/factorizeLocal.m @@ -1,5 +1,5 @@ function [SRBSet,SRC,SRU,SRS,SRV] = factorizeLocal(SRRefSet) -%SRTOBC Summary of this function goes here +%FACTORIZELOCAL Summary of this function goes here % Detailed explanation goes here SRBSet = struct(SRRefSet); diff --git a/factorizeSR.m b/factorizeSR.m index 8b92c5a..3105ebc 100644 --- a/factorizeSR.m +++ b/factorizeSR.m @@ -1,5 +1,5 @@ function [SRB,SRC,SRU,SRS,SRV] = factorizeSR(SRRef) -%SRTOBC Summary of this function goes here +%FACTORIZESR Summary of this function goes here % Detailed explanation goes here [SRB,SRC,SRU,SRS,SRV] = cellfun(@SR.factorizeLF,SRRef,'UniformOutput',false); diff --git a/multiply.m b/multiply.m index a0eb6f9..b8971a1 100644 --- a/multiply.m +++ b/multiply.m @@ -1,13 +1,13 @@ -function SRSet = multiply(BSet,SRC,varargin) -%BCTOLF Summary of this function goes here +function SRSet = multiply(SRBSet,SRC,varargin) +%MULTIPLY Summary of this function goes here % Detailed explanation goes here -SRSet = struct(BSet); -SRB = {BSet.Value}; +SRSet = struct(SRBSet); +SRB = {SRBSet.Value}; SRRef = SR.multiplySR(SRB,SRC,varargin{:}); -for lab=1:numel(BSet) +for lab=1:numel(SRBSet) SRSet(lab).Value = SRRef{lab}; end diff --git a/multiplyLF.m b/multiplyLF.m index 6c8fad0..a9abaf4 100644 --- a/multiplyLF.m +++ b/multiplyLF.m @@ -1,19 +1,19 @@ -function LF = multiplyLF(B,C,varargin) -%BCTOLF Summary of this function goes here +function LF = multiplyLF(LFB,LFC,varargin) +%MULTIPLYLF Summary of this function goes here % Detailed explanation goes here vecResh = @(x) reshape(x,size(x,1)*size(x,2),[])'; -boxResh = @(x) reshape(x',size(B)); +boxResh = @(x) reshape(x',size(LFB)); if nargin>2 k = varargin{1}; - [u,v] = ind2sub([size(B,1),size(B,2)],k); - B = B(u,v,:,:); - C = C(k,:); + [u,v] = ind2sub([size(LFB,1),size(LFB,2)],k); + LFB = LFB(u,v,:,:); + LFC = LFC(k,:); end -Bvec = vecResh(B); -LFvec = Bvec*C; +Bvec = vecResh(LFB); +LFvec = Bvec*LFC; LF = boxResh(LFvec); end diff --git a/multiplyLocal.m b/multiplyLocal.m new file mode 100644 index 0000000..4d5af39 --- /dev/null +++ b/multiplyLocal.m @@ -0,0 +1,14 @@ +function SRSet = multiplyLocal(SRBSet,SRC,varargin) +%MULTIPLYLOCAL Summary of this function goes here +% Detailed explanation goes here + +SRSet = struct(SRBSet); +SRB = {SRBSet.Value}; + +SRRef = SR.multiplySR(SRB,SRC,varargin{:}); + +for lab=1:numel(SRBSet) + SRSet(lab).Value = SRRef{lab}; +end + +end \ No newline at end of file diff --git a/multiplySR.m b/multiplySR.m index 5e2579b..cd472ec 100644 --- a/multiplySR.m +++ b/multiplySR.m @@ -1,5 +1,5 @@ function SRRef = multiplySR(SRB,SRC,varargin) -%BCTOSR Summary of this function goes here +%MULTIPLYSR Summary of this function goes here % Detailed explanation goes here if nargin>2 -- GitLab