1
0
Files
computational-math/Л4-В6/Блоксхема.drawio
2024-04-22 01:04:56 +03:00

206 lines
16 KiB
Plaintext

<mxfile host="app.diagrams.net" modified="2024-04-21T20:49:14.389Z" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36" etag="L70BZ2SPwnqLO1KppO7W" version="24.2.7" type="device" pages="2">
<diagram name="difference_n" id="QT74YzUSpF6bmaEzPSn7">
<mxGraphModel dx="472" dy="736" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="DQ9j4h5ksd5OBPriSE9t-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-1" target="DQ9j4h5ksd5OBPriSE9t-2">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-1" value="difference_n(func, x_array, n)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="229.5" y="150" width="230" height="30" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-2" target="DQ9j4h5ksd5OBPriSE9t-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-2" value="result = 0" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="295" y="210" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-7" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-4" target="DQ9j4h5ksd5OBPriSE9t-6">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-4" target="DQ9j4h5ksd5OBPriSE9t-19">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="490" y="290" />
<mxPoint x="490" y="760" />
<mxPoint x="345" y="760" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-4" value="k = 0(1)n" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="290" y="270" width="110" height="40" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-10" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-6" target="DQ9j4h5ksd5OBPriSE9t-9">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-6" value="prod = 1" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="295" y="340" width="100" height="40" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-8" target="DQ9j4h5ksd5OBPriSE9t-13">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-8">
<mxGeometry relative="1" as="geometry">
<mxPoint x="345" y="620" as="targetPoint" />
<Array as="points">
<mxPoint x="440" y="505" />
<mxPoint x="440" y="620" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-8" value="j != k" style="rhombus;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="305" y="480" width="80" height="50" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-11" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-9" target="DQ9j4h5ksd5OBPriSE9t-8">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-9" target="DQ9j4h5ksd5OBPriSE9t-12">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="460" y="430" />
<mxPoint x="460" y="650" />
<mxPoint x="344" y="650" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-9" value="j = 0(1)n" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="290" y="410" width="110" height="40" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-12" target="DQ9j4h5ksd5OBPriSE9t-4">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="345" y="740" />
<mxPoint x="210" y="740" />
<mxPoint x="210" y="290" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-12" value="result += func(x_array[k]) / prod" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="276" y="670" width="137" height="50" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-13" target="DQ9j4h5ksd5OBPriSE9t-9">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="345" y="620" />
<mxPoint x="240" y="620" />
<mxPoint x="240" y="430" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-13" value="prod *= x_array[k] - x_array[j]" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="260" y="560" width="170" height="40" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-24" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="DQ9j4h5ksd5OBPriSE9t-19" target="DQ9j4h5ksd5OBPriSE9t-23">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-19" value="return result" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="296.75" y="780" width="95.5" height="30" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-21" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="340" y="528" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-22" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="380" y="478" width="40" height="30" as="geometry" />
</mxCell>
<mxCell id="DQ9j4h5ksd5OBPriSE9t-23" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="295" y="840" width="100" height="30" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
<diagram id="YRw7BwRxA9GMbmWKKpqw" name="forward_interpolate">
<mxGraphModel dx="477" dy="613" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="FBLyEU0xljRjRjxMH2o2-1" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-2" target="FBLyEU0xljRjRjxMH2o2-4">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-2" value="forward_interpolate(func, x_array, x)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="229.5" y="140" width="230" height="40" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-3" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-4" target="FBLyEU0xljRjRjxMH2o2-7">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-4" value="n = len(x_array)&lt;div&gt;L = func(x_array[0])&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="263.5" y="200" width="163" height="40" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-5" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-7" target="FBLyEU0xljRjRjxMH2o2-26">
<mxGeometry relative="1" as="geometry">
<mxPoint x="345" y="330" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-7" target="FBLyEU0xljRjRjxMH2o2-21">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="490" y="290" />
<mxPoint x="490" y="650" />
<mxPoint x="345" y="650" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-7" value="k = 1(1)n-1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="290" y="270" width="110" height="40" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-8" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-26" target="FBLyEU0xljRjRjxMH2o2-15">
<mxGeometry relative="1" as="geometry">
<mxPoint x="345" y="380" as="sourcePoint" />
</mxGeometry>
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-15" target="FBLyEU0xljRjRjxMH2o2-17">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="460" y="430" />
<mxPoint x="460" y="560" />
<mxPoint x="345" y="560" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-25" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-15" target="FBLyEU0xljRjRjxMH2o2-19">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-15" value="i = 0(1)k-1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="290" y="410" width="110" height="40" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-16" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-17" target="FBLyEU0xljRjRjxMH2o2-7">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="345" y="640" />
<mxPoint x="210" y="640" />
<mxPoint x="210" y="290" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-17" value="L += prod" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="292.5" y="585" width="104" height="35" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-18" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-19" target="FBLyEU0xljRjRjxMH2o2-15">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="345" y="540" />
<mxPoint x="240" y="540" />
<mxPoint x="240" y="430" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-19" value="prod *= x - x_array[i]" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="260" y="480" width="170" height="40" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Cascadia Code;" edge="1" parent="1" source="FBLyEU0xljRjRjxMH2o2-21" target="FBLyEU0xljRjRjxMH2o2-24">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-21" value="return L" style="rounded=0;whiteSpace=wrap;html=1;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="296.75" y="670" width="95.5" height="30" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-24" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fontFamily=Cascadia Code;" vertex="1" parent="1">
<mxGeometry x="295" y="720" width="100" height="30" as="geometry" />
</mxCell>
<mxCell id="FBLyEU0xljRjRjxMH2o2-26" value="&lt;span style=&quot;font-family: &amp;quot;Cascadia Code&amp;quot;;&quot;&gt;prod = difference_n(func, x_array, k)&lt;/span&gt;" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;size=0.07142857142857142;" vertex="1" parent="1">
<mxGeometry x="264" y="330" width="162.5" height="60" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>