%> This class represents a given dense matrix by a product of sparse matrix (i.e Faust)
% in order to speed-up multiplication by this matrix.
%> This class represents a given dense matrix by a product of sparse matrices (i.e Faust).
%> The main goal of Faust representation is to speed up operations on that matrix, especially the multiplication. Besides the time optimization, a Faust can reduce the memory space size needed both for storage and loading.
%>
%> Although the sparse matrices are more interesting for optimization it's not forbidden to define a Faust as a product of dense matrices or a mix up of dense and sparse matrices.
%>
%> The matrices composing the Faust product, also called the factors, are defined on complex or real fields. Hence a Faust can be a complex Faust or a real Faust.
%> @brief Creates a Faust from various types of input.
%> @brief Creates a Faust from a list of factors or alternatively from a file.
%>
%> Another easy way to create a Faust is to call the static method Faust.rand().
%>
%> @param factors (varargin{1}) the 1D cell array of factors to initialize the Faust with.
%> The factors can be sparse or dense matrices.
%> @param filepath (varargin{1}) the file where a Faust was stored with Faust.save() (in Matlab format version 5).
%> <br/> The factors must respect the dimensions needed for the product to be defined (for i=1 to size(factors,2), size(factors{i},2) == size(factors{i+1},1)).
%> <br/> The factors can be sparse or dense matrices.
%> @param filepath (varargin{1}) the file from which a Faust is created.<br/>
%> The format is Matlab version 5 (.mat extension).<br/>
%> The file must have been saved before with Faust.save().
%> @param lambda (optional varargin{2}) multiplicative scalar applied to the factor product before to set the Faust with.
%>
%> @b Examples
%> @code
%> factors = cell(1,5)
%> is_sparse = false
%> for i=1:5
%> factors{i} = rand(100,100)
%> if(is_sparse) % odd index factors are sparse matrices
%> This function overloads a Matlab built-in function.
%>
%> @param F the Faust to display information about.
%> @param F the Faust object.
%>
%> @b NOTE: currently a bug is affecting this function. When the Faust is transposed the dimensions are inverted in the display (like the Faust hasn't been transposed).
%> @b WARNING: currently a bug is affecting this function. When the Faust is transposed the dimensions are inverted in the display (like the Faust hasn't been transposed).
%>
%> @b Example
%> @code
...
...
@@ -750,6 +781,8 @@ classdef Faust
%>
%> @endcode
%>
%> <p>@b See @b also Faust.nnz, Faust.RCG, Faust.size, Faust.get_fact
%> @brief Calculates the density of F, that is, the number of non-zeros in factors over the total number of elements in dense matrix of F (which is equal to F.size(1)*F.size(2)).
%> @brief Calculates the density of F, that is, the number of non-zeros
%> in factors over the total number of elements in dense matrix of F
%> (which is equal to size(F, 1)*size(F, 2)).
%>
%> @b NOTE: this definition of density allows the value to be greater than 1.
%> @b NOTE: this definition of density allows the value to be greater than 1.