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
fe81bd3d
Commit
fe81bd3d
authored
2 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Add matfaust.lazylinop.zeros + doc.
parent
bd71f781
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
gen_doc/CMakeLists.txt
+1
-1
1 addition, 1 deletion
gen_doc/CMakeLists.txt
wrapper/matlab/+matfaust/+lazylinop/zeros.m
+58
-0
58 additions, 0 deletions
wrapper/matlab/+matfaust/+lazylinop/zeros.m
with
59 additions
and
1 deletion
gen_doc/CMakeLists.txt
+
1
−
1
View file @
fe81bd3d
...
...
@@ -31,7 +31,7 @@ if(BUILD_DOCUMENTATION)
string
(
CONCAT DOXYGEN_FILE_PATTERNS
"*.cpp *.hpp *.h *.cu *.hu"
)
endif
()
if
(
BUILD_WRAPPER_MATLAB
)
string
(
CONCAT DOXYGEN_FILE_PATTERNS
${
DOXYGEN_FILE_PATTERNS
}
" Faust.m FaustMulMode.m StoppingCriterion.m ConstraintGeneric.m ConstraintMat.m ConstraintReal.m ConstraintInt.m ConstraintName.m ParamsFact.m ParamsHierarchical.m ParamsPalm4MSA.m FaustFactory.m hadamard.m quickstart.m fft.m bsl.m runtimecmp.m runall.m version.m faust_fact.m ParamsHierarchicalSquareMat.m ParamsHierarchicalRectMat.m license.m omp.m wht.m dft.m eye.m rand.m rand_bsr.m eigtj.m hierarchical.m fact.m palm4msa.m fgft_givens.m fgft_palm.m svdtj.m splin.m spcol.m proj_gen.m sp.m const.m supp.m hankel.m toeplitz.m circ.m normcol.m normlin.m splincol.m blockdiag.m skperm.m enable_gpu_mod.m is_gpu_mod_enabled.m isFaust.m poly.m basis.m next.m expm_multiply.m FaustPoly.m MHTPParams.m palm4msa_mhtp.m hierarchical_mhtp.m butterfly.m ParamsHierarchicalDFT.m create_bsr.m ParamsPalm4msaWHT.m proj_id.m ParamsHierarchicalNoResCons.m ParamsHierarchicalWHTNoResCons.m ParamsHierarchicalRectMatNoResCons.m circ.m anticirc.m toeplitz.m dct.m dst.m rand_butterfly.m opt_butterfly_faust.m bitrev_perm.m LazyLinearOp.m asLazyLinearOp.m isLazyLinearOp.m LazyLinearOpKron.m kron.m aslazylinearoperator.m LazyLinearOperator.m diag.m blkdiag.m sum.m "
)
# warning: the space on the end matters
string
(
CONCAT DOXYGEN_FILE_PATTERNS
${
DOXYGEN_FILE_PATTERNS
}
" Faust.m FaustMulMode.m StoppingCriterion.m ConstraintGeneric.m ConstraintMat.m ConstraintReal.m ConstraintInt.m ConstraintName.m ParamsFact.m ParamsHierarchical.m ParamsPalm4MSA.m FaustFactory.m hadamard.m quickstart.m fft.m bsl.m runtimecmp.m runall.m version.m faust_fact.m ParamsHierarchicalSquareMat.m ParamsHierarchicalRectMat.m license.m omp.m wht.m dft.m eye.m rand.m rand_bsr.m eigtj.m hierarchical.m fact.m palm4msa.m fgft_givens.m fgft_palm.m svdtj.m splin.m spcol.m proj_gen.m sp.m const.m supp.m hankel.m toeplitz.m circ.m normcol.m normlin.m splincol.m blockdiag.m skperm.m enable_gpu_mod.m is_gpu_mod_enabled.m isFaust.m poly.m basis.m next.m expm_multiply.m FaustPoly.m MHTPParams.m palm4msa_mhtp.m hierarchical_mhtp.m butterfly.m ParamsHierarchicalDFT.m create_bsr.m ParamsPalm4msaWHT.m proj_id.m ParamsHierarchicalNoResCons.m ParamsHierarchicalWHTNoResCons.m ParamsHierarchicalRectMatNoResCons.m circ.m anticirc.m toeplitz.m dct.m dst.m rand_butterfly.m opt_butterfly_faust.m bitrev_perm.m LazyLinearOp.m asLazyLinearOp.m isLazyLinearOp.m LazyLinearOpKron.m kron.m aslazylinearoperator.m LazyLinearOperator.m diag.m blkdiag.m sum.m
zeros.m
"
)
# warning: the space on the end matters
endif
()
if
(
BUILD_WRAPPER_PYTHON
)
string
(
CONCAT DOXYGEN_FILE_PATTERNS
${
DOXYGEN_FILE_PATTERNS
}
"__init__.py factparams.py demo.py tools.py fact.py proj.py poly.py lazylinop.py"
)
...
...
This diff is collapsed.
Click to expand it.
wrapper/matlab/+matfaust/+lazylinop/zeros.m
0 → 100644
+
58
−
0
View file @
fe81bd3d
%=============================================================
%> @brief Returns a zero LazyLinearOp.
%>
%> @param shape: (1x2 real matrix) the shape of the zero LazyLinearOp.
%>
%> @b Example:
%> @code
%> >> import matfaust.lazylinop.zeros
%> >> Lz = zeros([10, 12]);
%> >> x = rand(12, 1);
%> >> Lz * x
%>
%> ans =
%>
%> 0
%> 0
%> 0
%> 0
%> 0
%> 0
%> 0
%> 0
%> 0
%> 0
%> @endcode
%>
%=============================================================
function
lz
=
zeros
(
shape
)
import
matfaust
.
lazylinop
.
LazyLinearOp
import
matfaust
.
lazylinop
.
LazyLinearOperator
if
~
ismatrix
(
shape
)
||
~
isnumeric
(
shape
)
||
any
(
size
(
shape
)
~=
[
1
,
2
])
||
~
isreal
(
shape
)
error
(
'shape is not valid 1x2 double matrix'
)
end
function
mm
=
matmat_
(
op
,
shape
)
ops
=
size
(
op
);
if
ops
(
1
)
~=
shape
(
2
)
error
(
'Dimensions must agree'
)
end
if
LazyLinearOp
.
isLazyLinearOp
(
op
)
mm
=
matfaust
.
lazylinop
.
zeros
([
shape
(
1
),
size
(
op
,
2
)]);
elseif
numel
(
size
(
op
))
==
2
mm
=
zeros
([
shape
(
1
),
size
(
op
,
2
)]);
if
isreal
(
op
)
if
strcmp
(
class
(
op
),
'single'
)
mm
=
single
(
mm
);
end
else
% op is complex
mm
=
complex
(
mm
);
end
else
% op ndim > 2
zargs
=
num2cell
(
ops
(
3
:
end
));
mm
=
zeros
(
shape
(
1
),
ops
(
2
),
zargs
{:});
end
end
lz
=
LazyLinearOperator
(
shape
,
'matmat'
,
@
(
x
)
matmat_
(
x
,
shape
),
'rmatmat'
,
...
@
(
x
)
matmat_
(
x
,
[
shape
(
2
),
shape
(
1
)]));
end
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