Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 743fe5d7 authored by hhakim's avatar hhakim
Browse files

Rename matlab wrapper Faust.get_fact() to Faust.get_factor().

parent 25149d10
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,7 @@ classdef FaustTest < matlab.unittest.TestCase ...@@ -64,7 +64,7 @@ classdef FaustTest < matlab.unittest.TestCase
save(this.test_faust, filepath) save(this.test_faust, filepath)
F = Faust(filepath) F = Faust(filepath)
for i = 1:get_num_factors(F) for i = 1:get_num_factors(F)
this.verifyEqual(get_fact(this.test_faust,i), get_fact(F,i)) this.verifyEqual(get_factor(this.test_faust,i), get_factor(F,i))
end end
delete(filepath) delete(filepath)
end end
...@@ -78,7 +78,7 @@ classdef FaustTest < matlab.unittest.TestCase ...@@ -78,7 +78,7 @@ classdef FaustTest < matlab.unittest.TestCase
faust_factors=cell(1,nb_fact); faust_factors=cell(1,nb_fact);
for i=1:nb_fact for i=1:nb_fact
faust_factors{i}=get_fact(this.test_faust,i); faust_factors{i}=get_factor(this.test_faust,i);
end end
save(filepath_ref,'faust_factors'); save(filepath_ref,'faust_factors');
save(this.test_faust,filepath_test) save(this.test_faust,filepath_test)
...@@ -86,7 +86,7 @@ classdef FaustTest < matlab.unittest.TestCase ...@@ -86,7 +86,7 @@ classdef FaustTest < matlab.unittest.TestCase
test_F = Faust(filepath_test) test_F = Faust(filepath_test)
this.verifyEqual(get_num_factors(ref_F), get_num_factors(test_F)) this.verifyEqual(get_num_factors(ref_F), get_num_factors(test_F))
for i = 1:get_num_factors(ref_F) for i = 1:get_num_factors(ref_F)
this.verifyEqual(get_fact(ref_F,i), get_fact(test_F,i)) this.verifyEqual(get_factor(ref_F,i), get_factor(test_F,i))
end end
delete(filepath_ref) delete(filepath_ref)
...@@ -106,7 +106,7 @@ classdef FaustTest < matlab.unittest.TestCase ...@@ -106,7 +106,7 @@ classdef FaustTest < matlab.unittest.TestCase
function testGetFactorAndConstructor(this) function testGetFactorAndConstructor(this)
disp('testGetFactorAndConstructor()') disp('testGetFactorAndConstructor()')
for i = 1:this.num_factors for i = 1:this.num_factors
this.verifyEqual(get_fact(this.test_faust, i), full(this.factors{i})) this.verifyEqual(get_factor(this.test_faust, i), full(this.factors{i}))
end end
end end
......
...@@ -575,9 +575,9 @@ if (nb_fact_load ~= nb_fact) ...@@ -575,9 +575,9 @@ if (nb_fact_load ~= nb_fact)
end end
for i=1:nb_fact for i=1:nb_fact
A=get_fact(F_loaded,i); A=get_factor(F_loaded,i);
if(~isequal(A,factors{i})) if(~isequal(A,factors{i}))
get_fact(F,i) get_factor(F,i)
error('get_fact : invalid factor'); error('get_fact : invalid factor');
end end
...@@ -613,10 +613,10 @@ end ...@@ -613,10 +613,10 @@ end
disp('Ok'); disp('Ok');
%% get_fact test %% get_factor test
disp('TEST GET_FACT : '); disp('TEST GET_FACT : ');
for i=1:nb_fact for i=1:nb_fact
A=get_fact(F,i); A=get_factor(F,i);
if(A~=factors{i}) if(A~=factors{i})
error('get_fact : invalid factor'); error('get_fact : invalid factor');
end end
...@@ -720,11 +720,11 @@ if ( ~isequal(expected_F_conj_full,F_conj_full) ) ...@@ -720,11 +720,11 @@ if ( ~isequal(expected_F_conj_full,F_conj_full) )
F_conj_full F_conj_full
error(['conj test 1 failed.']); error(['conj test 1 failed.']);
end end
% test get_fact on conj % test get_factor on conj
for i=1:nb_fact for i=1:nb_fact
A=get_fact(F_conj,i); A=get_factor(F_conj,i);
if(~isequal(A,conj(factors{i}))) if(~isequal(A,conj(factors{i})))
get_fact(F_conj,i) get_factor(F_conj,i)
error('get_fact : invalid factor'); error('get_fact : invalid factor');
end end
end end
...@@ -760,11 +760,11 @@ if ( ~isequal(expected_F_ctranspose_full,F_ctranspose_full) ) ...@@ -760,11 +760,11 @@ if ( ~isequal(expected_F_ctranspose_full,F_ctranspose_full) )
F_ctranspose_full F_ctranspose_full
error(['ctranspose test 1 failed.']); error(['ctranspose test 1 failed.']);
end end
% test get_fact on ctranspose % test get_factor on ctranspose
for i=1:nb_fact for i=1:nb_fact
A=get_fact(F_ctranspose,i) A=get_factor(F_ctranspose,i)
if(~isequal(A,ctranspose(factors{nb_fact-i+1}))) if(~isequal(A,ctranspose(factors{nb_fact-i+1})))
get_fact(F_ctranspose,i) get_factor(F_ctranspose,i)
error('get_fact : invalid factor'); error('get_fact : invalid factor');
end end
end end
......
...@@ -416,7 +416,7 @@ classdef Faust ...@@ -416,7 +416,7 @@ classdef Faust
%> <br/> If F is a real Faust then F_conj == F. %> <br/> If F is a real Faust then F_conj == F.
%> <br/> if F is a complex Faust, the Faust object F_conj returned verifies the next assertion for all i=1:get_num_factors(F): %> <br/> if F is a complex Faust, the Faust object F_conj returned verifies the next assertion for all i=1:get_num_factors(F):
%> @code %> @code
%> conj(get_fact(F,i)) == get_fact(F_conj,i) %> conj(get_factor(F,i)) == get_factor(F_conj,i)
%> @endcode %> @endcode
%> %>
%> @b Example %> @b Example
...@@ -425,7 +425,7 @@ classdef Faust ...@@ -425,7 +425,7 @@ classdef Faust
%> F_conj = conj(F) %> F_conj = conj(F)
%> @endcode %> @endcode
%> %>
%> <p/>@b See @b also Faust.get_fact, Faust.get_num_factors, Faust.ctranspose %> <p/>@b See @b also Faust.get_factor, Faust.get_num_factors, Faust.ctranspose
%> %>
%====================================================================== %======================================================================
function F_conj=conj(F) function F_conj=conj(F)
...@@ -594,18 +594,18 @@ classdef Faust ...@@ -594,18 +594,18 @@ classdef Faust
%> @b Example %> @b Example
%> @code %> @code
%> F = Faust.rand(Faust.MIXTE, Faust.COMPLEX, 2, 5, 50, 100, .5) %> F = Faust.rand(Faust.MIXTE, Faust.COMPLEX, 2, 5, 50, 100, .5)
%> f1 = get_fact(F,1) %> f1 = get_factor(F,1)
%> @endcode %> @endcode
%> <p>@b See @b also Faust.get_num_factors %> <p>@b See @b also Faust.get_num_factors
%===================================================================== %=====================================================================
function factor = get_fact(F,i) function factor = get_factor(F,i)
%% GET_FACT Ith factor of the Faust. %% GET_FACT Ith factor of the Faust.
% %
% A=get_fact(F,i) return the i factor A of the Faust F as a full storage matrix. % A=get_factor(F,i) return the i factor A of the Faust F as a full storage matrix.
% %
% Example of use : % Example of use :
% A=get_fact(F,1) returns the 1st factor of the Faust F. % A=get_factor(F,1) returns the 1st factor of the Faust F.
% A=get_fact(F,4) returns the 4th factor of the Faust F. % A=get_factor(F,4) returns the 4th factor of the Faust F.
% %
% See also get_num_factors. % See also get_num_factors.
...@@ -639,7 +639,7 @@ classdef Faust ...@@ -639,7 +639,7 @@ classdef Faust
%> nf = get_num_factors(F) %> nf = get_num_factors(F)
%> @endcode %> @endcode
%> %>
%> <p>@b See @b also Faust.get_fact. %> <p>@b See @b also Faust.get_factor.
%========================================================================================== %==========================================================================================
function num_factors = get_num_factors(F) function num_factors = get_num_factors(F)
%% GET_NB_FACTOR Number of factor of the Faust. %% GET_NB_FACTOR Number of factor of the Faust.
...@@ -647,7 +647,7 @@ classdef Faust ...@@ -647,7 +647,7 @@ classdef Faust
% num_factors = get_num_factors(F) return the number of factor of the % num_factors = get_num_factors(F) return the number of factor of the
% Faust F. % Faust F.
% %
% See also get_fact. % See also get_factor.
if (F.isReal) if (F.isReal)
num_factors = mexFaustReal('get_nb_factor', F.matrix.objectHandle); num_factors = mexFaustReal('get_nb_factor', F.matrix.objectHandle);
else else
...@@ -843,7 +843,7 @@ classdef Faust ...@@ -843,7 +843,7 @@ classdef Faust
%> %>
%> @endcode %> @endcode
%> %>
%> <p>@b See @b also Faust.nnz_sum, Faust.rcg, Faust.size, Faust.get_fact %> <p>@b See @b also Faust.nnz_sum, Faust.rcg, Faust.size, Faust.get_factor
%> %>
%> %>
%====================================================================== %======================================================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment