Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7cff526c authored by hhakim's avatar hhakim
Browse files

Add a note about Faust deletion in live script.

Fix Issue #258.
parent 57ff917b
Branches
Tags
No related merge requests found
No preview for this file type
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB R2018b"><title>Untitled</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left; }
.S1 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left; }
.S2 { margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: bold; text-align: left; }
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB 2021b"><title>Untitled</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: 700; text-align: left; }
.S1 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; }
.S2 { margin: 15px 10px 5px 4px; padding: 0px; line-height: 18px; min-height: 0px; white-space: pre-wrap; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 17px; font-weight: 700; text-align: left; }
.CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S3 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.2339992523193px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; }
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.2339992523193px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; }
.S5 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.2339992523193px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; }
.S6 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; overflow-x: hidden; line-height: 17.2339992523193px; }
.embeddedOutputsErrorElement {min-height: 18px; max-height: 250px; overflow: auto;}
.S3 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; }
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; }
.S5 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; }
.S6 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px; }
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsErrorElement { min-height: 18px; max-height: 550px;}
.embeddedOutputsErrorElement .diagnosticMessage-errorType { overflow: auto;}
.embeddedOutputsErrorElement.inlineElement {}
.embeddedOutputsErrorElement.rightPaneElement {}
.embeddedOutputsWarningElement{min-height: 18px; max-height: 250px; overflow: auto;}
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsWarningElement { min-height: 18px; max-height: 550px;}
.embeddedOutputsWarningElement .diagnosticMessage-warningType { overflow: auto;}
.embeddedOutputsWarningElement.inlineElement {}
.embeddedOutputsWarningElement.rightPaneElement {}
.diagnosticMessage-wrapper {font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;}
.diagnosticMessage-wrapper.diagnosticMessage-warningType {color: rgb(255,100,0);}
.diagnosticMessage-wrapper.diagnosticMessage-warningType a {color: rgb(255,100,0); text-decoration: underline;}
.diagnosticMessage-wrapper.diagnosticMessage-errorType {color: rgb(230,0,0);}
.diagnosticMessage-wrapper.diagnosticMessage-errorType a {color: rgb(230,0,0); text-decoration: underline;}
.diagnosticMessage-wrapper .diagnosticMessage-messagePart {white-space: pre-wrap;}
.diagnosticMessage-wrapper .diagnosticMessage-stackPart {white-space: pre;}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement {white-space: pre; word-wrap: initial; min-height: 18px; max-height: 250px; overflow: auto;}
.textElement,.rtcDataTipElement .textElement {padding-top: 3px;}
/* Copyright 2015-2019 The MathWorks, Inc. *//* In this file, styles are not scoped to rtcContainer since they could be in the Dojo Tooltip */.diagnosticMessage-wrapper { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;}
.diagnosticMessage-wrapper.diagnosticMessage-warningType { color: rgb(255,100,0);}
.diagnosticMessage-wrapper.diagnosticMessage-warningType a { color: rgb(255,100,0); text-decoration: underline;}
.diagnosticMessage-wrapper.diagnosticMessage-errorType { color: rgb(230,0,0);}
.diagnosticMessage-wrapper.diagnosticMessage-errorType a { color: rgb(230,0,0); text-decoration: underline;}
.diagnosticMessage-wrapper .diagnosticMessage-messagePart,.diagnosticMessage-wrapper .diagnosticMessage-causePart { white-space: pre-wrap;}
.diagnosticMessage-wrapper .diagnosticMessage-stackPart { white-space: pre;}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement { white-space: pre; word-wrap: initial; min-height: 18px; max-height: 550px;}
.embeddedOutputsTextElement .textElement,.embeddedOutputsVariableStringElement .textElement { overflow: auto;}
.textElement,.rtcDataTipElement .textElement { padding-top: 3px;}
.embeddedOutputsTextElement.inlineElement,.embeddedOutputsVariableStringElement.inlineElement {}
.inlineElement .textElement {}
.embeddedOutputsTextElement.rightPaneElement,.embeddedOutputsVariableStringElement.rightPaneElement {min-height: 16px;}
.rightPaneElement .textElement {padding-top: 2px; padding-left: 9px;}
.S7 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left; }
.S8 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.2339992523193px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; }
.S9 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 17.2339992523193px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; font-size: 14px; }</style></head><body><div class = rtcContent><h2 class = 'S0'><span style=' font-weight: bold;'>How to Create a Faust</span></h2><div class = 'S1'><span style=' font-weight: bold;'></span></div><h3 class = 'S2'><span>1. Setting the Factors Manually</span></h3><div class = 'S1'><span style=' font-weight: bold;'></span></div><div class = 'S1'><span>Let's start by creating a </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span>Faust</span></a><span> manually, that is factor by factor.</span></div><div class = 'S1'><span>Below is a creation of a </span><span style=' font-family: monospace;'>Faust</span><span> containing 5 factors, alternating sparse and dense factors</span></div><div class="CodeBlock"><div class="inlineWrapper"><div class = 'S3'><span style="white-space: pre;"><span>import </span><span style="color: rgb(160, 32, 240);">matfaust.Faust</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span>factors = cell(1,5);</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span>is_sparse = false;</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span style="color: rgb(0, 0, 255);">for </span><span>i=1:5</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span> </span><span style="color: rgb(0, 0, 255);">if</span><span>(is_sparse) </span><span style="color: rgb(34, 139, 34);">% odd index factors are sparse matrices</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span> factors{i} = sprand(100, 100, 0.1);</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span> </span><span style="color: rgb(0, 0, 255);">else </span><span style="color: rgb(34, 139, 34);">% even index gives a dense matrix</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span> factors{i} = rand(100, 100);</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span> </span><span style="color: rgb(0, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span> is_sparse = ~ is_sparse; </span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span style="color: rgb(0, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre;"><span style="color: rgb(34, 139, 34);">% define a Faust with those factors</span></span></div></div><div class="inlineWrapper outputs"><div class = 'S5'><span style="white-space: pre;"><span>F = Faust(factors)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="1E71298F" data-testid="output_0" data-width="832" data-height="104" data-hashorizontaloverflow="false" style="width: 862px; max-height: 261px;"><div class="textElement"><div><span class="variableNameElement">F = </span></div><div>Faust size 100x100, density 3.1898, nnz_sum 31898, 5 factor(s):
.embeddedOutputsTextElement.rightPaneElement,.embeddedOutputsVariableStringElement.rightPaneElement { min-height: 16px;}
.rightPaneElement .textElement { padding-top: 2px; padding-left: 9px;}
.S7 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: pre-wrap; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: 400; text-align: left; }
.S8 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; }
.S9 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; }</style></head><body><div class = rtcContent><h2 class = 'S0'><span style=' font-weight: bold;'>How to Create a Faust</span></h2><div class = 'S1'><span style=' font-weight: bold;'></span></div><h3 class = 'S2'><span>1. Setting the Factors Manually</span></h3><div class = 'S1'><span style=' font-weight: bold;'></span></div><div class = 'S1'><span>Let's start by creating a </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span>Faust</span></a><span> manually, that is factor by factor.</span></div><div class = 'S1'><span>Below is a creation of a </span><span style=' font-family: monospace;'>Faust</span><span> containing 5 factors, alternating sparse and dense factors</span></div><div class="CodeBlock"><div class="inlineWrapper"><div class = 'S3'><span style="white-space: pre"><span >import </span><span style="color: rgb(170, 4, 249);">matfaust.Faust</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span >factors = cell(1,5);</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span >is_sparse = false;</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">for </span><span >i=1:5</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span > </span><span style="color: rgb(14, 0, 255);">if</span><span >(is_sparse) </span><span style="color: rgb(2, 128, 9);">% odd index factors are sparse matrices</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span > factors{i} = sprand(100, 100, 0.1);</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span > </span><span style="color: rgb(14, 0, 255);">else </span><span style="color: rgb(2, 128, 9);">% even index gives a dense matrix</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span > factors{i} = rand(100, 100);</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span > </span><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span > is_sparse = ~ is_sparse; </span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span style="color: rgb(14, 0, 255);">end</span></span></div></div><div class="inlineWrapper"><div class = 'S4'><span style="white-space: pre"><span style="color: rgb(2, 128, 9);">% define a Faust with those factors</span></span></div></div><div class="inlineWrapper outputs"><div class = 'S5'><span style="white-space: pre"><span >F = Faust(factors)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="D2D60DBF" data-testid="output_0" style="width: 716px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement eoOutputContent" data-width="686" data-height="107" data-hashorizontaloverflow="false" style="max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">F = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Faust size 100x100, density 3.1897, nnz_sum 31897, 5 factor(s):
- FACTOR 0 (double) DENSE, size 100x100, density 1, nnz 10000
- FACTOR 1 (double) SPARSE, size 100x100, density 0.0947, nnz 947
- FACTOR 1 (double) SPARSE, size 100x100, density 0.0943, nnz 943
- FACTOR 2 (double) DENSE, size 100x100, density 1, nnz 10000
- FACTOR 3 (double) SPARSE, size 100x100, density 0.0951, nnz 951
- FACTOR 4 (double) DENSE, size 100x100, density 1, nnz 10000</div></div></div></div></div></div><div class = 'S7'><span>As you noticed, the </span><span style=' font-family: monospace;'>Faust</span><span> output contains the list of factors and their features but also a header describing the </span><span style=' font-family: monospace;'>Faust</span><span> operator itself: its size, its density, the number of nonzeros it contains (</span><span style=' font-family: monospace;'>nnz_sum</span><span>) along with all its factors.</span></div><div class = 'S1'><span>You can also call </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html#a3132f572e58e6c312d5535d0e075735e"><span style=' font-family: monospace;'>disp(F)</span></a><span> to get all the information.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre;"><span>disp(F)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="6B9931EE" data-testid="output_1" data-width="832" data-height="87" data-hashorizontaloverflow="false" style="width: 862px; max-height: 261px;"><div class="textElement">Faust size 100x100, density 3.1898, nnz_sum 31898, 5 factor(s):
- FACTOR 3 (double) SPARSE, size 100x100, density 0.0954, nnz 954
- FACTOR 4 (double) DENSE, size 100x100, density 1, nnz 10000
</div></div></div></div></div></div><div class = 'S7'><span>As you noticed, the </span><span style=' font-family: monospace;'>Faust</span><span> output contains the list of factors and their features but also a header describing the </span><span style=' font-family: monospace;'>Faust</span><span> operator itself: its size, its density, the number of nonzeros it contains (</span><span style=' font-family: monospace;'>nnz_sum</span><span>) along with all its factors.</span></div><div class = 'S1'><span>You can also call </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html#a3132f572e58e6c312d5535d0e075735e"><span style=' font-family: monospace;'>disp(F)</span></a><span> to get all the information.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre"><span >disp(F)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="417A60C5" data-testid="output_1" style="width: 716px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement eoOutputContent" data-width="686" data-height="90" data-hashorizontaloverflow="false" style="max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Faust size 100x100, density 3.1897, nnz_sum 31897, 5 factor(s):
- FACTOR 0 (double) DENSE, size 100x100, density 1, nnz 10000
- FACTOR 1 (double) SPARSE, size 100x100, density 0.0947, nnz 947
- FACTOR 1 (double) SPARSE, size 100x100, density 0.0943, nnz 943
- FACTOR 2 (double) DENSE, size 100x100, density 1, nnz 10000
- FACTOR 3 (double) SPARSE, size 100x100, density 0.0951, nnz 951
- FACTOR 4 (double) DENSE, size 100x100, density 1, nnz 10000</div></div></div></div></div><div class = 'S7'><span style=' font-weight: bold;'></span></div><h3 class = 'S2'><span style=' font-weight: bold;'>2. Faust File Loading</span></h3><div class = 'S1'><span style=' font-weight: bold;'></span></div><div class = 'S1'><span>It's really handy to create a </span><span style=' font-family: monospace;'>Faust</span><span> and retrieve it from a file later. Let's see in the code below how to proceed.</span></div><div class = 'S1'><span>First save the Faust.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div class = 'S9'><span style="white-space: pre;"><span>save(F, </span><span style="color: rgb(160, 32, 240);">'F.mat'</span><span>)</span></span></div></div></div><div class = 'S7'><span>Now let's get it back from file.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre;"><span>file_F = Faust(</span><span style="color: rgb(160, 32, 240);">'F.mat'</span><span>)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="49BDEA01" data-testid="output_2" data-width="832" data-height="104" data-hashorizontaloverflow="false" style="width: 862px; max-height: 261px;"><div class="textElement"><div><span class="variableNameElement">file_F = </span></div><div>Faust size 100x100, density 3.1898, nnz_sum 31898, 5 factor(s):
- FACTOR 3 (double) SPARSE, size 100x100, density 0.0954, nnz 954
- FACTOR 4 (double) DENSE, size 100x100, density 1, nnz 10000</div></div></div></div></div><div class = 'S7'><span>Note that when you don't need </span><span style=' font-family: monospace;'>F</span><span> anymore, you can delete it with the instruction </span><span style=' font-family: monospace;'>delete(F)</span><span> or </span><span style=' font-family: monospace;'>clear F</span><span>. Normally, that's the role of the garbage collector but it might happen that your Faust is very eager in memory and a manual deletion is necessary.</span></div><h3 class = 'S2'><span style=' font-weight: bold;'>2. Faust File Loading</span></h3><div class = 'S1'><span style=' font-weight: bold;'></span></div><div class = 'S1'><span>It's really handy to create a </span><span style=' font-family: monospace;'>Faust</span><span> and retrieve it from a file later. Let's see in the code below how to proceed.</span></div><div class = 'S1'><span>First save the Faust.</span></div><div class="CodeBlock"><div class="inlineWrapper"><div class = 'S9'><span style="white-space: pre"><span >save(F, </span><span style="color: rgb(170, 4, 249);">'F.mat'</span><span >)</span></span></div></div></div><div class = 'S7'><span>Now let's get it back from file.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre"><span >file_F = Faust(</span><span style="color: rgb(170, 4, 249);">'F.mat'</span><span >)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="A03641CF" data-testid="output_2" style="width: 716px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement eoOutputContent" data-width="686" data-height="107" data-hashorizontaloverflow="false" style="max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">file_F = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Faust size 100x100, density 3.1897, nnz_sum 31897, 5 factor(s):
- FACTOR 0 (double) DENSE, size 100x100, density 1, nnz 10000
- FACTOR 1 (double) SPARSE, size 100x100, density 0.0947, nnz 947
- FACTOR 1 (double) SPARSE, size 100x100, density 0.0943, nnz 943
- FACTOR 2 (double) DENSE, size 100x100, density 1, nnz 10000
- FACTOR 3 (double) SPARSE, size 100x100, density 0.0951, nnz 951
- FACTOR 4 (double) DENSE, size 100x100, density 1, nnz 10000</div></div></div></div></div></div><div class = 'S7'><span>The file storage format used is matlab v7. This format allows the compatibility between matfaust and </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacepyfaust.html"><span>pyfaust</span></a><span>, the Python wrapper. You can easily reload the </span><span style=' font-family: monospace;'>F.mat</span><span> file from pyfaust.</span></div><div class = 'S1'><span></span></div><h3 class = 'S2'><span>3. Generating a Random Faust</span></h3><div class = 'S1'><span></span></div><div class = 'S1'><span>The matfaust package provides functions for generating </span><span style=' font-family: monospace;'>Faust</span><span> objects by many manners. One noticeable function of this package is </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8"><span>rand()</span></a><span>. This function allows to generate a random </span><span style=' font-family: monospace;'>Faust</span><span> satisfying certain constraints; the number of factors, the size of these factors, the density, the scalar type, etc.</span></div><div class = 'S1'><span>Below are examples of (pseudo-)random generations.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre;"><span>F = matfaust.rand(10, 10, </span><span style="color: rgb(160, 32, 240);">'num_factors'</span><span>, 2, </span><span style="color: rgb(160, 32, 240);">'density'</span><span>, .5, </span><span style="color: rgb(160, 32, 240);">'field'</span><span>, </span><span style="color: rgb(160, 32, 240);">'complex'</span><span>)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="93C200CD" data-testid="output_3" data-width="832" data-height="62" data-hashorizontaloverflow="false" style="width: 862px; max-height: 261px;"><div class="textElement"><div><span class="variableNameElement">F = </span></div><div>Faust size 10x10, density 1, nnz_sum 100, 2 factor(s):
- FACTOR 3 (double) SPARSE, size 100x100, density 0.0954, nnz 954
- FACTOR 4 (double) DENSE, size 100x100, density 1, nnz 10000
</div></div></div></div></div></div><div class = 'S7'><span>The file storage format used is matlab v7. This format allows the compatibility between matfaust and </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacepyfaust.html"><span>pyfaust</span></a><span>, the Python wrapper. You can easily reload the </span><span style=' font-family: monospace;'>F.mat</span><span> file from pyfaust.</span></div><div class = 'S1'><span></span></div><h3 class = 'S2'><span>3. Generating a Random Faust</span></h3><div class = 'S1'><span></span></div><div class = 'S1'><span>The matfaust package provides functions for generating </span><span style=' font-family: monospace;'>Faust</span><span> objects by many manners. One noticeable function of this package is </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8"><span>rand()</span></a><span>. This function allows to generate a random </span><span style=' font-family: monospace;'>Faust</span><span> satisfying certain constraints; the number of factors, the size of these factors, the density, the scalar type, etc.</span></div><div class = 'S1'><span>Below are examples of (pseudo-)random generations.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre"><span >F = matfaust.rand(10, 10, </span><span style="color: rgb(170, 4, 249);">'num_factors'</span><span >, 2, </span><span style="color: rgb(170, 4, 249);">'density'</span><span >, .5, </span><span style="color: rgb(170, 4, 249);">'field'</span><span >, </span><span style="color: rgb(170, 4, 249);">'complex'</span><span >)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="BB23049F" data-testid="output_3" style="width: 716px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement eoOutputContent" data-width="686" data-height="64" data-hashorizontaloverflow="false" style="max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">F = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Faust size 10x10, density 1, nnz_sum 100, 2 factor(s):
- FACTOR 0 (complex) SPARSE, size 10x10, density 0.5, nnz 50
- FACTOR 1 (complex) SPARSE, size 10x10, density 0.5, nnz 50</div></div></div></div></div></div><div class = 'S7'><span>F is a complex </span><span style=' font-family: monospace;'>Faust</span><span>. Its rate of nonzeros, for each factor, is about 0.5. Since the </span><span style=' font-family: monospace;'>fac_type</span><span> argument is not set, each factor is sparse.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre;"><span>G = matfaust.rand(14, 20, </span><span style="color: rgb(160, 32, 240);">'num_factors'</span><span>, [2, 5], </span><span style="color: rgb(160, 32, 240);">'dim_sizes'</span><span>, [14, 20], </span><span style="color: rgb(160, 32, 240);">'density'</span><span>, .5, </span><span style="color: rgb(160, 32, 240);">'fac_type'</span><span>, </span><span style="color: rgb(160, 32, 240);">'dense'</span><span>)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="CC373FC6" data-testid="output_4" data-width="832" data-height="76" data-hashorizontaloverflow="false" style="width: 862px; max-height: 261px;"><div class="textElement"><div><span class="variableNameElement">G = </span></div><div>Faust size 14x20, density 1.32143, nnz_sum 370, 3 factor(s):
- FACTOR 0 (double) DENSE, size 14x14, density 0.5, nnz 98
- FACTOR 1 (double) DENSE, size 14x16, density 0.5, nnz 112
- FACTOR 2 (double) DENSE, size 16x20, density 0.5, nnz 160</div></div></div></div></div></div><div class = 'S7'><span>G is a real </span><span style=' font-family: monospace;'>Faust</span><span> (the default scalar type is double). In the </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#adf468bdd261c93f719fd2ecc8d4a4254"><span>rand()</span></a><span> call </span><span style=' font-family: monospace;'>num_factors</span><span> value (</span><span style=' font-family: monospace;'>[2, 5]</span><span>) defines the bounds in which we want the number of factors to be and likewise the </span><span style=' font-family: monospace;'>dim_sizes</span><span> argument defines the bounds in which to randomly choose the sizes of the two dimensions of each intermediary factor composing the Faust. The sizes are chosen to keep G consistent though, this is a matrix product! </span></div><div class = 'S1'><span>The</span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8"><span> rand()</span></a><span> function will surely be of a great help if you want to test the </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span style=' font-family: monospace;'>Faust</span></a><span> member functions. A second notebook might guide you in this road: </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/Faust_manipulation.mlx.html"><span>How to Manipulate a Faust</span></a><span>.</span></div><h3 class = 'S2'><span>4. Other Ways of Creation</span></h3><div class = 'S1'><span>There exist many ways to create a </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span>Faust</span></a><span>, please look at the package documentation for more information. It would be the topic of another notebook! If you want, for example, to learn about </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span>Faust</span></a><span> generation based on the FAµST's factorization algorithms, check this notebook: </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/Faust_manipulation.mlx.html"><span>Using the FAµST Factorization Wrappers</span></a><span>.</span></div><div class = 'S1'><span style=' font-weight: bold;'>Note:</span><span> this livescript was executed using the following matfaust version:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre;"><span>matfaust.version()</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="E59BEF89" data-testid="output_5" data-width="832" data-height="20" data-hashorizontaloverflow="false" style="width: 862px; max-height: 261px;"><div class="textElement"><div><span class="variableNameElement">ans = </span>'3.27.2'</div></div></div></div></div></div></div><br>
- FACTOR 1 (complex) SPARSE, size 10x10, density 0.5, nnz 50
</div></div></div></div></div></div><div class = 'S7'><span>F is a complex </span><span style=' font-family: monospace;'>Faust</span><span>. Its rate of nonzeros, for each factor, is about 0.5. Since the </span><span style=' font-family: monospace;'>fac_type</span><span> argument is not set, each factor is sparse.</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre"><span >G = matfaust.rand(14, 20, </span><span style="color: rgb(170, 4, 249);">'num_factors'</span><span >, [2, 5], </span><span style="color: rgb(170, 4, 249);">'dim_sizes'</span><span >, [14, 20], </span><span style="color: rgb(170, 4, 249);">'density'</span><span >, .5, </span><span style="color: rgb(170, 4, 249);">'fac_type'</span><span >, </span><span style="color: rgb(170, 4, 249);">'dense'</span><span >)</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="1FB5FF4F" data-testid="output_4" style="width: 716px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement eoOutputContent" data-width="686" data-height="64" data-hashorizontaloverflow="false" style="max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">G = </span></div><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">Faust size 14x20, density 1.09286, nnz_sum 306, 2 factor(s):
- FACTOR 0 (double) DENSE, size 14x18, density 0.5, nnz 126
- FACTOR 1 (double) DENSE, size 18x20, density 0.5, nnz 180
</div></div></div></div></div></div><div class = 'S7'><span>G is a real </span><span style=' font-family: monospace;'>Faust</span><span> (the default scalar type is double). In the </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#adf468bdd261c93f719fd2ecc8d4a4254"><span>rand()</span></a><span> call </span><span style=' font-family: monospace;'>num_factors</span><span> value (</span><span style=' font-family: monospace;'>[2, 5]</span><span>) defines the bounds in which we want the number of factors to be and likewise the </span><span style=' font-family: monospace;'>dim_sizes</span><span> argument defines the bounds in which to randomly choose the sizes of the two dimensions of each intermediary factor composing the Faust. The sizes are chosen to keep G consistent though, this is a matrix product! </span></div><div class = 'S1'><span>The</span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8"><span> rand()</span></a><span> function will surely be of a great help if you want to test the </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span style=' font-family: monospace;'>Faust</span></a><span> member functions. A second notebook might guide you in this road: </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/Faust_manipulation.mlx.html"><span>How to Manipulate a Faust</span></a><span>.</span></div><h3 class = 'S2'><span>4. Other Ways of Creation</span></h3><div class = 'S1'><span>There exist many ways to create a </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span>Faust</span></a><span>, please look at the package documentation for more information. It would be the topic of another notebook! If you want, for example, to learn about </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html"><span>Faust</span></a><span> generation based on the FAµST's factorization algorithms, check this notebook: </span><a href = "https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/Faust_manipulation.mlx.html"><span>Using the FAµST Factorization Wrappers</span></a><span>.</span></div><div class = 'S1'><span style=' font-weight: bold;'>Note:</span><span> this livescript was executed using the following matfaust version:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div class = 'S8'><span style="white-space: pre"><span >matfaust.version()</span></span></div><div class = 'S6'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="DA2E8328" data-testid="output_5" style="width: 716px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement eoOutputContent" data-width="686" data-height="21" data-hashorizontaloverflow="false" style="max-height: 261px; white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: pre; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">ans = </span>'3.38.9'</div></div></div></div></div></div>
<br>
<!--
##### SOURCE BEGIN #####
%% *How to Create a Faust*
% **
%% 1. Setting the Factors Manually
% **
%
% 1. Setting the Factors Manually
%
%
% Let's start by creating a <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html
% Faust> manually, that is factor by factor.
......@@ -81,17 +88,20 @@ F = Faust(factors)
% its density, the number of nonzeros it contains (|nnz_sum|) along with all its
% factors.
%
% You can also call |<https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html#a3132f572e58e6c312d5535d0e075735e
% disp(F)>| to get all the information.
% You can also call <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html#a3132f572e58e6c312d5535d0e075735e
% |disp(F)|> to get all the information.
disp(F)
%%
% **
%% *2. Faust File Loading*
% **
% Note that when you don't need |F| anymore, you can delete it with the instruction
% |delete(F)| or |clear F|. Normally, that's the role of the garbage collector
% but it might happen that your Faust is very eager in memory and a manual deletion
% is necessary.
% *2. Faust File Loading*
%
%
% It's really handy to create a |Faust| and retrieve it from a file later.
% Let's see in the code below how to proceed.
% It's really handy to create a |Faust| and retrieve it from a file later. Let's
% see in the code below how to proceed.
%
% First save the Faust.
......@@ -106,11 +116,11 @@ file_F = Faust('F.mat')
% pyfaust>, the Python wrapper. You can easily reload the |F.mat| file from pyfaust.
%
%
%% 3. Generating a Random Faust
% 3. Generating a Random Faust
%
%
% The matfaust package provides functions for generating |Faust| objects
% by many manners. One noticeable function of this package is <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8
% The matfaust package provides functions for generating |Faust| objects by
% many manners. One noticeable function of this package is <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8
% rand()>. This function allows to generate a random |Faust| satisfying certain
% constraints; the number of factors, the size of these factors, the density,
% the scalar type, etc.
......@@ -119,8 +129,8 @@ file_F = Faust('F.mat')
F = matfaust.rand(10, 10, 'num_factors', 2, 'density', .5, 'field', 'complex')
%%
% F is a complex |Faust|. Its rate of nonzeros, for each factor, is about
% 0.5. Since the |fac_type| argument is not set, each factor is sparse.
% F is a complex |Faust|. Its rate of nonzeros, for each factor, is about 0.5.
% Since the |fac_type| argument is not set, each factor is sparse.
G = matfaust.rand(14, 20, 'num_factors', [2, 5], 'dim_sizes', [14, 20], 'density', .5, 'fac_type', 'dense')
%%
......@@ -132,10 +142,10 @@ G = matfaust.rand(14, 20, 'num_factors', [2, 5], 'dim_sizes', [14, 20], 'density
% though, this is a matrix product!
%
% The<https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/namespacematfaust.html#a3147203d17e3b1426ca830a6a893e3b8
% rand()> function will surely be of a great help if you want to test the |<https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html
% Faust>| member functions. A second notebook might guide you in this road: <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/Faust_manipulation.mlx.html
% rand()> function will surely be of a great help if you want to test the <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html
% |Faust|> member functions. A second notebook might guide you in this road: <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/Faust_manipulation.mlx.html
% How to Manipulate a Faust>.
%% 4. Other Ways of Creation
% 4. Other Ways of Creation
% There exist many ways to create a <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html
% Faust>, please look at the package documentation for more information. It would
% be the topic of another notebook! If you want, for example, to learn about <https://faustgrp.gitlabpages.inria.fr/faust/last-doc/html/classmatfaust_1_1Faust.html
......@@ -147,4 +157,5 @@ G = matfaust.rand(14, 20, 'num_factors', [2, 5], 'dim_sizes', [14, 20], 'density
matfaust.version()
##### SOURCE END #####
--></body></html>
\ No newline at end of file
-->
</div></body></html>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment