Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
faust group
faust
Commits
743fe5d7
Commit
743fe5d7
authored
6 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
misc/test/src/Matlab/FaustTest.m
+4
-4
4 additions, 4 deletions
misc/test/src/Matlab/FaustTest.m
misc/test/src/Matlab/test_matlab_faust.m
+10
-10
10 additions, 10 deletions
misc/test/src/Matlab/test_matlab_faust.m
wrapper/matlab/Faust.m
+10
-10
10 additions, 10 deletions
wrapper/matlab/Faust.m
with
24 additions
and
24 deletions
misc/test/src/Matlab/FaustTest.m
+
4
−
4
View file @
743fe5d7
...
...
@@ -64,7 +64,7 @@ classdef FaustTest < matlab.unittest.TestCase
save
(
this
.
test_faust
,
filepath
)
F
=
Faust
(
filepath
)
for
i
=
1
:
get_num_factors
(
F
)
this
.
verifyEqual
(
get_fact
(
this
.
test_faust
,
i
),
get_fact
(
F
,
i
))
this
.
verifyEqual
(
get_fact
or
(
this
.
test_faust
,
i
),
get_fact
or
(
F
,
i
))
end
delete
(
filepath
)
end
...
...
@@ -78,7 +78,7 @@ classdef FaustTest < matlab.unittest.TestCase
faust_factors
=
cell
(
1
,
nb_fact
);
for
i
=
1
:
nb_fact
faust_factors
{
i
}
=
get_fact
(
this
.
test_faust
,
i
);
faust_factors
{
i
}
=
get_fact
or
(
this
.
test_faust
,
i
);
end
save
(
filepath_ref
,
'faust_factors'
);
save
(
this
.
test_faust
,
filepath_test
)
...
...
@@ -86,7 +86,7 @@ classdef FaustTest < matlab.unittest.TestCase
test_F
=
Faust
(
filepath_test
)
this
.
verifyEqual
(
get_num_factors
(
ref_F
),
get_num_factors
(
test_F
))
for
i
=
1
:
get_num_factors
(
ref_F
)
this
.
verifyEqual
(
get_fact
(
ref_F
,
i
),
get_fact
(
test_F
,
i
))
this
.
verifyEqual
(
get_fact
or
(
ref_F
,
i
),
get_fact
or
(
test_F
,
i
))
end
delete
(
filepath_ref
)
...
...
@@ -106,7 +106,7 @@ classdef FaustTest < matlab.unittest.TestCase
function
testGetFactorAndConstructor
(
this
)
disp
(
'testGetFactorAndConstructor()'
)
for
i
=
1
:
this
.
num_factors
this
.
verifyEqual
(
get_fact
(
this
.
test_faust
,
i
),
full
(
this
.
factors
{
i
}))
this
.
verifyEqual
(
get_fact
or
(
this
.
test_faust
,
i
),
full
(
this
.
factors
{
i
}))
end
end
...
...
This diff is collapsed.
Click to expand it.
misc/test/src/Matlab/test_matlab_faust.m
+
10
−
10
View file @
743fe5d7
...
...
@@ -575,9 +575,9 @@ if (nb_fact_load ~= nb_fact)
end
for
i
=
1
:
nb_fact
A
=
get_fact
(
F_loaded
,
i
);
A
=
get_fact
or
(
F_loaded
,
i
);
if
(
~
isequal
(
A
,
factors
{
i
}))
get_fact
(
F
,
i
)
get_fact
or
(
F
,
i
)
error
(
'get_fact : invalid factor'
);
end
...
...
@@ -613,10 +613,10 @@ end
disp
(
'Ok'
);
%% get_fact test
%% get_fact
or
test
disp
(
'TEST GET_FACT : '
);
for
i
=
1
:
nb_fact
A
=
get_fact
(
F
,
i
);
A
=
get_fact
or
(
F
,
i
);
if
(
A
~=
factors
{
i
})
error
(
'get_fact : invalid factor'
);
end
...
...
@@ -720,11 +720,11 @@ if ( ~isequal(expected_F_conj_full,F_conj_full) )
F_conj_full
error
([
'conj test 1 failed.'
]);
end
% test get_fact on conj
% test get_fact
or
on conj
for
i
=
1
:
nb_fact
A
=
get_fact
(
F_conj
,
i
);
A
=
get_fact
or
(
F_conj
,
i
);
if
(
~
isequal
(
A
,
conj
(
factors
{
i
})))
get_fact
(
F_conj
,
i
)
get_fact
or
(
F_conj
,
i
)
error
(
'get_fact : invalid factor'
);
end
end
...
...
@@ -760,11 +760,11 @@ if ( ~isequal(expected_F_ctranspose_full,F_ctranspose_full) )
F_ctranspose_full
error
([
'ctranspose test 1 failed.'
]);
end
% test get_fact on ctranspose
% test get_fact
or
on ctranspose
for
i
=
1
:
nb_fact
A
=
get_fact
(
F_ctranspose
,
i
)
A
=
get_fact
or
(
F_ctranspose
,
i
)
if
(
~
isequal
(
A
,
ctranspose
(
factors
{
nb_fact
-
i
+
1
})))
get_fact
(
F_ctranspose
,
i
)
get_fact
or
(
F_ctranspose
,
i
)
error
(
'get_fact : invalid factor'
);
end
end
...
...
This diff is collapsed.
Click to expand it.
wrapper/matlab/Faust.m
+
10
−
10
View file @
743fe5d7
...
...
@@ -416,7 +416,7 @@ classdef Faust
%> <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):
%> @code
%> conj(get_fact(F,i)) == get_fact(F_conj,i)
%> conj(get_fact
or
(F,i)) == get_fact
or
(F_conj,i)
%> @endcode
%>
%> @b Example
...
...
@@ -425,7 +425,7 @@ classdef Faust
%> F_conj = conj(F)
%> @endcode
%>
%> <p/>@b See @b also Faust.get_fact, Faust.get_num_factors, Faust.ctranspose
%> <p/>@b See @b also Faust.get_fact
or
, Faust.get_num_factors, Faust.ctranspose
%>
%======================================================================
function
F_conj
=
conj
(
F
)
...
...
@@ -594,18 +594,18 @@ classdef Faust
%> @b Example
%> @code
%> F = Faust.rand(Faust.MIXTE, Faust.COMPLEX, 2, 5, 50, 100, .5)
%> f1 = get_fact(F,1)
%> f1 = get_fact
or
(F,1)
%> @endcode
%> <p>@b See @b also Faust.get_num_factors
%=====================================================================
function
factor
=
get_fact
(
F
,
i
)
function
factor
=
get_fact
or
(
F
,
i
)
%% 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_fact
or
(F,i) return the i factor A of the Faust F as a full storage matrix.
%
% Example of use :
% A=get_fact(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_fact
or
(F,1) returns the 1st factor of the Faust F.
% A=get_fact
or
(F,4) returns the 4th factor of the Faust F.
%
% See also get_num_factors.
...
...
@@ -639,7 +639,7 @@ classdef Faust
%> nf = get_num_factors(F)
%> @endcode
%>
%> <p>@b See @b also Faust.get_fact.
%> <p>@b See @b also Faust.get_fact
or
.
%==========================================================================================
function
num_factors
=
get_num_factors
(
F
)
%% GET_NB_FACTOR Number of factor of the Faust.
...
...
@@ -647,7 +647,7 @@ classdef Faust
% num_factors = get_num_factors(F) return the number of factor of the
% Faust F.
%
% See also get_fact.
% See also get_fact
or
.
if
(
F
.
isReal
)
num_factors
=
mexFaustReal
(
'get_nb_factor'
,
F
.
matrix
.
objectHandle
);
else
...
...
@@ -843,7 +843,7 @@ classdef Faust
%>
%> @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_fact
or
%>
%>
%======================================================================
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment