Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 73a48f14 authored by hhakim's avatar hhakim
Browse files

Add note in Faust/concatenation doc about use of LazyLinearOp to encapsulate a Faust.

Issue #267.
parent f799dc86
Branches
Tags
No related merge requests found
...@@ -75,6 +75,10 @@ ...@@ -75,6 +75,10 @@
%> Mainly for convenience and test purposes, a Faust can be converted into %> Mainly for convenience and test purposes, a Faust can be converted into
%> the corresponding full matrix using the function Faust.full. %> the corresponding full matrix using the function Faust.full.
%> %>
%> @note it could be wiser to encapsulate a Faust in a
%> <a href="https://gitlab.inria.fr/faustgrp/matlazylinop/-/blob/main/src/%2Blazylinop/aslazylinearoperator.m">lazylinop.LazyLinearOp</a>
%> for a totally lazy paradigm on all available operations.
%>
%> @warning using Faust.full is discouraged except for test purposes, as it %> @warning using Faust.full is discouraged except for test purposes, as it
%> loses the main potential interests of the FAuST structure: compressed %> loses the main potential interests of the FAuST structure: compressed
%> memory storage and faster matrix-vector multiplication compared to its %> memory storage and faster matrix-vector multiplication compared to its
...@@ -2824,6 +2828,11 @@ classdef Faust < handle % subclass of handle for Faust.delete to be called on cl ...@@ -2824,6 +2828,11 @@ classdef Faust < handle % subclass of handle for Faust.delete to be called on cl
%> %>
%> @retval C the concatenation result as a new Faust. %> @retval C the concatenation result as a new Faust.
%> %>
%> @note it could be wiser to encapsulate a Faust in a
%> <a href="https://gitlab.inria.fr/faustgrp/matlazylinop/-/blob/main/src/%2Blazylinop/aslazylinearoperator.m">lazylinop.LazyLinearOp</a>
%> for a lazy concatenation.
%> </br>
%>
%> %>
%> @b Example %> @b Example
%> @code %> @code
...@@ -2960,7 +2969,11 @@ classdef Faust < handle % subclass of handle for Faust.delete to be called on cl ...@@ -2960,7 +2969,11 @@ classdef Faust < handle % subclass of handle for Faust.delete to be called on cl
%> %>
%> &nbsp;&nbsp;&nbsp; @b C=HORZCAT(F,A) concatenates the Faust F and A horizontally. A is a Faust or a sparse/full matrix. The result is the Faust C. @b HORZCAT(F,A) is the same as [F,G].<br/> %> &nbsp;&nbsp;&nbsp; @b C=HORZCAT(F,A) concatenates the Faust F and A horizontally. A is a Faust or a sparse/full matrix. The result is the Faust C. @b HORZCAT(F,A) is the same as [F,G].<br/>
%> &nbsp;&nbsp;&nbsp; @b C=HORZCAT(@b F,@b A,@b B,…) concatenates horizontally F to A, B, etc. @b HORZCAT(@b F,@b A, @b B,…) is the same as [F,A,B,…].<br/> %> &nbsp;&nbsp;&nbsp; @b C=HORZCAT(@b F,@b A,@b B,…) concatenates horizontally F to A, B, etc. @b HORZCAT(@b F,@b A, @b B,…) is the same as [F,A,B,…].<br/>
%> %>
%> @note it could be wiser to encapsulate a Faust in a
%> <a href="https://gitlab.inria.fr/faustgrp/matlazylinop/-/blob/main/src/%2Blazylinop/aslazylinearoperator.m">lazylinop.LazyLinearOp</a>
%> for a lazy concatenation.
%>
%> <p>@b See @b also Faust.vertcat, Faust.cat. %> <p>@b See @b also Faust.vertcat, Faust.cat.
%====================================================================== %======================================================================
function HC = horzcat(varargin) function HC = horzcat(varargin)
...@@ -2980,6 +2993,10 @@ classdef Faust < handle % subclass of handle for Faust.delete to be called on cl ...@@ -2980,6 +2993,10 @@ classdef Faust < handle % subclass of handle for Faust.delete to be called on cl
%> &nbsp;&nbsp;&nbsp; @b C=VERTCAT(F,A) concatenates the Faust F and A vertically. A is a Faust or a sparse/full matrix. The result is the Faust C. @b VERTCAT(F,A) is the same as [F;G].<br/> %> &nbsp;&nbsp;&nbsp; @b C=VERTCAT(F,A) concatenates the Faust F and A vertically. A is a Faust or a sparse/full matrix. The result is the Faust C. @b VERTCAT(F,A) is the same as [F;G].<br/>
%> &nbsp;&nbsp;&nbsp; @b C=VERTCAT(@b F, @b A, @b B,…) concatenates vertically F to A, B etc. @b VERTCAT(@b F, @b A, @b B,…) is the same as [F;A;B;…].<br/> %> &nbsp;&nbsp;&nbsp; @b C=VERTCAT(@b F, @b A, @b B,…) concatenates vertically F to A, B etc. @b VERTCAT(@b F, @b A, @b B,…) is the same as [F;A;B;…].<br/>
%> %>
%> @note it could be wiser to encapsulate a Faust in a
%> <a href="https://gitlab.inria.fr/faustgrp/matlazylinop/-/blob/main/src/%2Blazylinop/aslazylinearoperator.m">lazylinop.LazyLinearOp</a>
%> for a lazy concatenation.
%>
%> <p>@b See @b also Faust.horzcat, Faust.cat. %> <p>@b See @b also Faust.horzcat, Faust.cat.
%====================================================================== %======================================================================
function VC = vertcat(varargin) function VC = vertcat(varargin)
......
...@@ -71,6 +71,10 @@ class Faust(numpy.lib.mixins.NDArrayOperatorsMixin): ...@@ -71,6 +71,10 @@ class Faust(numpy.lib.mixins.NDArrayOperatorsMixin):
Mainly for convenience and test purposes, a Faust can be converted into Mainly for convenience and test purposes, a Faust can be converted into
the corresponding full matrix using the function Faust.toarray. the corresponding full matrix using the function Faust.toarray.
NOTE: it could be wiser to encapsulate a Faust in a
<a href="https://faustgrp.gitlabpages.inria.fr/lazylinop/api_lazylinop.html#lazylinop.aslazylinearoperator">lazylinop.LazyLinearOp</a>
for a totally lazy paradigm on all available operations.
Warning: using Faust.toarray is discouraged except for test purposes, as it Warning: using Faust.toarray is discouraged except for test purposes, as it
loses the main potential interests of the FAuST structure: compressed loses the main potential interests of the FAuST structure: compressed
memory storage and faster matrix-vector multiplication compared to its memory storage and faster matrix-vector multiplication compared to its
...@@ -1388,6 +1392,10 @@ class Faust(numpy.lib.mixins.NDArrayOperatorsMixin): ...@@ -1388,6 +1392,10 @@ class Faust(numpy.lib.mixins.NDArrayOperatorsMixin):
<br/>N.B.: you could have an elementwise non-significant absolute <br/>N.B.: you could have an elementwise non-significant absolute
difference between the two members. difference between the two members.
NOTE: it could be wiser to encapsulate a Faust in a
<a href="https://faustgrp.gitlabpages.inria.fr/lazylinop/api_lazylinop.html#lazylinop.aslazylinearoperator">lazylinop.LazyLinearOp</a>
for a lazy concatenation.
Args: Args:
F: the Faust to concatenate to. F: the Faust to concatenate to.
...@@ -3367,7 +3375,7 @@ def concatenate(_tuple, *args, axis=0, **kwargs): ...@@ -3367,7 +3375,7 @@ def concatenate(_tuple, *args, axis=0, **kwargs):
- FACTOR 4 (double) SPARSE, size 56x100, density 0.05, nnz 280 - FACTOR 4 (double) SPARSE, size 56x100, density 0.05, nnz 280
- FACTOR 5 (double) SPARSE, size 100x50, density 0.02, nnz 100 - FACTOR 5 (double) SPARSE, size 100x50, density 0.02, nnz 100
<b>See also</b> numpy.concatenate <b>See also</b> numpy.concatenate, Faust.concatenate
""" """
if not isinstance(_tuple, tuple): if not isinstance(_tuple, tuple):
raise TypeError("first arg must be a tuple") raise TypeError("first arg must be a tuple")
...@@ -3395,6 +3403,11 @@ def hstack(_tuple): ...@@ -3395,6 +3403,11 @@ def hstack(_tuple):
<b>See also</b> numpy.hstack <b>See also</b> numpy.hstack
NOTE: it could be wiser to encapsulate a Faust in a
<a href="https://faustgrp.gitlabpages.inria.fr/lazylinop/api_lazylinop.html#lazylinop.aslazylinearoperator">lazylinop.LazyLinearOp</a>
for a lazy concatenation.
Example: Example:
>>> from pyfaust import * >>> from pyfaust import *
>>> seed(42) # just for reproducibility >>> seed(42) # just for reproducibility
...@@ -3417,6 +3430,11 @@ def vstack(_tuple): ...@@ -3417,6 +3430,11 @@ def vstack(_tuple):
<b>See also</b> numpy.vstack <b>See also</b> numpy.vstack
NOTE: it could be wiser to encapsulate a Faust in a
<a href="https://faustgrp.gitlabpages.inria.fr/lazylinop/api_lazylinop.html#lazylinop.aslazylinearoperator">lazylinop.LazyLinearOp</a>
for a lazy concatenation.
Example: Example:
>>> from pyfaust import * >>> from pyfaust import *
>>> seed(42) # just for reproducibility >>> seed(42) # just for reproducibility
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment