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.4.
Show more breadcrumbs
faust group
faust
Commits
1eebc177
Commit
1eebc177
authored
6 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add GivensFGFT's getters.
parent
2922fbe3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/algorithm/factorization/faust_GivensFGFT.h
+36
-2
36 additions, 2 deletions
src/algorithm/factorization/faust_GivensFGFT.h
src/algorithm/factorization/faust_GivensFGFT.hpp
+64
-10
64 additions, 10 deletions
src/algorithm/factorization/faust_GivensFGFT.hpp
with
100 additions
and
12 deletions
src/algorithm/factorization/faust_GivensFGFT.h
+
36
−
2
View file @
1eebc177
...
...
@@ -18,6 +18,7 @@ namespace Faust {
vector
<
FPP2
>
errs
;
vector
<
pair
<
faust_unsigned_int
,
faust_unsigned_int
>>
coord_choices
;
Faust
::
MatDense
<
FPP
,
DEVICE
>
Lap
;
Faust
::
MatDense
<
FPP
,
DEVICE
>
L
;
faust_unsigned_int
p
,
q
;
...
...
@@ -44,7 +45,7 @@ namespace Faust {
void
update_fact
();
/**
* \brief A
L
go. step 2.4
* \brief A
l
go. step 2.4
*/
void
update_L
();
...
...
@@ -56,8 +57,41 @@ namespace Faust {
/**
* \brief Algo. step 2.6.
*/
void
calc
_err
();
void
update
_err
();
/**
*
*/
const
vector
<
FPP2
>&
get_errs
()
const
;
/**
*
*/
FPP2
get_err
(
faust_unsigned_int
j
)
const
;
/**
*
*/
const
MatDense
<
FPP
,
DEVICE
>&
get_D
()
const
;
/**
*
*/
const
MatDense
<
FPP
,
DEVICE
>&
get_L
()
const
;
/**
*
*/
const
vector
<
pair
<
faust_unsigned_int
,
faust_unsigned_int
>>&
get_coord_choices
()
const
;
/**
*
*/
void
get_coord_choice
(
faust_unsigned_int
j
,
faust_unsigned_int
&
p
,
faust_unsigned_int
&
q
)
const
;
const
MatDense
<
FPP
,
DEVICE
>&
get_Lap
()
const
;
const
vector
<
MatSparse
<
FPP
,
DEVICE
>>&
get_facts
()
const
;
};
}
...
...
This diff is collapsed.
Click to expand it.
src/algorithm/factorization/faust_GivensFGFT.hpp
+
64
−
10
View file @
1eebc177
...
...
@@ -90,7 +90,7 @@ void GivensFGFT<FPP,DEVICE,FPP2>::update_D()
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
void
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
calc
_err
()
void
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
update
_err
()
{
// Matlab ref. code:
// if mod(j,100)==0
...
...
@@ -112,16 +112,70 @@ void GivensFGFT<FPP,DEVICE,FPP2>::compute_facts()
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
GivensFGFT
(
Faust
::
MatDense
<
FPP
,
DEVICE
>&
Lap
,
faust_unsigned_int
J
)
:
Lap
(
Lap
),
facts
(
J
),
D
(
Lap
.
getNbRow
(),
Lap
.
getNbCol
()),
C
(
Lap
.
getNbRow
(),
Lap
.
getNbRow
()),
errs
(
J
),
coord_choices
(
J
)
{
/** Matlab ref. code:
* facts = cell(1,J);
* n=size(Lap,1);
* L=Lap;
* C = 15*ones(n);
* err=zeros(1,J);
* coord_choices = zeros(2,J);
*
*/
/** Matlab ref. code:
* facts = cell(1,J);
* n=size(Lap,1);
* L=Lap;
* C = 15*ones(n);
* err=zeros(1,J);
* coord_choices = zeros(2,J);
*
*/
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
FPP2
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_err
(
faust_unsigned_int
j
)
const
{
if
(
j
>
0
&&
j
<
errs
.
size
())
return
errs
[
j
];
else
throw
out_of_range
(
"GivensFGFT::get_err(j): j is out of range."
);
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
const
vector
<
FPP2
>&
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_errs
()
const
{
return
errs
;
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
const
MatDense
<
FPP
,
DEVICE
>&
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_D
()
const
{
return
D
;
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
const
MatDense
<
FPP
,
DEVICE
>&
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_L
()
const
{
return
L
;
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
const
vector
<
pair
<
faust_unsigned_int
,
faust_unsigned_int
>>&
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_coord_choices
()
const
{
return
coord_choices
;
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
void
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_coord_choice
(
faust_unsigned_int
j
,
faust_unsigned_int
&
p
,
faust_unsigned_int
&
q
)
const
{
if
(
j
>
0
&&
j
<
coord_choices
.
size
())
{
p
=
coord_choices
[
j
].
first
;
q
=
coord_choices
[
j
].
second
;
}
else
throw
out_of_range
(
"GivensFGFT::get_coord_choice(j,p,q): j is out of range."
);
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
const
MatDense
<
FPP
,
DEVICE
>&
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_Lap
()
const
{
return
Lap
;
}
template
<
typename
FPP
,
Device
DEVICE
,
typename
FPP2
>
const
vector
<
Faust
::
MatSparse
<
FPP
,
DEVICE
>>&
GivensFGFT
<
FPP
,
DEVICE
,
FPP2
>::
get_facts
()
const
{
return
facts
;
}
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