Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 18b9855e authored by hhakim's avatar hhakim
Browse files

Minor change: update projectors doc.

parent 61e22943
Branches
Tags 2.5.26
No related merge requests found
Pipeline #833901 skipped
......@@ -7,7 +7,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 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 eigtj.m hierarchical.m fact.m palm4msa.m fgft_givens.m fgft_palm.m svdtj.m splin.m spcol.m proj_gen.m ")
string(CONCAT DOXYGEN_FILE_PATTERNS ${DOXYGEN_FILE_PATTERNS} " Faust.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 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 ")
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")
......@@ -32,9 +32,11 @@ if(BUILD_DOCUMENTATION)
endif()
#list(GET <list> <element index> [<index> ...] <out-var>)
list(GET PYTHON_EXES -1 PY3_EXE)
file(GLOB HTML_FILES RELATIVE_PATH ${PROJECT_BINARY_DIR}/doc/html/ ${PROJECT_BINARY_DIR}/doc/html/namespacepyfaust_*.html ${PROJECT_BINARY_DIR}/doc/html/namespacematfaust_*.html)
message(STATUS "HTML_FILES=${HTML_FILES}")
add_custom_target(doc_exclu_class_filtering ALL ${PY3_EXE} ${PROJECT_BINARY_DIR}/doc/filterout_excluded_classes.py ${HTML_FILES} DEPENDS doc WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc COMMENT "Filter out the non-documented classes")
# file(GLOB HTML_FILES RELATIVE_PATH ${PROJECT_BINARY_DIR}/doc/html/ ${PROJECT_BINARY_DIR}/doc/html/namespacepyfaust_*.html ${PROJECT_BINARY_DIR}/doc/html/namespacematfaust_*.html)
# message(STATUS "HTML_FILES=${HTML_FILES}")
set(GLOB_PATTS "'${PROJECT_BINARY_DIR}/doc/html/namespacepyfaust_*.html';'${PROJECT_BINARY_DIR}/doc/html/namespacematfaust_*.html'")
add_custom_target(doc_exclu_class_filtering ALL ${PY3_EXE}
${PROJECT_BINARY_DIR}/doc/filterout_excluded_classes.py ${GLOB_PATTS} DEPENDS doc WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc COMMENT "Filter out the non-documented classes")
#install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION doc/share/doc)
#file(MAKE_DIRECTORY ${FAUST_INSTALL_DOC})
#install(DIRECTORY ${PROJECT_BINARY_DIR}/doc/html DESTINATION ${FAUST_INSTALL_DOC} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
......
import shutil
import sys
import re
from glob import glob
"""
This script intends to filter out the doxygen non-documented classes (set in EXCLUDE_SYMBOLS)
......@@ -19,18 +20,22 @@ This script intends to filter out the doxygen non-documented classes (set in EXC
in_block_to_del=False
count_in_block_lines = 0
for file in sys.argv[1:]:
print("filtering file:", file)
tmp = open("tmp.html", mode='w')
for line in open(file):
if(in_block_to_del):
count_in_block_lines -= 1
if(count_in_block_lines <= 0):
in_block_to_del = False
elif(re.match('.*class &#160.*"bottom"><b>', line)):
in_block_to_del=True
count_in_block_lines = 2
else:
tmp.write(line)
tmp.close()
shutil.copyfile("tmp.html", file)
for pattern in sys.argv[1:]:
print("pattern=", pattern)
# print("glob(pattern):", glob(pattern))
file_list = glob(pattern)
for file in file_list:
# print("filtering file:", file)
tmp = open("tmp.html", mode='w')
for line in open(file):
if(in_block_to_del):
count_in_block_lines -= 1
if(count_in_block_lines <= 0):
in_block_to_del = False
elif(re.match('.*class &#160.*"bottom"><b>', line)):
in_block_to_del=True
count_in_block_lines = 2
else:
tmp.write(line)
tmp.close()
shutil.copyfile("tmp.html", file)
%==================================================
%> Functor that implements the CONST projector.
%==================================================
classdef const < matfaust.factparams.proj_gen
properties
end
......
%==================================================
%> Functor that implements the NORMCOL projector. A, the image matrix, is defined by \f$ \forall j \in \{1,\ldots,shape(2)\} \| A_{*,j} \|_2 = s \| \f$.
%==================================================
classdef normcol < matfaust.factparams.proj_gen
properties
end
......
%==================================================
%> Functor that implements the NORMLIN projector. A, the image matrix, is defined by \f$ \forall i \in \{1,\ldots,shape(1)\} \| A_{i, *} \|_2 = s \| \f$.
%==================================================
classdef normlin < matfaust.factparams.proj_gen
properties
end
methods
function proj = normcol(shape, normval, varargin)
import matfaust.factparams.ConstraintReal
proj.constraint = ConstraintReal('normlin', shape(1), shape(2), normval, varargin{:});
end
end
end
%==================================================
%> @brief Functor that implements the SP projector. A, the projected matrix, is such that \f$ \| A \|_0 = k, \| A\|_F = 1\f$.
%==================================================
classdef sp < matfaust.factparams.proj_gen
properties
end
......
%==================================================
%> @brief Functor that implements the SPCOL projector. A, the projected matrix, is defined by \f$ \forall j \in \{1,\ldots,shape(1)\} \| \f$ the j-th column \f$ \| A_{*,j}\| \f$ is such that \f$ A_{*,j}\|_0 = k, \| A\|_F = 1\f$.
%==================================================
classdef spcol < matfaust.factparams.proj_gen
properties
end
......
%==========================================
%> Functor that implements the SPLIN projector.
%> Functor that implements the SPLIN projector. A, the projected matrix, is defined by \f$ \forall i \in \{1,\ldots,shape(1)\} \| \f$ the i-th row \f$ A_{i,*}\f$ is such that \f$ \| A_{i,*}\|_0 = k, \| A\|_F = 1\f$.
%==========================================
classdef splin < matfaust.factparams.proj_gen
properties
......
%==================================================
%> Functor that implements the SPLINCOL projector.
%> @brief Functor that implements the SPLINCOL projector.
%>
%> It's the union of SPLIN and SPCOL projectors.
%==================================================
classdef splincol < matfaust.factparams.proj_gen
properties
......
%==================================================
%> @brief Functor that implements the SUPP projector.
%>
%> A, the image matrix, is such that nonzeros(A) == nonzeros(S)
%==================================================
classdef supp < matfaust.factparams.proj_gen
properties
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment