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
Admin message
GitLab upgrade completed. Current version is 17.11.3.
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
...
@@ -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_fact
or
(
this
.
test_faust
,
i
),
get_fact
or
(
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_fact
or
(
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_fact
or
(
ref_F
,
i
),
get_fact
or
(
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_fact
or
(
this
.
test_faust
,
i
),
full
(
this
.
factors
{
i
}))
end
end
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)
...
@@ -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_fact
or
(
F_loaded
,
i
);
if
(
~
isequal
(
A
,
factors
{
i
}))
if
(
~
isequal
(
A
,
factors
{
i
}))
get_fact
(
F
,
i
)
get_fact
or
(
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_fact
or
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_fact
or
(
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_fact
or
on conj
for
i
=
1
:
nb_fact
for
i
=
1
:
nb_fact
A
=
get_fact
(
F_conj
,
i
);
A
=
get_fact
or
(
F_conj
,
i
);
if
(
~
isequal
(
A
,
conj
(
factors
{
i
})))
if
(
~
isequal
(
A
,
conj
(
factors
{
i
})))
get_fact
(
F_conj
,
i
)
get_fact
or
(
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_fact
or
on ctranspose
for
i
=
1
:
nb_fact
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
})))
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'
);
error
(
'get_fact : invalid factor'
);
end
end
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
...
@@ -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_fact
or
(F,i)) == get_fact
or
(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_fact
or
, 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_fact
or
(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_fact
or
(
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_fact
or
(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_fact
or
(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,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_fact
or
.
%==========================================================================================
%==========================================================================================
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_fact
or
.
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_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