diff --git a/Doc/Sd1/Ref/Statements/doWhile.svg b/Doc/Sd1/Ref/Statements/doWhile.svg new file mode 100644 index 0000000000000000000000000000000000000000..0eea1d9255bfae1359d0ffd091edbf7ba5e3a759 --- /dev/null +++ b/Doc/Sd1/Ref/Statements/doWhile.svg @@ -0,0 +1,1016 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:ns1="http://sozi.baierouge.fr" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="doWhile.svg" + inkscape:version="0.92.1 r15371" + version="1.2" + id="svg2" + height="420" + width="412"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.7079545" + inkscape:cx="229.98059" + inkscape:cy="226.15953" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1105" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="false" + inkscape:guide-bbox="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + originy="-262.20473" + originx="0" + id="grid1569" + type="xygrid" /> + </sodipodi:namedview> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker2318" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path2316" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4887" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path4627" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6797" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6799" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6793" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6795" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6778" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6514" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lstart" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lstart"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path3841" /> + </marker> + <marker + inkscape:stockid="SquareM" + orient="auto" + refY="0" + refX="0" + id="SquareM" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path3914" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lend" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path3844" /> + </marker> + <marker + style="overflow:visible" + id="DiamondM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondM"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path3923" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMH" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMH"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path4656" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendB" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendB"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path4659" /> + </marker> + <marker + inkscape:stockid="SquareMU" + orient="auto" + refY="0" + refX="0" + id="SquareMU" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path5221" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lend3" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend3"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path5224" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMo" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMo"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path5799" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendO" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendO"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path5802" /> + </marker> + <marker + style="overflow:visible" + id="DiamondM1" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondM1"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path6393" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendV" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendV"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6396" /> + </marker> + <marker + inkscape:stockid="SquareMN" + orient="auto" + refY="0" + refX="0" + id="SquareMN" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path7813" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LstartP" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LstartP"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path7816" /> + </marker> + <marker + inkscape:stockid="SquareMb" + orient="auto" + refY="0" + refX="0" + id="SquareMb" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path9491" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendX" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendX"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path9494" /> + </marker> + <marker + inkscape:stockid="SquareM8" + orient="auto" + refY="0" + refX="0" + id="SquareM8" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path10143" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendT" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendT"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path10146" /> + </marker> + <marker + inkscape:stockid="SquareMNT" + orient="auto" + refY="0" + refX="0" + id="SquareMNT" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path12195" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LstartPJ" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LstartPJ"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path12198" /> + </marker> + <marker + inkscape:stockid="SquareMNTL" + orient="auto" + refY="0" + refX="0" + id="SquareMNTL" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path12907" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lendx" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lendx"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path12910" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMoY" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMoY"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path13187" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendOe" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendOe"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path13190" /> + </marker> + <linearGradient + id="linearGradient3928-8"> + <stop + id="stop3930-2" + style="stop-color:#7c7c7c" + offset="0" /> + <stop + id="stop3932-0" + style="stop-color:#e6e3e3" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient8877"> + <stop + id="stop8879" + offset="0" + style="stop-color:#cecece;stop-opacity:1;" /> + <stop + id="stop8881" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient8869"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop8871" /> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="1" + id="stop8873" /> + </linearGradient> + <linearGradient + id="linearGradient7421"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop7423" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop7425" /> + </linearGradient> + <linearGradient + id="linearGradient7405"> + <stop + id="stop7407" + offset="0" + style="stop-color:#9e9e9e;stop-opacity:1;" /> + <stop + id="stop7409" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient7378"> + <stop + style="stop-color:#9e9e9e;stop-opacity:1;" + offset="0" + id="stop7380" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop7382" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="64 : 32 : 1" + inkscape:persp3d-origin="32 : 21.333333 : 1" + id="perspective6864" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-6"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-1" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-8" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-7"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-9" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-2" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-2"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-8" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-9" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-73"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-6" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-1" /> + <filter + id="imagebot_16-0" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-7" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-5" /> + <filter + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-0" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-4" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-8" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-02"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-9" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="35.173683" + y1="43.90382" + x2="36.048218" + xlink:href="#linearGradient3928-8" + y2="0.73097426" + id="imagebot_14-4" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-3"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-5" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-17" /> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-3" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-4" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-5" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="marker11618O" + orient="auto" + refY="0" + refX="0" + id="marker11618O" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path10547" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-5" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-4" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + transform="translate(0,-440.31499)" + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <text + id="text3004" + y="415.68225" + x="104.51711" + style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:1.06666672" + y="415.68225" + x="104.51711" + id="tspan3006" + sodipodi:role="line"> </tspan></text> + <text + id="text135" + y="597.2785" + x="24.408674" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none;" + xml:space="preserve"><tspan + y="597.2785" + x="24.408674" + id="tspan133" + sodipodi:role="line">condition</tspan><tspan + id="tspan137" + y="637.2785" + x="24.408674" + sodipodi:role="line">is true</tspan></text> + <text + id="text141" + y="751.79156" + x="246.39575" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="751.79156" + x="246.39575" + id="tspan139" + sodipodi:role="line">condition</tspan><tspan + id="tspan143" + y="791.79156" + x="246.39575" + sodipodi:role="line">is false</tspan></text> + <g + transform="translate(40,-24.99999)" + id="g4813"> + <path + style="fill:#1a1a1a;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 50,702.51971 120,50 110,-50 -110,-50 z" + id="path145" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="90.891823" + y="712.51971" + id="text4458"><tspan + sodipodi:role="line" + id="tspan4456" + x="90.891823" + y="712.51971">Condition</tspan></text> + </g> + <g + transform="translate(-40,-274.99999)" + id="g4808"> + <rect + style="fill:#000000;stroke-width:5.1639781;stroke-miterlimit:4;stroke-dasharray:none" + id="rect4803" + width="200" + height="40" + x="150" + y="782.51971" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="160" + y="812.51971" + id="text4462"><tspan + sodipodi:role="line" + id="tspan4460" + x="160" + y="812.51971">Code block</tspan></text> + </g> + <circle + r="5" + cy="377.51971" + cx="55" + id="path4820" + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="30" + rx="80" + cy="482.51971" + cx="130" + id="path4824" + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="10.051409" + rx="9.9901352" + cy="452.49548" + cx="209.45428" + id="path4828" + style="fill:#000000;stroke:none;stroke-width:0.57854682;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <g + transform="translate(-73.821037,259.10369)" + id="g4849"> + <ellipse + style="fill:#000000;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4828-7" + cx="285.07419" + cy="572.61981" + rx="15.003441" + ry="14.991529" /> + <ellipse + style="fill:none;stroke:#000000;stroke-width:0.90602088;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4845" + cx="285.07285" + cy="572.5061" + rx="19.461161" + ry="19.497755" /> + </g> + <path + inkscape:connector-curvature="0" + id="path4851-6" + d="m 210,462.51973 v 39.99999" + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6)" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path4851-6-7" + d="M 90,677.51972 H 50 10 v -150 h 95" + style="fill:none;stroke:#008000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-9)" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path4851-6-2" + d="m 320,677.51972 h 80 v 85 H 210 v 40" + style="fill:none;stroke:#ff0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-4)" /> + <path + inkscape:connector-curvature="0" + id="path4851-6-74" + d="m 210,552.51972 v 65" + style="fill:none;stroke:#000000;stroke-width:2.89087248;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-5)" /> + </g> + <script + id="sozi-script" + ns1:version="14.10-05142318">function namespace(b,d,a){var c=b;d.split(".").forEach(function(e){if(typeof c[e]==="undefined"){c[e]={}}c=c[e]});if(a){a(c,b)}return c}namespace(this,"sozi.events",function(b){var a={};b.listen=function(c,d){if(!a.hasOwnProperty(c)){a[c]=[]}a[c].push(d)};b.fire=function(d){var c=Array.prototype.slice.call(arguments,1);if(a.hasOwnProperty(d)){a[d].forEach(function(e){e.apply(null,c)})}}});namespace(this,"sozi.proto",function(a){a.Object={installConstructors:function(){function b(){}b.prototype=this;this.instance=function(){var c=new b();c.construct.apply(c,arguments);return c};this.subtype=function(d){var c=new b();c.augment(d);c.installConstructors();return c}},construct:function(){},augment:function(c){for(var b in c){if(c.hasOwnProperty(b)){this[b]=c[b]}}return this},bind:function(c){var b=this;return function(){return c.apply(b,arguments)}}};a.Object.installConstructors()});namespace(this,"sozi.actions",function(A,g){var u=namespace(g,"sozi.player");var v=namespace(g,"sozi.display");var n=g.document;var o=0;var w=1;var t=1.05;var y=5;var m=5;var r=false;var i=0;var h=0;function a(C,B,D){u.stop();v.viewPorts.player.zoom(C>0?t:1/t,B,D)}function x(B){u.stop();v.viewPorts.player.rotate(B>0?y:-y)}function s(){if(sozi.framelist.isVisible()){sozi.framelist.hide();u.restart()}else{u.stop();sozi.framelist.show()}}function d(B){return v.viewPorts.player.contains(B.clientX,B.clientY)}function f(B){if(!d(B)){return}if(B.button===o){n.documentElement.addEventListener("mousemove",q,false);r=false;i=B.clientX;h=B.clientY}else{if(B.button===w){s()}}B.stopPropagation();B.preventDefault()}function q(B){if(!d(B)){return}u.stop();if(!r&&(Math.abs(B.clientX-i)>m||Math.abs(B.clientY-h)>m)){r=true}if(r){sozi.events.fire("sozi.player.cleanup");v.viewPorts.player.drag(B.clientX-i,B.clientY-h);i=B.clientX;h=B.clientY}B.stopPropagation()}function c(B){if(!d(B)){return}if(B.button===o){n.documentElement.removeEventListener("mousemove",q,false)}B.stopPropagation();B.preventDefault()}function p(B){if(!d(B)){return}u.moveToPrevious();B.stopPropagation();B.preventDefault()}function e(B){if(!d(B)){return}if(!r&&B.button!==w){u.moveToNext()}B.stopPropagation();B.preventDefault()}function j(B){if(!d(B)){return}if(!B){B=g.event}var C=0;if(B.wheelDelta){C=B.wheelDelta}else{if(B.detail){C=-B.detail}}if(C!==0){if(B.shiftKey){x(C)}else{a(C,B.clientX,B.clientY)}}B.stopPropagation();B.preventDefault()}function l(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.charCode||B.which){case 43:a(1,g.innerWidth/2,g.innerHeight/2);break;case 45:a(-1,g.innerWidth/2,g.innerHeight/2);break;case 61:u.moveToCurrent();break;case 70:case 102:u.showAll();break;case 84:case 116:s();break;case 82:x(-1);break;case 114:x(1);break;default:return}B.stopPropagation();B.preventDefault()}function b(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.keyCode){case 36:if(B.shiftKey){u.jumpToFirst()}else{u.moveToFirst()}break;case 35:if(B.shiftKey){u.jumpToLast()}else{u.moveToLast()}break;case 38:case 33:case 37:if(B.shiftKey){u.jumpToPrevious()}else{u.moveToPrevious()}break;case 40:case 34:case 39:case 13:case 32:if(B.shiftKey){u.jumpToNext()}else{u.moveToNext()}break;default:return}B.stopPropagation();B.preventDefault()}function z(B){B.stopPropagation()}function k(){var C=n.getElementsByTagName("a");for(var D=0;D<C.length;D+=1){C[D].addEventListener("click",z,false);C[D].addEventListener("contextmenu",z,false)}var B=n.documentElement;B.addEventListener("click",e,false);B.addEventListener("mousedown",f,false);B.addEventListener("mouseup",c,false);B.addEventListener("contextmenu",p,false);B.addEventListener("DOMMouseScroll",j,false);g.onmousewheel=j;B.addEventListener("keypress",l,false);B.addEventListener("keydown",b,false)}sozi.events.listen("sozi.display.ready",k)});namespace(this,"sozi.animation",function(d,g){var h=g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame;var k=function(){return g.performance&&g.performance.now?g.performance.now():Date.now()};d.setAnimationFrameHandlers=function(l,m){h=l;k=m};var i=40;var c;var j=[];function e(){if(j.length>0){if(h){h(e)}j.forEach(function(l){l.step(k())})}else{if(!h){g.clearInterval(c)}}}function b(){if(h){h(e)}else{c=g.setInterval(function(){e(k())},i)}}function a(l){j.push(l);if(j.length===1){b()}}function f(l){j.splice(j.indexOf(l),1)}d.Animator=sozi.proto.Object.subtype({construct:function(){this.durationMs=0;this.data=null;this.initialTime=0;this.started=false},start:function(l,m){this.durationMs=l;this.data=m;this.initialTime=k();this.onStep(0);if(!this.started){this.started=true;a(this)}},stop:function(){if(this.started){f(this);this.started=false}},step:function(m){var l=m-this.initialTime;if(l>=this.durationMs){this.stop();this.onStep(1);this.onDone()}else{this.onStep(l/this.durationMs)}},onStep:function(l){},onDone:function(){}});d.profiles={linear:function(l){return l},accelerate:function(l){return Math.pow(l,3)},"strong-accelerate":function(l){return Math.pow(l,5)},decelerate:function(l){return 1-Math.pow(1-l,3)},"strong-decelerate":function(l){return 1-Math.pow(1-l,5)},"accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,3)/2;return l<=0.5?n:1-n},"strong-accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,5)/2;return l<=0.5?n:1-n},"decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,2))/2;return l<=0.5?n:1-n},"strong-decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,3))/2;return l<=0.5?n:1-n},"immediate-beginning":function(l){return 1},"immediate-end":function(l){return l===1?1:0},"immediate-middle":function(l){return l>=0.5?1:0}}});namespace(this,"sozi.display",function(c,g){var f="http://www.w3.org/2000/svg";var b="http://www.w3.org/1999/xlink";var i=g.document;var k;var h;var j;c.viewPorts={};var e;c.CameraState=sozi.proto.Object.subtype({construct:function(){this.cx=this.cy=0;this.width=this.height=1;this.angle=0;this.clipped=true;this.transitionZoomPercent=0;this.transitionProfile=sozi.animation.profiles.linear;this.transitionPath=null},setCenter:function(l,m){this.cx=l;this.cy=m;return this},setSize:function(m,l){this.width=m;this.height=l;return this},setClipped:function(l){this.clipped=l;return this},setAngle:function(l){this.angle=(l+180)%360-180;return this},setRawAngle:function(l){this.angle=l;return this},setTransitionZoomPercent:function(l){this.transitionZoomPercent=l;return this},setTransitionProfile:function(l){this.transitionProfile=l;return this},setTransitionPath:function(l){this.transitionPath=l;return this},setAtElement:function(p){var s,o,t,m;if(p.nodeName==="rect"){s=p.x.baseVal.value;o=p.y.baseVal.value;t=p.width.baseVal.value;m=p.height.baseVal.value}else{var q=p.getBBox();s=q.x;o=q.y;t=q.width;m=q.height}var n=i.documentElement.createSVGPoint();n.x=s+t/2;n.y=o+m/2;var r=p.getCTM();n=n.matrixTransform(r);var l=Math.sqrt(r.a*r.a+r.b*r.b);return this.setCenter(n.x,n.y).setSize(t*l,m*l).setAngle(Math.atan2(r.b,r.a)*180/Math.PI)},setAtState:function(l){return this.setCenter(l.cx,l.cy).setSize(l.width,l.height).setAngle(l.angle).setClipped(l.clipped).setTransitionZoomPercent(l.transitionZoomPercent).setTransitionProfile(l.transitionProfile).setTransitionPath(l.transitionPath)},interpolatableAttributes:["width","height","angle"],interpolate:function(n,o,t,v,r){var p=1-t;for(var q=0;q<this.interpolatableAttributes.length;q+=1){var s=this.interpolatableAttributes[q];this[s]=o[s]*t+n[s]*p}var l=r?n.transitionPath:o.transitionPath;if(v&&l){var x=l.getTotalLength();if(r){var m=l.getPointAtLength(x);var u=l.getPointAtLength(0);var w=l.getPointAtLength(x*p)}else{var m=l.getPointAtLength(0);var u=l.getPointAtLength(x);var w=l.getPointAtLength(x*t)}this.cx=w.x+(o.cx-u.x)*t+(n.cx-m.x)*p;this.cy=w.y+(o.cy-u.y)*t+(n.cy-m.y)*p}else{this.cx=o.cx*t+n.cx*p;this.cy=o.cy*t+n.cy*p}}});c.Camera=c.CameraState.subtype({construct:function(n,o){c.CameraState.construct.call(this);this.viewPort=n;this.svgClipRect=i.createElementNS(f,"rect");var m=i.createElementNS(f,"clipPath");m.setAttribute("id","sozi-clip-path-"+n.id+"-"+o);m.appendChild(this.svgClipRect);n.svgGroup.appendChild(m);var l=i.createElementNS(f,"g");l.setAttribute("clip-path","url(#sozi-clip-path-"+n.id+"-"+o+")");n.svgGroup.appendChild(l);if(n.isPrimary){this.svgLayer=i.createElementNS(f,"g");this.svgLayer.appendChild(i.getElementById(o))}else{this.svgLayer=i.createElementNS(f,"use");this.svgLayer.setAttributeNS(b,"href","#"+o)}l.appendChild(this.svgLayer)},setAtState:function(l){return c.CameraState.setAtState.call(this,l).update()},getScale:function(){return Math.min(this.viewPort.width/this.width,this.viewPort.height/this.height)},rotate:function(l){return this.setAngle(this.angle+l).update()},zoom:function(m,l,n){return this.setSize(this.width/m,this.height/m).drag((1-m)*(l-this.viewPort.width/2),(1-m)*(n-this.viewPort.height/2))},drag:function(m,l){var q=this.getScale();var o=this.angle*Math.PI/180;var n=Math.sin(o);var p=Math.cos(o);return this.setCenter(this.cx-(m*p-l*n)/q,this.cy-(m*n+l*p)/q).setClipped(false).update()},update:function(){var q=this.getScale();var n=this.width*q;var m=this.height*q;var l=(this.viewPort.width-n)/2;var r=(this.viewPort.height-m)/2;this.svgClipRect.setAttribute("x",this.clipped?l:0);this.svgClipRect.setAttribute("y",this.clipped?r:0);this.svgClipRect.setAttribute("width",this.clipped?n:this.viewPort.width);this.svgClipRect.setAttribute("height",this.clipped?m:this.viewPort.height);var p=-this.cx+this.width/2+l/q;var o=-this.cy+this.height/2+r/q;this.svgLayer.setAttribute("transform","scale("+q+")translate("+p+","+o+")rotate("+(-this.angle)+","+this.cx+","+this.cy+")");return this}});c.ViewPort=sozi.proto.Object.subtype({construct:function(n,m,l){this.id=n;c.viewPorts[n]=this;this.isPrimary=!!l;if(this.isPrimary){if(e){throw"Failed to create a primary viewport. A primary viewport already exists."}else{e=this}}this.svgGroup=i.createElementNS(f,"g");this.svgGroup.setAttribute("class","sozi-viewport");this.svgGroup.setAttribute("id","sozi-viewport-"+n);i.documentElement.appendChild(this.svgGroup);this.setLocation(0,0).setSize(g.innerWidth,g.innerHeight);this.cameras={};m.forEach(function(o){this.cameras[o]=c.Camera.instance(this,o)},this)},setSize:function(m,l){this.width=m;this.height=l;return this},setLocation:function(l,m){this.x=l;this.y=m;return this},contains:function(l,m){return l>=this.x&&l<this.x+this.width&&m>=this.y&&m<this.y+this.height},getDocumentState:function(){var m=c.CameraState.instance().setCenter(k.x+k.width/2,k.y+k.height/2).setSize(k.width,k.height).setClipped(false);var l={};for(var n in this.cameras){l[n]=m}return l},update:function(){this.svgGroup.setAttribute("transform","translate("+this.x+","+this.y+")");for(var l in this.cameras){this.cameras[l].update()}return this},showFrame:function(l){for(var m in l.states){this.cameras[m].setAtState(l.states[m])}return this},drag:function(m,l){for(var n in this.cameras){this.cameras[n].drag(m,l)}return this},zoom:function(m,l,o){for(var n in this.cameras){this.cameras[n].zoom(m,l,o)}return this},rotate:function(l){for(var m in this.cameras){this.cameras[m].rotate(l)}return this},onWindowResize:function(m,l){this.setLocation(this.x*m,this.y*l).setSize(this.width*m,this.height*l).update()}});function d(){var l=i.documentElement;k=l.getBBox();h=g.innerWidth;j=g.innerHeight;l.setAttribute("width",h);l.setAttribute("height",j);sozi.events.fire("sozi.display.ready")}function a(){var l=i.documentElement;l.setAttribute("width",g.innerWidth);l.setAttribute("height",g.innerHeight);for(var m in c.viewPorts){c.viewPorts[m].onWindowResize(g.innerWidth/h,g.innerHeight/j)}h=g.innerWidth;j=g.innerHeight}sozi.events.listen("sozi.document.ready",d);g.addEventListener("resize",a,false)});namespace(this,"sozi.document",function(c,e){var g=e.document;var b="http://sozi.baierouge.fr";var d={title:"Untitled",sequence:"0",hide:"true",clip:"true","show-in-frame-list":"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear","transition-path-hide":"true"};var h=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"];c.frames=[];c.idLayerList=[];function j(l,k){return l.getAttributeNS(b,k)||d[k]}function i(o,p,k){var l=o.states[p]=o.states[p]||sozi.display.CameraState.instance();if(typeof l.transitionZoomPercent==="undefined"||k.hasAttributeNS(b,"transition-zoom-percent")){l.setTransitionZoomPercent(parseInt(j(k,"transition-zoom-percent"),10))}if(typeof l.transitionProfile==="undefined"||k.hasAttributeNS(b,"transition-profile")){l.setTransitionProfile(sozi.animation.profiles[j(k,"transition-profile")])}if(typeof l.transitionPath==="undefined"||k.hasAttributeNS(b,"transition-path")){var n=g.getElementById(k.getAttributeNS(b,"transition-path"));if(n&&n.nodeName==="path"){l.setTransitionPath(n);if(j(k,"transition-path-hide")==="true"){n.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"refid")){var m=g.getElementById(k.getAttributeNS(b,"refid"));if(m){l.setAtElement(m);if(j(k,"hide")==="true"){m.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"clip")){l.setClipped(j(k,"clip")==="true")}}function a(){var l=[];var p=g.getElementsByTagNameNS(b,"layer");for(var n=0;n<p.length;n+=1){var s=p[n].getAttributeNS(b,"group");if(s&&l.indexOf(s)===-1){l.push(s)}}var r=g.documentElement;var o="http://www.w3.org/2000/svg";var q=g.createElementNS(o,"g");var k=Array.prototype.slice.call(r.childNodes);k.forEach(function(u,t){if(!u.getAttribute){r.removeChild(u)}else{if(l.indexOf(u.getAttribute("id"))!==-1){if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+t);c.idLayerList.push("sozi-wrapper-"+t);r.insertBefore(q,u);q=g.createElementNS(o,"g")}c.idLayerList.push(u.getAttribute("id"))}else{if(h.indexOf(u.localName.toLowerCase())!==-1){r.removeChild(u);q.appendChild(u)}}}});if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+k.length);c.idLayerList.push("sozi-wrapper-"+k.length);r.appendChild(q)}var m=Array.prototype.slice.call(g.getElementsByTagNameNS(b,"frame"));m.sort(function(u,t){var w=parseInt(j(u,"sequence"),10);var v=parseInt(j(t,"sequence"),10);return w-v});m.forEach(function(v,u){var x={id:v.getAttribute("id"),title:j(v,"title"),showInFrameList:j(v,"show-in-frame-list")==="true",sequence:parseInt(j(v,"sequence"),10),timeoutEnable:j(v,"timeout-enable")==="true",timeoutMs:parseInt(j(v,"timeout-ms"),10),transitionDurationMs:parseInt(j(v,"transition-duration-ms"),10),states:{}};c.idLayerList.forEach(function(A){if(u===0||A.search("sozi-wrapper-[0-9]+")!==-1){i(x,A,v)}else{var z=x.states[A]=sozi.display.CameraState.instance();var y=c.frames[c.frames.length-1].states[A];z.setAtState(y)}});var t=Array.prototype.slice.call(v.getElementsByTagNameNS(b,"layer"));t.forEach(function(y){var z=y.getAttributeNS(b,"group");if(z&&c.idLayerList.indexOf(z)!==-1){i(x,z,y)}});for(var w in x.states){if(x.states.hasOwnProperty(w)){c.frames.push(x);break}}})}c.getFrameIndexForId=function(l){for(var k=0;k<c.frames.length;k+=1){if(c.frames[k].id===l){return k}}return -1};function f(){g.documentElement.removeAttribute("viewBox");a();sozi.events.fire("sozi.document.ready")}e.addEventListener("load",f,false)});namespace(this,"sozi.framelist",function(u,k){var o=k.document;var c=5;var i;var p;var j=0;var h;var s;var b;var v;var w;var t;var e=300;var f="decelerate";var a="http://www.w3.org/2000/svg";function n(z){var x=z.relatedTarget,y=o.documentElement;while(x&&x!==i&&x!==y){x=x.parentNode}if(x!==i){u.hide();sozi.player.restart();z.stopPropagation()}}function r(y){var x=p.getCTM().f;if(x<=-k.innerHeight/2){x+=k.innerHeight/2}else{if(x<0){x=0}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function d(y){var x=p.getCTM().f;if(x+j>=k.innerHeight*3/2){x-=k.innerHeight/2}else{if(x+j>k.innerHeight+2*c){x=k.innerHeight-j-4*c}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function g(x){return function(y){sozi.player.previewFrame(x);y.stopPropagation()}}function l(x){x.stopPropagation()}function q(){i=o.createElementNS(a,"g");i.setAttribute("id","sozi-toc");o.documentElement.appendChild(i);p=o.createElementNS(a,"g");i.appendChild(p);var y=o.createElementNS(a,"rect");y.setAttribute("id","sozi-toc-background");y.setAttribute("x",c);y.setAttribute("y",c);y.setAttribute("rx",c);y.setAttribute("ry",c);y.addEventListener("click",l,false);y.addEventListener("mousedown",l,false);y.addEventListener("mouseout",n,false);p.appendChild(y);var A=0;sozi.document.frames.forEach(function(D,E){if(D.showInFrameList){var C=o.createElementNS(a,"text");C.appendChild(o.createTextNode(D.title));C.setAttribute("id","sozi-toc-"+D.id);p.appendChild(C);if(E===sozi.player.currentFrameIndex){C.setAttribute("class","sozi-toc-current")}var B=C.getBBox().width;j+=C.getBBox().height;if(B>A){A=B}C.setAttribute("x",2*c);C.setAttribute("y",j+c);C.addEventListener("click",g(E),false);C.addEventListener("mousedown",l,false)}});var x=o.createElementNS(a,"path");x.setAttribute("class","sozi-toc-arrow");x.setAttribute("d","M"+(A+3*c)+","+(5*c)+" l"+(4*c)+",0 l-"+(2*c)+",-"+(3*c)+" z");x.addEventListener("click",r,false);x.addEventListener("mousedown",l,false);i.appendChild(x);var z=o.createElementNS(a,"path");z.setAttribute("class","sozi-toc-arrow");z.setAttribute("d","M"+(A+3*c)+","+(7*c)+" l"+(4*c)+",0 l-"+(2*c)+","+(3*c)+" z");z.addEventListener("click",d,false);z.addEventListener("mousedown",l,false);i.appendChild(z);y.setAttribute("width",A+7*c);y.setAttribute("height",j+2*c);h=-A-9*c;s=0;w=v=h;i.setAttribute("transform","translate("+h+",0)");t=sozi.animation.Animator.instance().augment({onStep:function(B){var D=sozi.animation.profiles[f](B),C=1-D;w=v*D+b*C;i.setAttribute("transform","translate("+w+",0)")}})}function m(x){var y=Array.prototype.slice.call(o.getElementsByClassName("sozi-toc-current"));y.forEach(function(A){A.removeAttribute("class")});var z=sozi.document.frames[x];if(z.showInFrameList){o.getElementById("sozi-toc-"+z.id).setAttribute("class","sozi-toc-current")}}u.show=function(){o.documentElement.appendChild(i);b=w;v=s;t.start(e)};u.hide=function(){b=w;v=h;t.start(e)};u.isVisible=function(){return v===s};sozi.events.listen("sozi.player.ready",q);sozi.events.listen("sozi.player.cleanup",u.hide);sozi.events.listen("sozi.player.framechange",m)});namespace(this,"sozi.framenumber",function(a,d){var g=d.document;var e;var k,i;var f;var b="http://www.w3.org/2000/svg";function h(){var m=k.getBBox(),n=Math.max(m.width,m.height)*0.75,l=n*1.25;f.setAttribute("r",n);e.setAttribute("transform","translate("+l+","+l+")")}function c(){e=g.createElementNS(b,"g");k=g.createElementNS(b,"text");f=g.createElementNS(b,"circle");e.setAttribute("id","sozi-framenumber");f.setAttribute("cx",0);f.setAttribute("cy",0);e.appendChild(f);i=g.createTextNode(sozi.player.currentFrameIndex+1);k.setAttribute("text-anchor","middle");k.setAttribute("dominant-baseline","central");k.setAttribute("x",0);k.setAttribute("y",0);k.appendChild(i);e.appendChild(k);g.documentElement.appendChild(e);h()}function j(l){i.nodeValue=l+1}sozi.events.listen("sozi.player.ready",c);sozi.events.listen("sozi.player.framechange",j)});namespace(this,"sozi.links",function(c,e){var b="http://www.w3.org/2000/svg";var a="http://www.w3.org/1999/xlink";function f(g){return function(h){sozi.player.moveToFrame(g);h.preventDefault();h.stopPropagation()}}function d(){var h=e.document.getElementsByTagNameNS(b,"a");for(var j=0;j<h.length;j+=1){var g=h[j].getAttributeNS(a,"href");if(g&&g[0]==="#"){h[j].addEventListener("click",f(sozi.location.getFrameIndexForHash(g)),false)}}}sozi.events.listen("sozi.document.ready",d)});namespace(this,"sozi.location",function(a,d){var b=false;a.getFrameIndex=function(){return a.getFrameIndexForHash(d.location.hash)};a.getFrameIndexForHash=function(g){var h=g?g.slice(1):"1";var f;if(/^[0-9]+$/.test(h)){f=parseInt(h,10)-1}else{f=sozi.document.getFrameIndexForId(h)}if(f<0){return 0}else{if(f>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return f}}};function e(){var f=a.getFrameIndex();if(!b){sozi.player.moveToFrame(f)}b=false}function c(f){b=true;d.location.hash="#"+sozi.document.frames[f].id}d.addEventListener("hashchange",e,false);sozi.events.listen("sozi.player.framechange",c)});namespace(this,"sozi.player",function(d,g){var l;var c;var i;var e=500;var n=-10;var j="linear";var f=0;d.currentFrameIndex=0;var k=false;var m=false;function h(){if(sozi.document.frames[d.currentFrameIndex].timeoutEnable){m=true;var o=(d.currentFrameIndex+1)%sozi.document.frames.length;i=g.setTimeout(function(){d.moveToFrame(o)},sozi.document.frames[d.currentFrameIndex].timeoutMs)}}d.startFromIndex=function(o){k=true;m=false;f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);h()};d.restart=function(){d.startFromIndex(d.currentFrameIndex)};d.stop=function(){c.stop();if(m){g.clearTimeout(i);m=false}k=false;f=d.currentFrameIndex};function b(o,y,w){var z={ss:((o<0)?Math.max(y,w):Math.min(y,w))*(100-o)/100,ts:0.5,k:0};if(o!==0){var s=y-w;var r=y-z.ss;var q=w-z.ss;if(s!==0){var p=Math.sqrt(r*q);var x=(r-p)/s;var t=(r+p)/s;z.ts=(x>0&&x<=1)?x:t}z.k=r/z.ts/z.ts}return z}d.jumpToFrame=function(o){d.stop();sozi.events.fire("sozi.player.cleanup");f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);sozi.events.fire("sozi.player.framechange",o)};d.getAnimationData=function(o,q,s,p,v,t){var r={};for(var w in o){r[w]={initialState:sozi.display.CameraState.instance(),finalState:sozi.display.CameraState.instance(),useTransitionPath:v,reverseTransitionPath:t};r[w].profile=p||q[w].transitionProfile;r[w].initialState.setAtState(o[w]);if(q.hasOwnProperty(w)){r[w].finalState.setAtState(q[w])}else{r[w].finalState.setAtState(o[w])}if(r[w].finalState.angle-r[w].initialState.angle>180){r[w].finalState.setRawAngle(r[w].finalState.angle-360)}else{if(r[w].finalState.angle-r[w].initialState.angle<-180){r[w].initialState.setRawAngle(r[w].initialState.angle-360)}}var u=s||q[w].transitionZoomPercent;if(u&&q.hasOwnProperty(w)){r[w].zoomWidth=b(u,o[w].width,q[w].width);r[w].zoomHeight=b(u,o[w].height,q[w].height)}}return r};d.previewFrame=function(o){d.currentFrameIndex=o;c.start(e,d.getAnimationData(l.cameras,sozi.document.frames[o].states,n,sozi.animation.profiles[j]),false,false);sozi.events.fire("sozi.player.framechange",o)};d.moveToFrame=function(r){if(m){g.clearTimeout(i);m=false}var q,t,s,p,o;if(r===(d.currentFrameIndex-1)%sozi.document.frames.length){q=sozi.document.frames[d.currentFrameIndex].transitionDurationMs;t=undefined;s=undefined;p=true;o=true}else{if(r===(d.currentFrameIndex+1)%sozi.document.frames.length){q=sozi.document.frames[r].transitionDurationMs;t=undefined;s=undefined;p=true;o=false}else{q=e;t=n;s=sozi.animation.profiles[j];p=false;o=false}}sozi.events.fire("sozi.player.cleanup");k=true;d.currentFrameIndex=r;c.start(q,d.getAnimationData(l.cameras,sozi.document.frames[r].states,t,s,p,o));sozi.events.fire("sozi.player.framechange",r)};d.jumpToFirst=function(){d.jumpToFrame(0)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var o=d.currentFrameIndex;if(!c.started||f<=d.currentFrameIndex){o-=1}if(o>=0){d.jumpToFrame(o)}};d.moveToPrevious=function(){for(var o=d.currentFrameIndex-1;o>=0;o-=1){var p=sozi.document.frames[o];if(!p.timeoutEnable||p.timeoutMs!==0){d.moveToFrame(o);break}}};d.jumpToNext=function(){var o=d.currentFrameIndex;if(!c.started||f>=d.currentFrameIndex){o+=1}if(o<sozi.document.frames.length){d.jumpToFrame(o)}};d.moveToNext=function(){if(d.currentFrameIndex<sozi.document.frames.length-1||sozi.document.frames[d.currentFrameIndex].timeoutEnable){d.moveToFrame((d.currentFrameIndex+1)%sozi.document.frames.length)}};d.jumpToLast=function(){d.jumpToFrame(sozi.document.frames.length-1)};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(d.currentFrameIndex)};d.showAll=function(){d.stop();sozi.events.fire("sozi.player.cleanup");c.start(e,d.getAnimationData(l.cameras,l.getDocumentState(),n,sozi.animation.profiles[j],false,false))};function a(){l=sozi.display.ViewPort.instance("player",sozi.document.idLayerList,true);d.startFromIndex(sozi.location.getFrameIndex());g.setTimeout(l.bind(l.update),1);sozi.events.fire("sozi.player.ready")}d.onAnimationStep=function(o,q){for(var s in q){var p=l.cameras[s];p.interpolate(q[s].initialState,q[s].finalState,q[s].profile(o),q[s].useTransitionPath,q[s].reverseTransitionPath);var r;if(q[s].zoomWidth&&q[s].zoomWidth.k!==0){r=o-q[s].zoomWidth.ts;p.width=q[s].zoomWidth.k*r*r+q[s].zoomWidth.ss}if(q[s].zoomHeight&&q[s].zoomHeight.k!==0){r=o-q[s].zoomHeight.ts;p.height=q[s].zoomHeight.k*r*r+q[s].zoomHeight.ss}p.setClipped(q[s].finalState.clipped)}l.update()};c=sozi.animation.Animator.instance().augment({onStep:function(o){d.onAnimationStep(o,this.data)},onDone:function(){for(var o in this.data){l.cameras[o].setAtState(this.data[o].finalState)}l.update();f=d.currentFrameIndex;if(k){h()}}});sozi.events.listen("sozi.display.ready",a)});</script> + <style + id="sozi-style" + ns1:version="14.10-05142318">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}#sozi-framenumber circle{stroke:#222;stroke-opacity:.1;stroke-width:4;fill:#222;fill-opacity:.9}#sozi-framenumber text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}</style> + <ns1:frame + ns1:refid="rect10351" + ns1:title="Gcd implementation" + ns1:sequence="1" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="2" + ns1:title="Gcd maven packaging" + ns1:refid="rect10841" /> + <ns1:frame + ns1:refid="rect11089" + ns1:title="Using Math.getGcd()" + ns1:sequence="3" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="4" + ns1:title="Fraction project" + ns1:refid="rect11381" /> + <ns1:frame + ns1:refid="rect11637" + ns1:title="Maven dependency definition" + ns1:sequence="5" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0" + ns1:transition-duration-ms="1000" + ns1:timeout-ms="5000" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="6" + ns1:title="Fraction depends on Gcd" + ns1:refid="rect11895" /> +</svg> diff --git a/Doc/Sd1/Ref/Statements/if.svg b/Doc/Sd1/Ref/Statements/if.svg new file mode 100644 index 0000000000000000000000000000000000000000..6ee1ecde817720bf8611b3395ea4214ead9982c1 --- /dev/null +++ b/Doc/Sd1/Ref/Statements/if.svg @@ -0,0 +1,1031 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:ns1="http://sozi.baierouge.fr" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="if.svg" + inkscape:version="0.92.1 r15371" + version="1.2" + id="svg2" + height="420" + width="412"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.7079545" + inkscape:cx="153.28065" + inkscape:cy="226.15953" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1105" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="false" + inkscape:guide-bbox="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + originy="-262.20473" + originx="0" + id="grid1569" + type="xygrid" /> + </sodipodi:namedview> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker2318" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path2316" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4887" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path4627" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6797" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6799" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6793" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6795" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6778" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6514" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lstart" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lstart"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path3841" /> + </marker> + <marker + inkscape:stockid="SquareM" + orient="auto" + refY="0" + refX="0" + id="SquareM" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path3914" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lend" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path3844" /> + </marker> + <marker + style="overflow:visible" + id="DiamondM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondM"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path3923" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMH" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMH"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path4656" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendB" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendB"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path4659" /> + </marker> + <marker + inkscape:stockid="SquareMU" + orient="auto" + refY="0" + refX="0" + id="SquareMU" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path5221" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lend3" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend3"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path5224" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMo" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMo"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path5799" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendO" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendO"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path5802" /> + </marker> + <marker + style="overflow:visible" + id="DiamondM1" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondM1"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path6393" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendV" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendV"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6396" /> + </marker> + <marker + inkscape:stockid="SquareMN" + orient="auto" + refY="0" + refX="0" + id="SquareMN" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path7813" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LstartP" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LstartP"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path7816" /> + </marker> + <marker + inkscape:stockid="SquareMb" + orient="auto" + refY="0" + refX="0" + id="SquareMb" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path9491" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendX" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendX"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path9494" /> + </marker> + <marker + inkscape:stockid="SquareM8" + orient="auto" + refY="0" + refX="0" + id="SquareM8" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path10143" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendT" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendT"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path10146" /> + </marker> + <marker + inkscape:stockid="SquareMNT" + orient="auto" + refY="0" + refX="0" + id="SquareMNT" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path12195" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LstartPJ" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LstartPJ"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path12198" /> + </marker> + <marker + inkscape:stockid="SquareMNTL" + orient="auto" + refY="0" + refX="0" + id="SquareMNTL" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path12907" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lendx" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lendx"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path12910" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMoY" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMoY"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path13187" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendOe" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendOe"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path13190" /> + </marker> + <linearGradient + id="linearGradient3928-8"> + <stop + id="stop3930-2" + style="stop-color:#7c7c7c" + offset="0" /> + <stop + id="stop3932-0" + style="stop-color:#e6e3e3" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient8877"> + <stop + id="stop8879" + offset="0" + style="stop-color:#cecece;stop-opacity:1;" /> + <stop + id="stop8881" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient8869"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop8871" /> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="1" + id="stop8873" /> + </linearGradient> + <linearGradient + id="linearGradient7421"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop7423" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop7425" /> + </linearGradient> + <linearGradient + id="linearGradient7405"> + <stop + id="stop7407" + offset="0" + style="stop-color:#9e9e9e;stop-opacity:1;" /> + <stop + id="stop7409" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient7378"> + <stop + style="stop-color:#9e9e9e;stop-opacity:1;" + offset="0" + id="stop7380" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop7382" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="64 : 32 : 1" + inkscape:persp3d-origin="32 : 21.333333 : 1" + id="perspective6864" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-6"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-1" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-8" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-7"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-9" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-2" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-2"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-8" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-9" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-73"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-6" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-1" /> + <filter + id="imagebot_16-0" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-7" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-5" /> + <filter + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-0" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-4" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-8" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-02"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-9" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="35.173683" + y1="43.90382" + x2="36.048218" + xlink:href="#linearGradient3928-8" + y2="0.73097426" + id="imagebot_14-4" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-3"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-5" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-17" /> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-3" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-4" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-5" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="marker11618O" + orient="auto" + refY="0" + refX="0" + id="marker11618O" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path10547" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-5" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-4" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-43" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-0" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + transform="translate(0,-440.31499)" + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <text + id="text3004" + y="415.68225" + x="104.51711" + style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:1.06666672" + y="415.68225" + x="104.51711" + id="tspan3006" + sodipodi:role="line"> </tspan></text> + <text + id="text135" + y="626.55334" + x="34.362103" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="626.55334" + x="34.362103" + id="tspan133" + sodipodi:role="line">condition</tspan><tspan + id="tspan137" + y="666.55334" + x="34.362103" + sodipodi:role="line">is true</tspan></text> + <text + id="text141" + y="620.6405" + x="258.10565" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="620.6405" + x="258.10565" + id="tspan139" + sodipodi:role="line">condition</tspan><tspan + id="tspan143" + y="660.6405" + x="258.10565" + sodipodi:role="line">is false</tspan></text> + <g + transform="translate(40,-144.99999)" + id="g4813"> + <path + style="fill:#1a1a1a;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 50,702.51971 120,50 110,-50 -110,-50 z" + id="path145" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="90.891823" + y="712.51971" + id="text4458"><tspan + sodipodi:role="line" + id="tspan4456" + x="90.891823" + y="712.51971">Condition</tspan></text> + </g> + <g + transform="translate(-45.137543,-104.99999)" + id="g4808"> + <rect + style="fill:#000000;stroke-width:5.1639781;stroke-miterlimit:4;stroke-dasharray:none" + id="rect4803" + width="200" + height="40" + x="150" + y="782.51971" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="160" + y="812.51971" + id="text4462"><tspan + sodipodi:role="line" + id="tspan4460" + x="160" + y="812.51971">Code block</tspan></text> + </g> + <circle + r="5" + cy="377.51971" + cx="55" + id="path4820" + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="30" + rx="80" + cy="482.51971" + cx="130" + id="path4824" + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="10.051409" + rx="9.9901352" + cy="452.49548" + cx="209.45428" + id="path4828" + style="fill:#000000;stroke:none;stroke-width:0.57854682;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <g + transform="translate(-73.821037,259.10369)" + id="g4849"> + <ellipse + style="fill:#000000;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4828-7" + cx="285.07419" + cy="572.61981" + rx="15.003441" + ry="14.991529" /> + <ellipse + style="fill:none;stroke:#000000;stroke-width:0.90602088;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4845" + cx="285.07285" + cy="572.5061" + rx="19.461161" + ry="19.497755" /> + </g> + <path + inkscape:connector-curvature="0" + id="path4851-6" + d="m 210,462.51973 v 39.99999" + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6)" /> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path4851-6-2" + d="m 320,557.51972 h 90 v 205 H 275 l -45,45" + style="fill:none;stroke:#ff0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-4)" /> + <path + inkscape:connector-curvature="0" + id="path4851-6-74" + d="m 210,607.51972 v 65" + style="fill:none;stroke:#008000;stroke-width:2.89087248;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-5)" /> + <path + inkscape:connector-curvature="0" + id="path4851-6-7" + d="m 210,717.51973 v 89.99999" + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-43)" + sodipodi:nodetypes="cc" /> + </g> + <script + id="sozi-script" + ns1:version="14.10-05142318">function namespace(b,d,a){var c=b;d.split(".").forEach(function(e){if(typeof c[e]==="undefined"){c[e]={}}c=c[e]});if(a){a(c,b)}return c}namespace(this,"sozi.events",function(b){var a={};b.listen=function(c,d){if(!a.hasOwnProperty(c)){a[c]=[]}a[c].push(d)};b.fire=function(d){var c=Array.prototype.slice.call(arguments,1);if(a.hasOwnProperty(d)){a[d].forEach(function(e){e.apply(null,c)})}}});namespace(this,"sozi.proto",function(a){a.Object={installConstructors:function(){function b(){}b.prototype=this;this.instance=function(){var c=new b();c.construct.apply(c,arguments);return c};this.subtype=function(d){var c=new b();c.augment(d);c.installConstructors();return c}},construct:function(){},augment:function(c){for(var b in c){if(c.hasOwnProperty(b)){this[b]=c[b]}}return this},bind:function(c){var b=this;return function(){return c.apply(b,arguments)}}};a.Object.installConstructors()});namespace(this,"sozi.actions",function(A,g){var u=namespace(g,"sozi.player");var v=namespace(g,"sozi.display");var n=g.document;var o=0;var w=1;var t=1.05;var y=5;var m=5;var r=false;var i=0;var h=0;function a(C,B,D){u.stop();v.viewPorts.player.zoom(C>0?t:1/t,B,D)}function x(B){u.stop();v.viewPorts.player.rotate(B>0?y:-y)}function s(){if(sozi.framelist.isVisible()){sozi.framelist.hide();u.restart()}else{u.stop();sozi.framelist.show()}}function d(B){return v.viewPorts.player.contains(B.clientX,B.clientY)}function f(B){if(!d(B)){return}if(B.button===o){n.documentElement.addEventListener("mousemove",q,false);r=false;i=B.clientX;h=B.clientY}else{if(B.button===w){s()}}B.stopPropagation();B.preventDefault()}function q(B){if(!d(B)){return}u.stop();if(!r&&(Math.abs(B.clientX-i)>m||Math.abs(B.clientY-h)>m)){r=true}if(r){sozi.events.fire("sozi.player.cleanup");v.viewPorts.player.drag(B.clientX-i,B.clientY-h);i=B.clientX;h=B.clientY}B.stopPropagation()}function c(B){if(!d(B)){return}if(B.button===o){n.documentElement.removeEventListener("mousemove",q,false)}B.stopPropagation();B.preventDefault()}function p(B){if(!d(B)){return}u.moveToPrevious();B.stopPropagation();B.preventDefault()}function e(B){if(!d(B)){return}if(!r&&B.button!==w){u.moveToNext()}B.stopPropagation();B.preventDefault()}function j(B){if(!d(B)){return}if(!B){B=g.event}var C=0;if(B.wheelDelta){C=B.wheelDelta}else{if(B.detail){C=-B.detail}}if(C!==0){if(B.shiftKey){x(C)}else{a(C,B.clientX,B.clientY)}}B.stopPropagation();B.preventDefault()}function l(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.charCode||B.which){case 43:a(1,g.innerWidth/2,g.innerHeight/2);break;case 45:a(-1,g.innerWidth/2,g.innerHeight/2);break;case 61:u.moveToCurrent();break;case 70:case 102:u.showAll();break;case 84:case 116:s();break;case 82:x(-1);break;case 114:x(1);break;default:return}B.stopPropagation();B.preventDefault()}function b(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.keyCode){case 36:if(B.shiftKey){u.jumpToFirst()}else{u.moveToFirst()}break;case 35:if(B.shiftKey){u.jumpToLast()}else{u.moveToLast()}break;case 38:case 33:case 37:if(B.shiftKey){u.jumpToPrevious()}else{u.moveToPrevious()}break;case 40:case 34:case 39:case 13:case 32:if(B.shiftKey){u.jumpToNext()}else{u.moveToNext()}break;default:return}B.stopPropagation();B.preventDefault()}function z(B){B.stopPropagation()}function k(){var C=n.getElementsByTagName("a");for(var D=0;D<C.length;D+=1){C[D].addEventListener("click",z,false);C[D].addEventListener("contextmenu",z,false)}var B=n.documentElement;B.addEventListener("click",e,false);B.addEventListener("mousedown",f,false);B.addEventListener("mouseup",c,false);B.addEventListener("contextmenu",p,false);B.addEventListener("DOMMouseScroll",j,false);g.onmousewheel=j;B.addEventListener("keypress",l,false);B.addEventListener("keydown",b,false)}sozi.events.listen("sozi.display.ready",k)});namespace(this,"sozi.animation",function(d,g){var h=g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame;var k=function(){return g.performance&&g.performance.now?g.performance.now():Date.now()};d.setAnimationFrameHandlers=function(l,m){h=l;k=m};var i=40;var c;var j=[];function e(){if(j.length>0){if(h){h(e)}j.forEach(function(l){l.step(k())})}else{if(!h){g.clearInterval(c)}}}function b(){if(h){h(e)}else{c=g.setInterval(function(){e(k())},i)}}function a(l){j.push(l);if(j.length===1){b()}}function f(l){j.splice(j.indexOf(l),1)}d.Animator=sozi.proto.Object.subtype({construct:function(){this.durationMs=0;this.data=null;this.initialTime=0;this.started=false},start:function(l,m){this.durationMs=l;this.data=m;this.initialTime=k();this.onStep(0);if(!this.started){this.started=true;a(this)}},stop:function(){if(this.started){f(this);this.started=false}},step:function(m){var l=m-this.initialTime;if(l>=this.durationMs){this.stop();this.onStep(1);this.onDone()}else{this.onStep(l/this.durationMs)}},onStep:function(l){},onDone:function(){}});d.profiles={linear:function(l){return l},accelerate:function(l){return Math.pow(l,3)},"strong-accelerate":function(l){return Math.pow(l,5)},decelerate:function(l){return 1-Math.pow(1-l,3)},"strong-decelerate":function(l){return 1-Math.pow(1-l,5)},"accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,3)/2;return l<=0.5?n:1-n},"strong-accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,5)/2;return l<=0.5?n:1-n},"decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,2))/2;return l<=0.5?n:1-n},"strong-decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,3))/2;return l<=0.5?n:1-n},"immediate-beginning":function(l){return 1},"immediate-end":function(l){return l===1?1:0},"immediate-middle":function(l){return l>=0.5?1:0}}});namespace(this,"sozi.display",function(c,g){var f="http://www.w3.org/2000/svg";var b="http://www.w3.org/1999/xlink";var i=g.document;var k;var h;var j;c.viewPorts={};var e;c.CameraState=sozi.proto.Object.subtype({construct:function(){this.cx=this.cy=0;this.width=this.height=1;this.angle=0;this.clipped=true;this.transitionZoomPercent=0;this.transitionProfile=sozi.animation.profiles.linear;this.transitionPath=null},setCenter:function(l,m){this.cx=l;this.cy=m;return this},setSize:function(m,l){this.width=m;this.height=l;return this},setClipped:function(l){this.clipped=l;return this},setAngle:function(l){this.angle=(l+180)%360-180;return this},setRawAngle:function(l){this.angle=l;return this},setTransitionZoomPercent:function(l){this.transitionZoomPercent=l;return this},setTransitionProfile:function(l){this.transitionProfile=l;return this},setTransitionPath:function(l){this.transitionPath=l;return this},setAtElement:function(p){var s,o,t,m;if(p.nodeName==="rect"){s=p.x.baseVal.value;o=p.y.baseVal.value;t=p.width.baseVal.value;m=p.height.baseVal.value}else{var q=p.getBBox();s=q.x;o=q.y;t=q.width;m=q.height}var n=i.documentElement.createSVGPoint();n.x=s+t/2;n.y=o+m/2;var r=p.getCTM();n=n.matrixTransform(r);var l=Math.sqrt(r.a*r.a+r.b*r.b);return this.setCenter(n.x,n.y).setSize(t*l,m*l).setAngle(Math.atan2(r.b,r.a)*180/Math.PI)},setAtState:function(l){return this.setCenter(l.cx,l.cy).setSize(l.width,l.height).setAngle(l.angle).setClipped(l.clipped).setTransitionZoomPercent(l.transitionZoomPercent).setTransitionProfile(l.transitionProfile).setTransitionPath(l.transitionPath)},interpolatableAttributes:["width","height","angle"],interpolate:function(n,o,t,v,r){var p=1-t;for(var q=0;q<this.interpolatableAttributes.length;q+=1){var s=this.interpolatableAttributes[q];this[s]=o[s]*t+n[s]*p}var l=r?n.transitionPath:o.transitionPath;if(v&&l){var x=l.getTotalLength();if(r){var m=l.getPointAtLength(x);var u=l.getPointAtLength(0);var w=l.getPointAtLength(x*p)}else{var m=l.getPointAtLength(0);var u=l.getPointAtLength(x);var w=l.getPointAtLength(x*t)}this.cx=w.x+(o.cx-u.x)*t+(n.cx-m.x)*p;this.cy=w.y+(o.cy-u.y)*t+(n.cy-m.y)*p}else{this.cx=o.cx*t+n.cx*p;this.cy=o.cy*t+n.cy*p}}});c.Camera=c.CameraState.subtype({construct:function(n,o){c.CameraState.construct.call(this);this.viewPort=n;this.svgClipRect=i.createElementNS(f,"rect");var m=i.createElementNS(f,"clipPath");m.setAttribute("id","sozi-clip-path-"+n.id+"-"+o);m.appendChild(this.svgClipRect);n.svgGroup.appendChild(m);var l=i.createElementNS(f,"g");l.setAttribute("clip-path","url(#sozi-clip-path-"+n.id+"-"+o+")");n.svgGroup.appendChild(l);if(n.isPrimary){this.svgLayer=i.createElementNS(f,"g");this.svgLayer.appendChild(i.getElementById(o))}else{this.svgLayer=i.createElementNS(f,"use");this.svgLayer.setAttributeNS(b,"href","#"+o)}l.appendChild(this.svgLayer)},setAtState:function(l){return c.CameraState.setAtState.call(this,l).update()},getScale:function(){return Math.min(this.viewPort.width/this.width,this.viewPort.height/this.height)},rotate:function(l){return this.setAngle(this.angle+l).update()},zoom:function(m,l,n){return this.setSize(this.width/m,this.height/m).drag((1-m)*(l-this.viewPort.width/2),(1-m)*(n-this.viewPort.height/2))},drag:function(m,l){var q=this.getScale();var o=this.angle*Math.PI/180;var n=Math.sin(o);var p=Math.cos(o);return this.setCenter(this.cx-(m*p-l*n)/q,this.cy-(m*n+l*p)/q).setClipped(false).update()},update:function(){var q=this.getScale();var n=this.width*q;var m=this.height*q;var l=(this.viewPort.width-n)/2;var r=(this.viewPort.height-m)/2;this.svgClipRect.setAttribute("x",this.clipped?l:0);this.svgClipRect.setAttribute("y",this.clipped?r:0);this.svgClipRect.setAttribute("width",this.clipped?n:this.viewPort.width);this.svgClipRect.setAttribute("height",this.clipped?m:this.viewPort.height);var p=-this.cx+this.width/2+l/q;var o=-this.cy+this.height/2+r/q;this.svgLayer.setAttribute("transform","scale("+q+")translate("+p+","+o+")rotate("+(-this.angle)+","+this.cx+","+this.cy+")");return this}});c.ViewPort=sozi.proto.Object.subtype({construct:function(n,m,l){this.id=n;c.viewPorts[n]=this;this.isPrimary=!!l;if(this.isPrimary){if(e){throw"Failed to create a primary viewport. A primary viewport already exists."}else{e=this}}this.svgGroup=i.createElementNS(f,"g");this.svgGroup.setAttribute("class","sozi-viewport");this.svgGroup.setAttribute("id","sozi-viewport-"+n);i.documentElement.appendChild(this.svgGroup);this.setLocation(0,0).setSize(g.innerWidth,g.innerHeight);this.cameras={};m.forEach(function(o){this.cameras[o]=c.Camera.instance(this,o)},this)},setSize:function(m,l){this.width=m;this.height=l;return this},setLocation:function(l,m){this.x=l;this.y=m;return this},contains:function(l,m){return l>=this.x&&l<this.x+this.width&&m>=this.y&&m<this.y+this.height},getDocumentState:function(){var m=c.CameraState.instance().setCenter(k.x+k.width/2,k.y+k.height/2).setSize(k.width,k.height).setClipped(false);var l={};for(var n in this.cameras){l[n]=m}return l},update:function(){this.svgGroup.setAttribute("transform","translate("+this.x+","+this.y+")");for(var l in this.cameras){this.cameras[l].update()}return this},showFrame:function(l){for(var m in l.states){this.cameras[m].setAtState(l.states[m])}return this},drag:function(m,l){for(var n in this.cameras){this.cameras[n].drag(m,l)}return this},zoom:function(m,l,o){for(var n in this.cameras){this.cameras[n].zoom(m,l,o)}return this},rotate:function(l){for(var m in this.cameras){this.cameras[m].rotate(l)}return this},onWindowResize:function(m,l){this.setLocation(this.x*m,this.y*l).setSize(this.width*m,this.height*l).update()}});function d(){var l=i.documentElement;k=l.getBBox();h=g.innerWidth;j=g.innerHeight;l.setAttribute("width",h);l.setAttribute("height",j);sozi.events.fire("sozi.display.ready")}function a(){var l=i.documentElement;l.setAttribute("width",g.innerWidth);l.setAttribute("height",g.innerHeight);for(var m in c.viewPorts){c.viewPorts[m].onWindowResize(g.innerWidth/h,g.innerHeight/j)}h=g.innerWidth;j=g.innerHeight}sozi.events.listen("sozi.document.ready",d);g.addEventListener("resize",a,false)});namespace(this,"sozi.document",function(c,e){var g=e.document;var b="http://sozi.baierouge.fr";var d={title:"Untitled",sequence:"0",hide:"true",clip:"true","show-in-frame-list":"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear","transition-path-hide":"true"};var h=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"];c.frames=[];c.idLayerList=[];function j(l,k){return l.getAttributeNS(b,k)||d[k]}function i(o,p,k){var l=o.states[p]=o.states[p]||sozi.display.CameraState.instance();if(typeof l.transitionZoomPercent==="undefined"||k.hasAttributeNS(b,"transition-zoom-percent")){l.setTransitionZoomPercent(parseInt(j(k,"transition-zoom-percent"),10))}if(typeof l.transitionProfile==="undefined"||k.hasAttributeNS(b,"transition-profile")){l.setTransitionProfile(sozi.animation.profiles[j(k,"transition-profile")])}if(typeof l.transitionPath==="undefined"||k.hasAttributeNS(b,"transition-path")){var n=g.getElementById(k.getAttributeNS(b,"transition-path"));if(n&&n.nodeName==="path"){l.setTransitionPath(n);if(j(k,"transition-path-hide")==="true"){n.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"refid")){var m=g.getElementById(k.getAttributeNS(b,"refid"));if(m){l.setAtElement(m);if(j(k,"hide")==="true"){m.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"clip")){l.setClipped(j(k,"clip")==="true")}}function a(){var l=[];var p=g.getElementsByTagNameNS(b,"layer");for(var n=0;n<p.length;n+=1){var s=p[n].getAttributeNS(b,"group");if(s&&l.indexOf(s)===-1){l.push(s)}}var r=g.documentElement;var o="http://www.w3.org/2000/svg";var q=g.createElementNS(o,"g");var k=Array.prototype.slice.call(r.childNodes);k.forEach(function(u,t){if(!u.getAttribute){r.removeChild(u)}else{if(l.indexOf(u.getAttribute("id"))!==-1){if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+t);c.idLayerList.push("sozi-wrapper-"+t);r.insertBefore(q,u);q=g.createElementNS(o,"g")}c.idLayerList.push(u.getAttribute("id"))}else{if(h.indexOf(u.localName.toLowerCase())!==-1){r.removeChild(u);q.appendChild(u)}}}});if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+k.length);c.idLayerList.push("sozi-wrapper-"+k.length);r.appendChild(q)}var m=Array.prototype.slice.call(g.getElementsByTagNameNS(b,"frame"));m.sort(function(u,t){var w=parseInt(j(u,"sequence"),10);var v=parseInt(j(t,"sequence"),10);return w-v});m.forEach(function(v,u){var x={id:v.getAttribute("id"),title:j(v,"title"),showInFrameList:j(v,"show-in-frame-list")==="true",sequence:parseInt(j(v,"sequence"),10),timeoutEnable:j(v,"timeout-enable")==="true",timeoutMs:parseInt(j(v,"timeout-ms"),10),transitionDurationMs:parseInt(j(v,"transition-duration-ms"),10),states:{}};c.idLayerList.forEach(function(A){if(u===0||A.search("sozi-wrapper-[0-9]+")!==-1){i(x,A,v)}else{var z=x.states[A]=sozi.display.CameraState.instance();var y=c.frames[c.frames.length-1].states[A];z.setAtState(y)}});var t=Array.prototype.slice.call(v.getElementsByTagNameNS(b,"layer"));t.forEach(function(y){var z=y.getAttributeNS(b,"group");if(z&&c.idLayerList.indexOf(z)!==-1){i(x,z,y)}});for(var w in x.states){if(x.states.hasOwnProperty(w)){c.frames.push(x);break}}})}c.getFrameIndexForId=function(l){for(var k=0;k<c.frames.length;k+=1){if(c.frames[k].id===l){return k}}return -1};function f(){g.documentElement.removeAttribute("viewBox");a();sozi.events.fire("sozi.document.ready")}e.addEventListener("load",f,false)});namespace(this,"sozi.framelist",function(u,k){var o=k.document;var c=5;var i;var p;var j=0;var h;var s;var b;var v;var w;var t;var e=300;var f="decelerate";var a="http://www.w3.org/2000/svg";function n(z){var x=z.relatedTarget,y=o.documentElement;while(x&&x!==i&&x!==y){x=x.parentNode}if(x!==i){u.hide();sozi.player.restart();z.stopPropagation()}}function r(y){var x=p.getCTM().f;if(x<=-k.innerHeight/2){x+=k.innerHeight/2}else{if(x<0){x=0}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function d(y){var x=p.getCTM().f;if(x+j>=k.innerHeight*3/2){x-=k.innerHeight/2}else{if(x+j>k.innerHeight+2*c){x=k.innerHeight-j-4*c}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function g(x){return function(y){sozi.player.previewFrame(x);y.stopPropagation()}}function l(x){x.stopPropagation()}function q(){i=o.createElementNS(a,"g");i.setAttribute("id","sozi-toc");o.documentElement.appendChild(i);p=o.createElementNS(a,"g");i.appendChild(p);var y=o.createElementNS(a,"rect");y.setAttribute("id","sozi-toc-background");y.setAttribute("x",c);y.setAttribute("y",c);y.setAttribute("rx",c);y.setAttribute("ry",c);y.addEventListener("click",l,false);y.addEventListener("mousedown",l,false);y.addEventListener("mouseout",n,false);p.appendChild(y);var A=0;sozi.document.frames.forEach(function(D,E){if(D.showInFrameList){var C=o.createElementNS(a,"text");C.appendChild(o.createTextNode(D.title));C.setAttribute("id","sozi-toc-"+D.id);p.appendChild(C);if(E===sozi.player.currentFrameIndex){C.setAttribute("class","sozi-toc-current")}var B=C.getBBox().width;j+=C.getBBox().height;if(B>A){A=B}C.setAttribute("x",2*c);C.setAttribute("y",j+c);C.addEventListener("click",g(E),false);C.addEventListener("mousedown",l,false)}});var x=o.createElementNS(a,"path");x.setAttribute("class","sozi-toc-arrow");x.setAttribute("d","M"+(A+3*c)+","+(5*c)+" l"+(4*c)+",0 l-"+(2*c)+",-"+(3*c)+" z");x.addEventListener("click",r,false);x.addEventListener("mousedown",l,false);i.appendChild(x);var z=o.createElementNS(a,"path");z.setAttribute("class","sozi-toc-arrow");z.setAttribute("d","M"+(A+3*c)+","+(7*c)+" l"+(4*c)+",0 l-"+(2*c)+","+(3*c)+" z");z.addEventListener("click",d,false);z.addEventListener("mousedown",l,false);i.appendChild(z);y.setAttribute("width",A+7*c);y.setAttribute("height",j+2*c);h=-A-9*c;s=0;w=v=h;i.setAttribute("transform","translate("+h+",0)");t=sozi.animation.Animator.instance().augment({onStep:function(B){var D=sozi.animation.profiles[f](B),C=1-D;w=v*D+b*C;i.setAttribute("transform","translate("+w+",0)")}})}function m(x){var y=Array.prototype.slice.call(o.getElementsByClassName("sozi-toc-current"));y.forEach(function(A){A.removeAttribute("class")});var z=sozi.document.frames[x];if(z.showInFrameList){o.getElementById("sozi-toc-"+z.id).setAttribute("class","sozi-toc-current")}}u.show=function(){o.documentElement.appendChild(i);b=w;v=s;t.start(e)};u.hide=function(){b=w;v=h;t.start(e)};u.isVisible=function(){return v===s};sozi.events.listen("sozi.player.ready",q);sozi.events.listen("sozi.player.cleanup",u.hide);sozi.events.listen("sozi.player.framechange",m)});namespace(this,"sozi.framenumber",function(a,d){var g=d.document;var e;var k,i;var f;var b="http://www.w3.org/2000/svg";function h(){var m=k.getBBox(),n=Math.max(m.width,m.height)*0.75,l=n*1.25;f.setAttribute("r",n);e.setAttribute("transform","translate("+l+","+l+")")}function c(){e=g.createElementNS(b,"g");k=g.createElementNS(b,"text");f=g.createElementNS(b,"circle");e.setAttribute("id","sozi-framenumber");f.setAttribute("cx",0);f.setAttribute("cy",0);e.appendChild(f);i=g.createTextNode(sozi.player.currentFrameIndex+1);k.setAttribute("text-anchor","middle");k.setAttribute("dominant-baseline","central");k.setAttribute("x",0);k.setAttribute("y",0);k.appendChild(i);e.appendChild(k);g.documentElement.appendChild(e);h()}function j(l){i.nodeValue=l+1}sozi.events.listen("sozi.player.ready",c);sozi.events.listen("sozi.player.framechange",j)});namespace(this,"sozi.links",function(c,e){var b="http://www.w3.org/2000/svg";var a="http://www.w3.org/1999/xlink";function f(g){return function(h){sozi.player.moveToFrame(g);h.preventDefault();h.stopPropagation()}}function d(){var h=e.document.getElementsByTagNameNS(b,"a");for(var j=0;j<h.length;j+=1){var g=h[j].getAttributeNS(a,"href");if(g&&g[0]==="#"){h[j].addEventListener("click",f(sozi.location.getFrameIndexForHash(g)),false)}}}sozi.events.listen("sozi.document.ready",d)});namespace(this,"sozi.location",function(a,d){var b=false;a.getFrameIndex=function(){return a.getFrameIndexForHash(d.location.hash)};a.getFrameIndexForHash=function(g){var h=g?g.slice(1):"1";var f;if(/^[0-9]+$/.test(h)){f=parseInt(h,10)-1}else{f=sozi.document.getFrameIndexForId(h)}if(f<0){return 0}else{if(f>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return f}}};function e(){var f=a.getFrameIndex();if(!b){sozi.player.moveToFrame(f)}b=false}function c(f){b=true;d.location.hash="#"+sozi.document.frames[f].id}d.addEventListener("hashchange",e,false);sozi.events.listen("sozi.player.framechange",c)});namespace(this,"sozi.player",function(d,g){var l;var c;var i;var e=500;var n=-10;var j="linear";var f=0;d.currentFrameIndex=0;var k=false;var m=false;function h(){if(sozi.document.frames[d.currentFrameIndex].timeoutEnable){m=true;var o=(d.currentFrameIndex+1)%sozi.document.frames.length;i=g.setTimeout(function(){d.moveToFrame(o)},sozi.document.frames[d.currentFrameIndex].timeoutMs)}}d.startFromIndex=function(o){k=true;m=false;f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);h()};d.restart=function(){d.startFromIndex(d.currentFrameIndex)};d.stop=function(){c.stop();if(m){g.clearTimeout(i);m=false}k=false;f=d.currentFrameIndex};function b(o,y,w){var z={ss:((o<0)?Math.max(y,w):Math.min(y,w))*(100-o)/100,ts:0.5,k:0};if(o!==0){var s=y-w;var r=y-z.ss;var q=w-z.ss;if(s!==0){var p=Math.sqrt(r*q);var x=(r-p)/s;var t=(r+p)/s;z.ts=(x>0&&x<=1)?x:t}z.k=r/z.ts/z.ts}return z}d.jumpToFrame=function(o){d.stop();sozi.events.fire("sozi.player.cleanup");f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);sozi.events.fire("sozi.player.framechange",o)};d.getAnimationData=function(o,q,s,p,v,t){var r={};for(var w in o){r[w]={initialState:sozi.display.CameraState.instance(),finalState:sozi.display.CameraState.instance(),useTransitionPath:v,reverseTransitionPath:t};r[w].profile=p||q[w].transitionProfile;r[w].initialState.setAtState(o[w]);if(q.hasOwnProperty(w)){r[w].finalState.setAtState(q[w])}else{r[w].finalState.setAtState(o[w])}if(r[w].finalState.angle-r[w].initialState.angle>180){r[w].finalState.setRawAngle(r[w].finalState.angle-360)}else{if(r[w].finalState.angle-r[w].initialState.angle<-180){r[w].initialState.setRawAngle(r[w].initialState.angle-360)}}var u=s||q[w].transitionZoomPercent;if(u&&q.hasOwnProperty(w)){r[w].zoomWidth=b(u,o[w].width,q[w].width);r[w].zoomHeight=b(u,o[w].height,q[w].height)}}return r};d.previewFrame=function(o){d.currentFrameIndex=o;c.start(e,d.getAnimationData(l.cameras,sozi.document.frames[o].states,n,sozi.animation.profiles[j]),false,false);sozi.events.fire("sozi.player.framechange",o)};d.moveToFrame=function(r){if(m){g.clearTimeout(i);m=false}var q,t,s,p,o;if(r===(d.currentFrameIndex-1)%sozi.document.frames.length){q=sozi.document.frames[d.currentFrameIndex].transitionDurationMs;t=undefined;s=undefined;p=true;o=true}else{if(r===(d.currentFrameIndex+1)%sozi.document.frames.length){q=sozi.document.frames[r].transitionDurationMs;t=undefined;s=undefined;p=true;o=false}else{q=e;t=n;s=sozi.animation.profiles[j];p=false;o=false}}sozi.events.fire("sozi.player.cleanup");k=true;d.currentFrameIndex=r;c.start(q,d.getAnimationData(l.cameras,sozi.document.frames[r].states,t,s,p,o));sozi.events.fire("sozi.player.framechange",r)};d.jumpToFirst=function(){d.jumpToFrame(0)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var o=d.currentFrameIndex;if(!c.started||f<=d.currentFrameIndex){o-=1}if(o>=0){d.jumpToFrame(o)}};d.moveToPrevious=function(){for(var o=d.currentFrameIndex-1;o>=0;o-=1){var p=sozi.document.frames[o];if(!p.timeoutEnable||p.timeoutMs!==0){d.moveToFrame(o);break}}};d.jumpToNext=function(){var o=d.currentFrameIndex;if(!c.started||f>=d.currentFrameIndex){o+=1}if(o<sozi.document.frames.length){d.jumpToFrame(o)}};d.moveToNext=function(){if(d.currentFrameIndex<sozi.document.frames.length-1||sozi.document.frames[d.currentFrameIndex].timeoutEnable){d.moveToFrame((d.currentFrameIndex+1)%sozi.document.frames.length)}};d.jumpToLast=function(){d.jumpToFrame(sozi.document.frames.length-1)};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(d.currentFrameIndex)};d.showAll=function(){d.stop();sozi.events.fire("sozi.player.cleanup");c.start(e,d.getAnimationData(l.cameras,l.getDocumentState(),n,sozi.animation.profiles[j],false,false))};function a(){l=sozi.display.ViewPort.instance("player",sozi.document.idLayerList,true);d.startFromIndex(sozi.location.getFrameIndex());g.setTimeout(l.bind(l.update),1);sozi.events.fire("sozi.player.ready")}d.onAnimationStep=function(o,q){for(var s in q){var p=l.cameras[s];p.interpolate(q[s].initialState,q[s].finalState,q[s].profile(o),q[s].useTransitionPath,q[s].reverseTransitionPath);var r;if(q[s].zoomWidth&&q[s].zoomWidth.k!==0){r=o-q[s].zoomWidth.ts;p.width=q[s].zoomWidth.k*r*r+q[s].zoomWidth.ss}if(q[s].zoomHeight&&q[s].zoomHeight.k!==0){r=o-q[s].zoomHeight.ts;p.height=q[s].zoomHeight.k*r*r+q[s].zoomHeight.ss}p.setClipped(q[s].finalState.clipped)}l.update()};c=sozi.animation.Animator.instance().augment({onStep:function(o){d.onAnimationStep(o,this.data)},onDone:function(){for(var o in this.data){l.cameras[o].setAtState(this.data[o].finalState)}l.update();f=d.currentFrameIndex;if(k){h()}}});sozi.events.listen("sozi.display.ready",a)});</script> + <style + id="sozi-style" + ns1:version="14.10-05142318">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}#sozi-framenumber circle{stroke:#222;stroke-opacity:.1;stroke-width:4;fill:#222;fill-opacity:.9}#sozi-framenumber text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}</style> + <ns1:frame + ns1:refid="rect10351" + ns1:title="Gcd implementation" + ns1:sequence="1" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="2" + ns1:title="Gcd maven packaging" + ns1:refid="rect10841" /> + <ns1:frame + ns1:refid="rect11089" + ns1:title="Using Math.getGcd()" + ns1:sequence="3" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="4" + ns1:title="Fraction project" + ns1:refid="rect11381" /> + <ns1:frame + ns1:refid="rect11637" + ns1:title="Maven dependency definition" + ns1:sequence="5" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0" + ns1:transition-duration-ms="1000" + ns1:timeout-ms="5000" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="6" + ns1:title="Fraction depends on Gcd" + ns1:refid="rect11895" /> +</svg> diff --git a/Doc/Sd1/Ref/Statements/ifElse.svg b/Doc/Sd1/Ref/Statements/ifElse.svg new file mode 100644 index 0000000000000000000000000000000000000000..eabc04ebd70eac3674b9eeeb9bcfad2ce98186e6 --- /dev/null +++ b/Doc/Sd1/Ref/Statements/ifElse.svg @@ -0,0 +1,1097 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:ns1="http://sozi.baierouge.fr" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="ifElse.svg" + inkscape:version="0.92.1 r15371" + version="1.2" + id="svg2" + height="420" + width="412"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.7079545" + inkscape:cx="229.98059" + inkscape:cy="199.97101" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1105" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="false" + inkscape:guide-bbox="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + originy="-262.20473" + originx="0" + id="grid1569" + type="xygrid" /> + </sodipodi:namedview> + <defs + id="defs4"> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker2318" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path2316" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker4887" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path4627" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6797" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6799" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6793" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path6795" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6778" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6514" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lstart" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lstart"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path3841" /> + </marker> + <marker + inkscape:stockid="SquareM" + orient="auto" + refY="0" + refX="0" + id="SquareM" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path3914" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lend" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path3844" /> + </marker> + <marker + style="overflow:visible" + id="DiamondM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondM"> + <path + inkscape:connector-curvature="0" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path3923" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMH" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMH"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path4656" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendB" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendB"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path4659" /> + </marker> + <marker + inkscape:stockid="SquareMU" + orient="auto" + refY="0" + refX="0" + id="SquareMU" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path5221" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lend3" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend3"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path5224" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMo" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMo"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path5799" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendO" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendO"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path5802" /> + </marker> + <marker + style="overflow:visible" + id="DiamondM1" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondM1"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path6393" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendV" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendV"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6396" /> + </marker> + <marker + inkscape:stockid="SquareMN" + orient="auto" + refY="0" + refX="0" + id="SquareMN" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path7813" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LstartP" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LstartP"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path7816" /> + </marker> + <marker + inkscape:stockid="SquareMb" + orient="auto" + refY="0" + refX="0" + id="SquareMb" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path9491" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendX" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendX"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path9494" /> + </marker> + <marker + inkscape:stockid="SquareM8" + orient="auto" + refY="0" + refX="0" + id="SquareM8" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path10143" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendT" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendT"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path10146" /> + </marker> + <marker + inkscape:stockid="SquareMNT" + orient="auto" + refY="0" + refX="0" + id="SquareMNT" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path12195" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LstartPJ" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LstartPJ"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + id="path12198" /> + </marker> + <marker + inkscape:stockid="SquareMNTL" + orient="auto" + refY="0" + refX="0" + id="SquareMNTL" + style="overflow:visible"> + <path + inkscape:connector-curvature="0" + id="path12907" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1Lendx" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lendx"> + <path + inkscape:connector-curvature="0" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path12910" /> + </marker> + <marker + style="overflow:visible" + id="DiamondMoY" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="DiamondMoY"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + id="path13187" /> + </marker> + <marker + style="overflow:visible" + id="Arrow1LendOe" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1LendOe"> + <path + inkscape:connector-curvature="0" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path13190" /> + </marker> + <linearGradient + id="linearGradient3928-8"> + <stop + id="stop3930-2" + style="stop-color:#7c7c7c" + offset="0" /> + <stop + id="stop3932-0" + style="stop-color:#e6e3e3" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient8877"> + <stop + id="stop8879" + offset="0" + style="stop-color:#cecece;stop-opacity:1;" /> + <stop + id="stop8881" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient8869"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop8871" /> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="1" + id="stop8873" /> + </linearGradient> + <linearGradient + id="linearGradient7421"> + <stop + style="stop-color:#000000;stop-opacity:1;" + offset="0" + id="stop7423" /> + <stop + style="stop-color:#000000;stop-opacity:0;" + offset="1" + id="stop7425" /> + </linearGradient> + <linearGradient + id="linearGradient7405"> + <stop + id="stop7407" + offset="0" + style="stop-color:#9e9e9e;stop-opacity:1;" /> + <stop + id="stop7409" + offset="1" + style="stop-color:#ffffff;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient7378"> + <stop + style="stop-color:#9e9e9e;stop-opacity:1;" + offset="0" + id="stop7380" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop7382" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="64 : 32 : 1" + inkscape:persp3d-origin="32 : 21.333333 : 1" + id="perspective6864" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-6"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-1" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-8" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-7"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-9" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-2" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-2"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-8" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-9" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-73"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-6" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-1" /> + <filter + id="imagebot_16-0" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-7" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="32.287571" + y1="-192.16943" + x2="33.162106" + xlink:href="#linearGradient3928-8" + y2="-235.34229" + id="imagebot_14-5" /> + <filter + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-0" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-4" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-8" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-02"> + <feGaussianBlur + stdDeviation="1.2625" + id="imagebot_21-9" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + gradientTransform="scale(0.90019155,1.1108747)" + x1="35.173683" + y1="43.90382" + x2="36.048218" + xlink:href="#linearGradient3928-8" + y2="0.73097426" + id="imagebot_14-4" /> + <filter + style="color-interpolation-filters:sRGB" + height="1.215" + x="-0.041609999" + y="-0.1075" + width="1.0832" + id="imagebot_12-3"> + <feGaussianBlur + stdDeviation="0.5375" + id="imagebot_18-5" /> + </filter> + <linearGradient + gradientUnits="userSpaceOnUse" + x1="43.709675" + y1="-254.4969" + x2="34.572056" + xlink:href="#linearGradient3928-8" + y2="-245.02541" + id="imagebot_9-17" /> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-3" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-4" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-5" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="marker11618O" + orient="auto" + refY="0" + refX="0" + id="marker11618O" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path10547" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#00ff00;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-5" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-4" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#008000;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-43" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-0" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-5-9" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-4-2" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + <marker + inkscape:stockid="Arrow1Mend" + orient="auto" + refY="0" + refX="0" + id="marker11618-6-43-6" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path11616-5-0-8" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.4,0,0,-0.4,-4,0)" /> + </marker> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + transform="translate(0,-440.31499)" + id="layer1" + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + <text + id="text3004" + y="415.68225" + x="104.51711" + style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672" + xml:space="preserve"><tspan + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:1.06666672" + y="415.68225" + x="104.51711" + id="tspan3006" + sodipodi:role="line"> </tspan></text> + <text + id="text135" + y="499.50079" + x="8.0147896" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="499.50079" + x="8.0147896" + id="tspan133" + sodipodi:role="line">condition</tspan><tspan + id="tspan137" + y="539.50079" + x="8.0147896" + sodipodi:role="line">is true</tspan></text> + <text + id="text141" + y="482.46353" + x="261.61862" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="482.46353" + x="261.61862" + id="tspan139" + sodipodi:role="line">condition</tspan><tspan + id="tspan143" + y="522.4635" + x="261.61862" + sodipodi:role="line">is false</tspan></text> + <g + transform="translate(40,-144.99999)" + id="g4813"> + <path + style="fill:#1a1a1a;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + d="m 50,702.51971 120,50 110,-50 -110,-50 z" + id="path145" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="90.891823" + y="712.51971" + id="text4458"><tspan + sodipodi:role="line" + id="tspan4456" + x="90.891823" + y="712.51971">Condition</tspan></text> + </g> + <circle + r="5" + cy="377.51971" + cx="55" + id="path4820" + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="30" + rx="80" + cy="482.51971" + cx="130" + id="path4824" + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="10.051409" + rx="9.9901352" + cy="452.49548" + cx="209.45428" + id="path4828" + style="fill:#000000;stroke:none;stroke-width:0.57854682;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <g + transform="translate(-73.821037,259.10369)" + id="g4849"> + <ellipse + style="fill:#000000;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4828-7" + cx="285.07419" + cy="572.61981" + rx="15.003441" + ry="14.991529" /> + <ellipse + style="fill:none;stroke:#000000;stroke-width:0.90602088;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4845" + cx="285.07285" + cy="572.5061" + rx="19.461161" + ry="19.497755" /> + </g> + <path + inkscape:connector-curvature="0" + id="path4851-6" + d="m 210,462.51973 v 39.99999" + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6)" /> + <path + inkscape:connector-curvature="0" + id="path4851-6-74" + d="M 90,557.51972 H 65 v 65" + style="fill:none;stroke:#008000;stroke-width:2.89087248;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-5)" + sodipodi:nodetypes="ccc" /> + <path + inkscape:connector-curvature="0" + id="path4851-6-7" + d="m 350,707.51972 -125,105" + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-43)" + sodipodi:nodetypes="cc" /> + <g + id="g17868" + transform="translate(175,-64.999994)"> + <rect + style="fill:#000000;stroke-width:5.70087767;stroke-miterlimit:4;stroke-dasharray:none" + id="rect4803-6" + width="130" + height="75.000008" + x="-175" + y="697.51971" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="-165" + y="727.51971" + id="text4462-8"><tspan + sodipodi:role="line" + id="tspan4460-8" + x="-165" + y="727.51971">Code</tspan><tspan + sodipodi:role="line" + x="-165" + y="767.51971" + id="tspan17830">block 1</tspan></text> + </g> + <g + id="g17874" + transform="translate(450,-169.99999)"> + <rect + style="fill:#000000;stroke-width:5.70087767;stroke-miterlimit:4;stroke-dasharray:none" + id="rect4803-6-4" + width="130" + height="75.000008" + x="-170" + y="802.51971" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + x="-160" + y="832.51971" + id="text4462-8-3"><tspan + sodipodi:role="line" + id="tspan4460-8-1" + x="-160" + y="832.51971">Code</tspan><tspan + sodipodi:role="line" + x="-160" + y="872.51971" + id="tspan17830-4">block 2</tspan></text> + </g> + <path + inkscape:connector-curvature="0" + id="path4851-6-74-0" + d="m 320,557.51972 h 30 v 65" + style="fill:none;stroke:#ff0000;stroke-width:2.89087248;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-5-9)" + sodipodi:nodetypes="ccc" /> + <path + inkscape:connector-curvature="0" + id="path4851-6-7-9" + d="m 70,707.51972 125,105" + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-43-6)" + sodipodi:nodetypes="cc" /> + </g> + <script + id="sozi-script" + ns1:version="14.10-05142318">function namespace(b,d,a){var c=b;d.split(".").forEach(function(e){if(typeof c[e]==="undefined"){c[e]={}}c=c[e]});if(a){a(c,b)}return c}namespace(this,"sozi.events",function(b){var a={};b.listen=function(c,d){if(!a.hasOwnProperty(c)){a[c]=[]}a[c].push(d)};b.fire=function(d){var c=Array.prototype.slice.call(arguments,1);if(a.hasOwnProperty(d)){a[d].forEach(function(e){e.apply(null,c)})}}});namespace(this,"sozi.proto",function(a){a.Object={installConstructors:function(){function b(){}b.prototype=this;this.instance=function(){var c=new b();c.construct.apply(c,arguments);return c};this.subtype=function(d){var c=new b();c.augment(d);c.installConstructors();return c}},construct:function(){},augment:function(c){for(var b in c){if(c.hasOwnProperty(b)){this[b]=c[b]}}return this},bind:function(c){var b=this;return function(){return c.apply(b,arguments)}}};a.Object.installConstructors()});namespace(this,"sozi.actions",function(A,g){var u=namespace(g,"sozi.player");var v=namespace(g,"sozi.display");var n=g.document;var o=0;var w=1;var t=1.05;var y=5;var m=5;var r=false;var i=0;var h=0;function a(C,B,D){u.stop();v.viewPorts.player.zoom(C>0?t:1/t,B,D)}function x(B){u.stop();v.viewPorts.player.rotate(B>0?y:-y)}function s(){if(sozi.framelist.isVisible()){sozi.framelist.hide();u.restart()}else{u.stop();sozi.framelist.show()}}function d(B){return v.viewPorts.player.contains(B.clientX,B.clientY)}function f(B){if(!d(B)){return}if(B.button===o){n.documentElement.addEventListener("mousemove",q,false);r=false;i=B.clientX;h=B.clientY}else{if(B.button===w){s()}}B.stopPropagation();B.preventDefault()}function q(B){if(!d(B)){return}u.stop();if(!r&&(Math.abs(B.clientX-i)>m||Math.abs(B.clientY-h)>m)){r=true}if(r){sozi.events.fire("sozi.player.cleanup");v.viewPorts.player.drag(B.clientX-i,B.clientY-h);i=B.clientX;h=B.clientY}B.stopPropagation()}function c(B){if(!d(B)){return}if(B.button===o){n.documentElement.removeEventListener("mousemove",q,false)}B.stopPropagation();B.preventDefault()}function p(B){if(!d(B)){return}u.moveToPrevious();B.stopPropagation();B.preventDefault()}function e(B){if(!d(B)){return}if(!r&&B.button!==w){u.moveToNext()}B.stopPropagation();B.preventDefault()}function j(B){if(!d(B)){return}if(!B){B=g.event}var C=0;if(B.wheelDelta){C=B.wheelDelta}else{if(B.detail){C=-B.detail}}if(C!==0){if(B.shiftKey){x(C)}else{a(C,B.clientX,B.clientY)}}B.stopPropagation();B.preventDefault()}function l(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.charCode||B.which){case 43:a(1,g.innerWidth/2,g.innerHeight/2);break;case 45:a(-1,g.innerWidth/2,g.innerHeight/2);break;case 61:u.moveToCurrent();break;case 70:case 102:u.showAll();break;case 84:case 116:s();break;case 82:x(-1);break;case 114:x(1);break;default:return}B.stopPropagation();B.preventDefault()}function b(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.keyCode){case 36:if(B.shiftKey){u.jumpToFirst()}else{u.moveToFirst()}break;case 35:if(B.shiftKey){u.jumpToLast()}else{u.moveToLast()}break;case 38:case 33:case 37:if(B.shiftKey){u.jumpToPrevious()}else{u.moveToPrevious()}break;case 40:case 34:case 39:case 13:case 32:if(B.shiftKey){u.jumpToNext()}else{u.moveToNext()}break;default:return}B.stopPropagation();B.preventDefault()}function z(B){B.stopPropagation()}function k(){var C=n.getElementsByTagName("a");for(var D=0;D<C.length;D+=1){C[D].addEventListener("click",z,false);C[D].addEventListener("contextmenu",z,false)}var B=n.documentElement;B.addEventListener("click",e,false);B.addEventListener("mousedown",f,false);B.addEventListener("mouseup",c,false);B.addEventListener("contextmenu",p,false);B.addEventListener("DOMMouseScroll",j,false);g.onmousewheel=j;B.addEventListener("keypress",l,false);B.addEventListener("keydown",b,false)}sozi.events.listen("sozi.display.ready",k)});namespace(this,"sozi.animation",function(d,g){var h=g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame;var k=function(){return g.performance&&g.performance.now?g.performance.now():Date.now()};d.setAnimationFrameHandlers=function(l,m){h=l;k=m};var i=40;var c;var j=[];function e(){if(j.length>0){if(h){h(e)}j.forEach(function(l){l.step(k())})}else{if(!h){g.clearInterval(c)}}}function b(){if(h){h(e)}else{c=g.setInterval(function(){e(k())},i)}}function a(l){j.push(l);if(j.length===1){b()}}function f(l){j.splice(j.indexOf(l),1)}d.Animator=sozi.proto.Object.subtype({construct:function(){this.durationMs=0;this.data=null;this.initialTime=0;this.started=false},start:function(l,m){this.durationMs=l;this.data=m;this.initialTime=k();this.onStep(0);if(!this.started){this.started=true;a(this)}},stop:function(){if(this.started){f(this);this.started=false}},step:function(m){var l=m-this.initialTime;if(l>=this.durationMs){this.stop();this.onStep(1);this.onDone()}else{this.onStep(l/this.durationMs)}},onStep:function(l){},onDone:function(){}});d.profiles={linear:function(l){return l},accelerate:function(l){return Math.pow(l,3)},"strong-accelerate":function(l){return Math.pow(l,5)},decelerate:function(l){return 1-Math.pow(1-l,3)},"strong-decelerate":function(l){return 1-Math.pow(1-l,5)},"accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,3)/2;return l<=0.5?n:1-n},"strong-accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,5)/2;return l<=0.5?n:1-n},"decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,2))/2;return l<=0.5?n:1-n},"strong-decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,3))/2;return l<=0.5?n:1-n},"immediate-beginning":function(l){return 1},"immediate-end":function(l){return l===1?1:0},"immediate-middle":function(l){return l>=0.5?1:0}}});namespace(this,"sozi.display",function(c,g){var f="http://www.w3.org/2000/svg";var b="http://www.w3.org/1999/xlink";var i=g.document;var k;var h;var j;c.viewPorts={};var e;c.CameraState=sozi.proto.Object.subtype({construct:function(){this.cx=this.cy=0;this.width=this.height=1;this.angle=0;this.clipped=true;this.transitionZoomPercent=0;this.transitionProfile=sozi.animation.profiles.linear;this.transitionPath=null},setCenter:function(l,m){this.cx=l;this.cy=m;return this},setSize:function(m,l){this.width=m;this.height=l;return this},setClipped:function(l){this.clipped=l;return this},setAngle:function(l){this.angle=(l+180)%360-180;return this},setRawAngle:function(l){this.angle=l;return this},setTransitionZoomPercent:function(l){this.transitionZoomPercent=l;return this},setTransitionProfile:function(l){this.transitionProfile=l;return this},setTransitionPath:function(l){this.transitionPath=l;return this},setAtElement:function(p){var s,o,t,m;if(p.nodeName==="rect"){s=p.x.baseVal.value;o=p.y.baseVal.value;t=p.width.baseVal.value;m=p.height.baseVal.value}else{var q=p.getBBox();s=q.x;o=q.y;t=q.width;m=q.height}var n=i.documentElement.createSVGPoint();n.x=s+t/2;n.y=o+m/2;var r=p.getCTM();n=n.matrixTransform(r);var l=Math.sqrt(r.a*r.a+r.b*r.b);return this.setCenter(n.x,n.y).setSize(t*l,m*l).setAngle(Math.atan2(r.b,r.a)*180/Math.PI)},setAtState:function(l){return this.setCenter(l.cx,l.cy).setSize(l.width,l.height).setAngle(l.angle).setClipped(l.clipped).setTransitionZoomPercent(l.transitionZoomPercent).setTransitionProfile(l.transitionProfile).setTransitionPath(l.transitionPath)},interpolatableAttributes:["width","height","angle"],interpolate:function(n,o,t,v,r){var p=1-t;for(var q=0;q<this.interpolatableAttributes.length;q+=1){var s=this.interpolatableAttributes[q];this[s]=o[s]*t+n[s]*p}var l=r?n.transitionPath:o.transitionPath;if(v&&l){var x=l.getTotalLength();if(r){var m=l.getPointAtLength(x);var u=l.getPointAtLength(0);var w=l.getPointAtLength(x*p)}else{var m=l.getPointAtLength(0);var u=l.getPointAtLength(x);var w=l.getPointAtLength(x*t)}this.cx=w.x+(o.cx-u.x)*t+(n.cx-m.x)*p;this.cy=w.y+(o.cy-u.y)*t+(n.cy-m.y)*p}else{this.cx=o.cx*t+n.cx*p;this.cy=o.cy*t+n.cy*p}}});c.Camera=c.CameraState.subtype({construct:function(n,o){c.CameraState.construct.call(this);this.viewPort=n;this.svgClipRect=i.createElementNS(f,"rect");var m=i.createElementNS(f,"clipPath");m.setAttribute("id","sozi-clip-path-"+n.id+"-"+o);m.appendChild(this.svgClipRect);n.svgGroup.appendChild(m);var l=i.createElementNS(f,"g");l.setAttribute("clip-path","url(#sozi-clip-path-"+n.id+"-"+o+")");n.svgGroup.appendChild(l);if(n.isPrimary){this.svgLayer=i.createElementNS(f,"g");this.svgLayer.appendChild(i.getElementById(o))}else{this.svgLayer=i.createElementNS(f,"use");this.svgLayer.setAttributeNS(b,"href","#"+o)}l.appendChild(this.svgLayer)},setAtState:function(l){return c.CameraState.setAtState.call(this,l).update()},getScale:function(){return Math.min(this.viewPort.width/this.width,this.viewPort.height/this.height)},rotate:function(l){return this.setAngle(this.angle+l).update()},zoom:function(m,l,n){return this.setSize(this.width/m,this.height/m).drag((1-m)*(l-this.viewPort.width/2),(1-m)*(n-this.viewPort.height/2))},drag:function(m,l){var q=this.getScale();var o=this.angle*Math.PI/180;var n=Math.sin(o);var p=Math.cos(o);return this.setCenter(this.cx-(m*p-l*n)/q,this.cy-(m*n+l*p)/q).setClipped(false).update()},update:function(){var q=this.getScale();var n=this.width*q;var m=this.height*q;var l=(this.viewPort.width-n)/2;var r=(this.viewPort.height-m)/2;this.svgClipRect.setAttribute("x",this.clipped?l:0);this.svgClipRect.setAttribute("y",this.clipped?r:0);this.svgClipRect.setAttribute("width",this.clipped?n:this.viewPort.width);this.svgClipRect.setAttribute("height",this.clipped?m:this.viewPort.height);var p=-this.cx+this.width/2+l/q;var o=-this.cy+this.height/2+r/q;this.svgLayer.setAttribute("transform","scale("+q+")translate("+p+","+o+")rotate("+(-this.angle)+","+this.cx+","+this.cy+")");return this}});c.ViewPort=sozi.proto.Object.subtype({construct:function(n,m,l){this.id=n;c.viewPorts[n]=this;this.isPrimary=!!l;if(this.isPrimary){if(e){throw"Failed to create a primary viewport. A primary viewport already exists."}else{e=this}}this.svgGroup=i.createElementNS(f,"g");this.svgGroup.setAttribute("class","sozi-viewport");this.svgGroup.setAttribute("id","sozi-viewport-"+n);i.documentElement.appendChild(this.svgGroup);this.setLocation(0,0).setSize(g.innerWidth,g.innerHeight);this.cameras={};m.forEach(function(o){this.cameras[o]=c.Camera.instance(this,o)},this)},setSize:function(m,l){this.width=m;this.height=l;return this},setLocation:function(l,m){this.x=l;this.y=m;return this},contains:function(l,m){return l>=this.x&&l<this.x+this.width&&m>=this.y&&m<this.y+this.height},getDocumentState:function(){var m=c.CameraState.instance().setCenter(k.x+k.width/2,k.y+k.height/2).setSize(k.width,k.height).setClipped(false);var l={};for(var n in this.cameras){l[n]=m}return l},update:function(){this.svgGroup.setAttribute("transform","translate("+this.x+","+this.y+")");for(var l in this.cameras){this.cameras[l].update()}return this},showFrame:function(l){for(var m in l.states){this.cameras[m].setAtState(l.states[m])}return this},drag:function(m,l){for(var n in this.cameras){this.cameras[n].drag(m,l)}return this},zoom:function(m,l,o){for(var n in this.cameras){this.cameras[n].zoom(m,l,o)}return this},rotate:function(l){for(var m in this.cameras){this.cameras[m].rotate(l)}return this},onWindowResize:function(m,l){this.setLocation(this.x*m,this.y*l).setSize(this.width*m,this.height*l).update()}});function d(){var l=i.documentElement;k=l.getBBox();h=g.innerWidth;j=g.innerHeight;l.setAttribute("width",h);l.setAttribute("height",j);sozi.events.fire("sozi.display.ready")}function a(){var l=i.documentElement;l.setAttribute("width",g.innerWidth);l.setAttribute("height",g.innerHeight);for(var m in c.viewPorts){c.viewPorts[m].onWindowResize(g.innerWidth/h,g.innerHeight/j)}h=g.innerWidth;j=g.innerHeight}sozi.events.listen("sozi.document.ready",d);g.addEventListener("resize",a,false)});namespace(this,"sozi.document",function(c,e){var g=e.document;var b="http://sozi.baierouge.fr";var d={title:"Untitled",sequence:"0",hide:"true",clip:"true","show-in-frame-list":"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear","transition-path-hide":"true"};var h=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"];c.frames=[];c.idLayerList=[];function j(l,k){return l.getAttributeNS(b,k)||d[k]}function i(o,p,k){var l=o.states[p]=o.states[p]||sozi.display.CameraState.instance();if(typeof l.transitionZoomPercent==="undefined"||k.hasAttributeNS(b,"transition-zoom-percent")){l.setTransitionZoomPercent(parseInt(j(k,"transition-zoom-percent"),10))}if(typeof l.transitionProfile==="undefined"||k.hasAttributeNS(b,"transition-profile")){l.setTransitionProfile(sozi.animation.profiles[j(k,"transition-profile")])}if(typeof l.transitionPath==="undefined"||k.hasAttributeNS(b,"transition-path")){var n=g.getElementById(k.getAttributeNS(b,"transition-path"));if(n&&n.nodeName==="path"){l.setTransitionPath(n);if(j(k,"transition-path-hide")==="true"){n.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"refid")){var m=g.getElementById(k.getAttributeNS(b,"refid"));if(m){l.setAtElement(m);if(j(k,"hide")==="true"){m.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"clip")){l.setClipped(j(k,"clip")==="true")}}function a(){var l=[];var p=g.getElementsByTagNameNS(b,"layer");for(var n=0;n<p.length;n+=1){var s=p[n].getAttributeNS(b,"group");if(s&&l.indexOf(s)===-1){l.push(s)}}var r=g.documentElement;var o="http://www.w3.org/2000/svg";var q=g.createElementNS(o,"g");var k=Array.prototype.slice.call(r.childNodes);k.forEach(function(u,t){if(!u.getAttribute){r.removeChild(u)}else{if(l.indexOf(u.getAttribute("id"))!==-1){if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+t);c.idLayerList.push("sozi-wrapper-"+t);r.insertBefore(q,u);q=g.createElementNS(o,"g")}c.idLayerList.push(u.getAttribute("id"))}else{if(h.indexOf(u.localName.toLowerCase())!==-1){r.removeChild(u);q.appendChild(u)}}}});if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+k.length);c.idLayerList.push("sozi-wrapper-"+k.length);r.appendChild(q)}var m=Array.prototype.slice.call(g.getElementsByTagNameNS(b,"frame"));m.sort(function(u,t){var w=parseInt(j(u,"sequence"),10);var v=parseInt(j(t,"sequence"),10);return w-v});m.forEach(function(v,u){var x={id:v.getAttribute("id"),title:j(v,"title"),showInFrameList:j(v,"show-in-frame-list")==="true",sequence:parseInt(j(v,"sequence"),10),timeoutEnable:j(v,"timeout-enable")==="true",timeoutMs:parseInt(j(v,"timeout-ms"),10),transitionDurationMs:parseInt(j(v,"transition-duration-ms"),10),states:{}};c.idLayerList.forEach(function(A){if(u===0||A.search("sozi-wrapper-[0-9]+")!==-1){i(x,A,v)}else{var z=x.states[A]=sozi.display.CameraState.instance();var y=c.frames[c.frames.length-1].states[A];z.setAtState(y)}});var t=Array.prototype.slice.call(v.getElementsByTagNameNS(b,"layer"));t.forEach(function(y){var z=y.getAttributeNS(b,"group");if(z&&c.idLayerList.indexOf(z)!==-1){i(x,z,y)}});for(var w in x.states){if(x.states.hasOwnProperty(w)){c.frames.push(x);break}}})}c.getFrameIndexForId=function(l){for(var k=0;k<c.frames.length;k+=1){if(c.frames[k].id===l){return k}}return -1};function f(){g.documentElement.removeAttribute("viewBox");a();sozi.events.fire("sozi.document.ready")}e.addEventListener("load",f,false)});namespace(this,"sozi.framelist",function(u,k){var o=k.document;var c=5;var i;var p;var j=0;var h;var s;var b;var v;var w;var t;var e=300;var f="decelerate";var a="http://www.w3.org/2000/svg";function n(z){var x=z.relatedTarget,y=o.documentElement;while(x&&x!==i&&x!==y){x=x.parentNode}if(x!==i){u.hide();sozi.player.restart();z.stopPropagation()}}function r(y){var x=p.getCTM().f;if(x<=-k.innerHeight/2){x+=k.innerHeight/2}else{if(x<0){x=0}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function d(y){var x=p.getCTM().f;if(x+j>=k.innerHeight*3/2){x-=k.innerHeight/2}else{if(x+j>k.innerHeight+2*c){x=k.innerHeight-j-4*c}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function g(x){return function(y){sozi.player.previewFrame(x);y.stopPropagation()}}function l(x){x.stopPropagation()}function q(){i=o.createElementNS(a,"g");i.setAttribute("id","sozi-toc");o.documentElement.appendChild(i);p=o.createElementNS(a,"g");i.appendChild(p);var y=o.createElementNS(a,"rect");y.setAttribute("id","sozi-toc-background");y.setAttribute("x",c);y.setAttribute("y",c);y.setAttribute("rx",c);y.setAttribute("ry",c);y.addEventListener("click",l,false);y.addEventListener("mousedown",l,false);y.addEventListener("mouseout",n,false);p.appendChild(y);var A=0;sozi.document.frames.forEach(function(D,E){if(D.showInFrameList){var C=o.createElementNS(a,"text");C.appendChild(o.createTextNode(D.title));C.setAttribute("id","sozi-toc-"+D.id);p.appendChild(C);if(E===sozi.player.currentFrameIndex){C.setAttribute("class","sozi-toc-current")}var B=C.getBBox().width;j+=C.getBBox().height;if(B>A){A=B}C.setAttribute("x",2*c);C.setAttribute("y",j+c);C.addEventListener("click",g(E),false);C.addEventListener("mousedown",l,false)}});var x=o.createElementNS(a,"path");x.setAttribute("class","sozi-toc-arrow");x.setAttribute("d","M"+(A+3*c)+","+(5*c)+" l"+(4*c)+",0 l-"+(2*c)+",-"+(3*c)+" z");x.addEventListener("click",r,false);x.addEventListener("mousedown",l,false);i.appendChild(x);var z=o.createElementNS(a,"path");z.setAttribute("class","sozi-toc-arrow");z.setAttribute("d","M"+(A+3*c)+","+(7*c)+" l"+(4*c)+",0 l-"+(2*c)+","+(3*c)+" z");z.addEventListener("click",d,false);z.addEventListener("mousedown",l,false);i.appendChild(z);y.setAttribute("width",A+7*c);y.setAttribute("height",j+2*c);h=-A-9*c;s=0;w=v=h;i.setAttribute("transform","translate("+h+",0)");t=sozi.animation.Animator.instance().augment({onStep:function(B){var D=sozi.animation.profiles[f](B),C=1-D;w=v*D+b*C;i.setAttribute("transform","translate("+w+",0)")}})}function m(x){var y=Array.prototype.slice.call(o.getElementsByClassName("sozi-toc-current"));y.forEach(function(A){A.removeAttribute("class")});var z=sozi.document.frames[x];if(z.showInFrameList){o.getElementById("sozi-toc-"+z.id).setAttribute("class","sozi-toc-current")}}u.show=function(){o.documentElement.appendChild(i);b=w;v=s;t.start(e)};u.hide=function(){b=w;v=h;t.start(e)};u.isVisible=function(){return v===s};sozi.events.listen("sozi.player.ready",q);sozi.events.listen("sozi.player.cleanup",u.hide);sozi.events.listen("sozi.player.framechange",m)});namespace(this,"sozi.framenumber",function(a,d){var g=d.document;var e;var k,i;var f;var b="http://www.w3.org/2000/svg";function h(){var m=k.getBBox(),n=Math.max(m.width,m.height)*0.75,l=n*1.25;f.setAttribute("r",n);e.setAttribute("transform","translate("+l+","+l+")")}function c(){e=g.createElementNS(b,"g");k=g.createElementNS(b,"text");f=g.createElementNS(b,"circle");e.setAttribute("id","sozi-framenumber");f.setAttribute("cx",0);f.setAttribute("cy",0);e.appendChild(f);i=g.createTextNode(sozi.player.currentFrameIndex+1);k.setAttribute("text-anchor","middle");k.setAttribute("dominant-baseline","central");k.setAttribute("x",0);k.setAttribute("y",0);k.appendChild(i);e.appendChild(k);g.documentElement.appendChild(e);h()}function j(l){i.nodeValue=l+1}sozi.events.listen("sozi.player.ready",c);sozi.events.listen("sozi.player.framechange",j)});namespace(this,"sozi.links",function(c,e){var b="http://www.w3.org/2000/svg";var a="http://www.w3.org/1999/xlink";function f(g){return function(h){sozi.player.moveToFrame(g);h.preventDefault();h.stopPropagation()}}function d(){var h=e.document.getElementsByTagNameNS(b,"a");for(var j=0;j<h.length;j+=1){var g=h[j].getAttributeNS(a,"href");if(g&&g[0]==="#"){h[j].addEventListener("click",f(sozi.location.getFrameIndexForHash(g)),false)}}}sozi.events.listen("sozi.document.ready",d)});namespace(this,"sozi.location",function(a,d){var b=false;a.getFrameIndex=function(){return a.getFrameIndexForHash(d.location.hash)};a.getFrameIndexForHash=function(g){var h=g?g.slice(1):"1";var f;if(/^[0-9]+$/.test(h)){f=parseInt(h,10)-1}else{f=sozi.document.getFrameIndexForId(h)}if(f<0){return 0}else{if(f>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return f}}};function e(){var f=a.getFrameIndex();if(!b){sozi.player.moveToFrame(f)}b=false}function c(f){b=true;d.location.hash="#"+sozi.document.frames[f].id}d.addEventListener("hashchange",e,false);sozi.events.listen("sozi.player.framechange",c)});namespace(this,"sozi.player",function(d,g){var l;var c;var i;var e=500;var n=-10;var j="linear";var f=0;d.currentFrameIndex=0;var k=false;var m=false;function h(){if(sozi.document.frames[d.currentFrameIndex].timeoutEnable){m=true;var o=(d.currentFrameIndex+1)%sozi.document.frames.length;i=g.setTimeout(function(){d.moveToFrame(o)},sozi.document.frames[d.currentFrameIndex].timeoutMs)}}d.startFromIndex=function(o){k=true;m=false;f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);h()};d.restart=function(){d.startFromIndex(d.currentFrameIndex)};d.stop=function(){c.stop();if(m){g.clearTimeout(i);m=false}k=false;f=d.currentFrameIndex};function b(o,y,w){var z={ss:((o<0)?Math.max(y,w):Math.min(y,w))*(100-o)/100,ts:0.5,k:0};if(o!==0){var s=y-w;var r=y-z.ss;var q=w-z.ss;if(s!==0){var p=Math.sqrt(r*q);var x=(r-p)/s;var t=(r+p)/s;z.ts=(x>0&&x<=1)?x:t}z.k=r/z.ts/z.ts}return z}d.jumpToFrame=function(o){d.stop();sozi.events.fire("sozi.player.cleanup");f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);sozi.events.fire("sozi.player.framechange",o)};d.getAnimationData=function(o,q,s,p,v,t){var r={};for(var w in o){r[w]={initialState:sozi.display.CameraState.instance(),finalState:sozi.display.CameraState.instance(),useTransitionPath:v,reverseTransitionPath:t};r[w].profile=p||q[w].transitionProfile;r[w].initialState.setAtState(o[w]);if(q.hasOwnProperty(w)){r[w].finalState.setAtState(q[w])}else{r[w].finalState.setAtState(o[w])}if(r[w].finalState.angle-r[w].initialState.angle>180){r[w].finalState.setRawAngle(r[w].finalState.angle-360)}else{if(r[w].finalState.angle-r[w].initialState.angle<-180){r[w].initialState.setRawAngle(r[w].initialState.angle-360)}}var u=s||q[w].transitionZoomPercent;if(u&&q.hasOwnProperty(w)){r[w].zoomWidth=b(u,o[w].width,q[w].width);r[w].zoomHeight=b(u,o[w].height,q[w].height)}}return r};d.previewFrame=function(o){d.currentFrameIndex=o;c.start(e,d.getAnimationData(l.cameras,sozi.document.frames[o].states,n,sozi.animation.profiles[j]),false,false);sozi.events.fire("sozi.player.framechange",o)};d.moveToFrame=function(r){if(m){g.clearTimeout(i);m=false}var q,t,s,p,o;if(r===(d.currentFrameIndex-1)%sozi.document.frames.length){q=sozi.document.frames[d.currentFrameIndex].transitionDurationMs;t=undefined;s=undefined;p=true;o=true}else{if(r===(d.currentFrameIndex+1)%sozi.document.frames.length){q=sozi.document.frames[r].transitionDurationMs;t=undefined;s=undefined;p=true;o=false}else{q=e;t=n;s=sozi.animation.profiles[j];p=false;o=false}}sozi.events.fire("sozi.player.cleanup");k=true;d.currentFrameIndex=r;c.start(q,d.getAnimationData(l.cameras,sozi.document.frames[r].states,t,s,p,o));sozi.events.fire("sozi.player.framechange",r)};d.jumpToFirst=function(){d.jumpToFrame(0)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var o=d.currentFrameIndex;if(!c.started||f<=d.currentFrameIndex){o-=1}if(o>=0){d.jumpToFrame(o)}};d.moveToPrevious=function(){for(var o=d.currentFrameIndex-1;o>=0;o-=1){var p=sozi.document.frames[o];if(!p.timeoutEnable||p.timeoutMs!==0){d.moveToFrame(o);break}}};d.jumpToNext=function(){var o=d.currentFrameIndex;if(!c.started||f>=d.currentFrameIndex){o+=1}if(o<sozi.document.frames.length){d.jumpToFrame(o)}};d.moveToNext=function(){if(d.currentFrameIndex<sozi.document.frames.length-1||sozi.document.frames[d.currentFrameIndex].timeoutEnable){d.moveToFrame((d.currentFrameIndex+1)%sozi.document.frames.length)}};d.jumpToLast=function(){d.jumpToFrame(sozi.document.frames.length-1)};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(d.currentFrameIndex)};d.showAll=function(){d.stop();sozi.events.fire("sozi.player.cleanup");c.start(e,d.getAnimationData(l.cameras,l.getDocumentState(),n,sozi.animation.profiles[j],false,false))};function a(){l=sozi.display.ViewPort.instance("player",sozi.document.idLayerList,true);d.startFromIndex(sozi.location.getFrameIndex());g.setTimeout(l.bind(l.update),1);sozi.events.fire("sozi.player.ready")}d.onAnimationStep=function(o,q){for(var s in q){var p=l.cameras[s];p.interpolate(q[s].initialState,q[s].finalState,q[s].profile(o),q[s].useTransitionPath,q[s].reverseTransitionPath);var r;if(q[s].zoomWidth&&q[s].zoomWidth.k!==0){r=o-q[s].zoomWidth.ts;p.width=q[s].zoomWidth.k*r*r+q[s].zoomWidth.ss}if(q[s].zoomHeight&&q[s].zoomHeight.k!==0){r=o-q[s].zoomHeight.ts;p.height=q[s].zoomHeight.k*r*r+q[s].zoomHeight.ss}p.setClipped(q[s].finalState.clipped)}l.update()};c=sozi.animation.Animator.instance().augment({onStep:function(o){d.onAnimationStep(o,this.data)},onDone:function(){for(var o in this.data){l.cameras[o].setAtState(this.data[o].finalState)}l.update();f=d.currentFrameIndex;if(k){h()}}});sozi.events.listen("sozi.display.ready",a)});</script> + <style + id="sozi-style" + ns1:version="14.10-05142318">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}#sozi-framenumber circle{stroke:#222;stroke-opacity:.1;stroke-width:4;fill:#222;fill-opacity:.9}#sozi-framenumber text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}</style> + <ns1:frame + ns1:refid="rect10351" + ns1:title="Gcd implementation" + ns1:sequence="1" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="2" + ns1:title="Gcd maven packaging" + ns1:refid="rect10841" /> + <ns1:frame + ns1:refid="rect11089" + ns1:title="Using Math.getGcd()" + ns1:sequence="3" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="4" + ns1:title="Fraction project" + ns1:refid="rect11381" /> + <ns1:frame + ns1:refid="rect11637" + ns1:title="Maven dependency definition" + ns1:sequence="5" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0" + ns1:transition-duration-ms="1000" + ns1:timeout-ms="5000" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="6" + ns1:title="Fraction depends on Gcd" + ns1:refid="rect11895" /> +</svg> diff --git a/Doc/Sd1/Ref/Statements/while.svg b/Doc/Sd1/Ref/Statements/while.svg new file mode 100644 index 0000000000000000000000000000000000000000..33ba0aee26836a0e930c11e2eecdcba621502c43 --- /dev/null +++ b/Doc/Sd1/Ref/Statements/while.svg @@ -0,0 +1,1016 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:ns1="http://sozi.baierouge.fr" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="while.svg" + inkscape:version="0.92.1 r15371" + version="1.2" + id="svg2" + height="420" + width="412"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.2077062" + inkscape:cx="378.05945" + inkscape:cy="235.43139" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1105" + inkscape:window-x="0" + inkscape:window-y="0" + inkscape:window-maximized="1" + showguides="false" + inkscape:guide-bbox="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid1569" + originx="0" + originy="-262.20473" /> + </sodipodi:namedview> + <defs + id="defs4"> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path11616" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker2318" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path2316" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker4887" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4627" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6797" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6799" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6793" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6795" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6778" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6514" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lstart" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lstart" + style="overflow:visible"> + <path + id="path3841" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareM"> + <path + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path3914" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend" + style="overflow:visible"> + <path + id="path3844" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondM" + orient="auto" + refY="0" + refX="0" + id="DiamondM" + style="overflow:visible"> + <path + id="path3923" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMH" + orient="auto" + refY="0" + refX="0" + id="DiamondMH" + style="overflow:visible"> + <path + id="path4656" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendB" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendB" + style="overflow:visible"> + <path + id="path4659" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMU" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMU"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path5221" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend3" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend3" + style="overflow:visible"> + <path + id="path5224" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMo" + orient="auto" + refY="0" + refX="0" + id="DiamondMo" + style="overflow:visible"> + <path + id="path5799" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendO" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendO" + style="overflow:visible"> + <path + id="path5802" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondM1" + orient="auto" + refY="0" + refX="0" + id="DiamondM1" + style="overflow:visible"> + <path + id="path6393" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendV" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendV" + style="overflow:visible"> + <path + id="path6396" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMN" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMN"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path7813" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LstartP" + orient="auto" + refY="0" + refX="0" + id="Arrow1LstartP" + style="overflow:visible"> + <path + id="path7816" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMb" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMb"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path9491" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendX" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendX" + style="overflow:visible"> + <path + id="path9494" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareM8" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareM8"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path10143" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendT" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendT" + style="overflow:visible"> + <path + id="path10146" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMNT" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMNT"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path12195" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LstartPJ" + orient="auto" + refY="0" + refX="0" + id="Arrow1LstartPJ" + style="overflow:visible"> + <path + id="path12198" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMNTL" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMNTL"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path12907" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lendx" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lendx" + style="overflow:visible"> + <path + id="path12910" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMoY" + orient="auto" + refY="0" + refX="0" + id="DiamondMoY" + style="overflow:visible"> + <path + id="path13187" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendOe" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendOe" + style="overflow:visible"> + <path + id="path13190" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <linearGradient + id="linearGradient3928-8"> + <stop + offset="0" + style="stop-color:#7c7c7c" + id="stop3930-2" /> + <stop + offset="1" + style="stop-color:#e6e3e3" + id="stop3932-0" /> + </linearGradient> + <linearGradient + id="linearGradient8877"> + <stop + style="stop-color:#cecece;stop-opacity:1;" + offset="0" + id="stop8879" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop8881" /> + </linearGradient> + <linearGradient + id="linearGradient8869"> + <stop + id="stop8871" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop8873" + offset="1" + style="stop-color:#000000;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient7421"> + <stop + id="stop7423" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop7425" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient7405"> + <stop + style="stop-color:#9e9e9e;stop-opacity:1;" + offset="0" + id="stop7407" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7409" /> + </linearGradient> + <linearGradient + id="linearGradient7378"> + <stop + id="stop7380" + offset="0" + style="stop-color:#9e9e9e;stop-opacity:1;" /> + <stop + id="stop7382" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <inkscape:perspective + id="perspective6864" + inkscape:persp3d-origin="32 : 21.333333 : 1" + inkscape:vp_z="64 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 32 : 1" + sodipodi:type="inkscape:persp3d" /> + <filter + id="imagebot_16" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-6" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-1" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-8" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-7" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-9" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-2" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-2" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-8" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-9" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-73" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-6" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-1" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-0"> + <feGaussianBlur + id="imagebot_21-7" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-5" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_12-0" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215"> + <feGaussianBlur + id="imagebot_18-4" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-8" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-02" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-9" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-4" + y2="0.73097426" + xlink:href="#linearGradient3928-8" + x2="36.048218" + y1="43.90382" + x1="35.173683" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-3" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-5" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-17" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618-6" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path11616-5" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618-6-9" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path11616-5-3" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618-6-4" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#ff0000;fill-opacity:1;fill-rule:evenodd;stroke:#ff0000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path11616-5-5" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618O" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="marker11618O"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#00ff00;fill-opacity:1;fill-rule:evenodd;stroke:#008000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path10547" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618OM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="marker11618OM"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="stroke-opacity:1;fill-rule:evenodd;fill-opacity:1;stroke:#008000;stroke-width:1.00000003pt;fill:#008000" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path22168" + inkscape:connector-curvature="0" /> + </marker> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(0,-440.31499)"> + <path + style="stroke-linejoin:miter;marker-end:url(#marker11618OM);stroke-opacity:1;stroke-dashoffset:0;stroke:#008000;stroke-linecap:butt;stroke-miterlimit:4;stroke-dasharray:none;stroke-width:3;fill:#008000" + d="m 210,612.51972 v 70" + id="path4851" + inkscape:connector-curvature="0" /> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:12.80000019px;line-height:0%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.06666672" + x="104.51711" + y="415.68225" + id="text3004"><tspan + sodipodi:role="line" + id="tspan3006" + x="104.51711" + y="415.68225" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:monospace;-inkscape-font-specification:monospace;stroke-width:1.06666672"> </tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#008000;fill-opacity:1;stroke:none" + x="25.672981" + y="626.91351" + id="text135"><tspan + sodipodi:role="line" + id="tspan133" + x="25.672981" + y="626.91351">condition</tspan><tspan + sodipodi:role="line" + x="25.672981" + y="666.91351" + id="tspan137">is true</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ff0000;fill-opacity:1;stroke:none" + x="245.22476" + y="628.25201" + id="text141"><tspan + sodipodi:role="line" + id="tspan139" + x="245.22476" + y="628.25201">condition</tspan><tspan + sodipodi:role="line" + x="245.22476" + y="668.25201" + id="tspan143">is false</tspan></text> + <g + id="g4813" + transform="translate(40,-139.99998)"> + <path + sodipodi:nodetypes="ccccc" + inkscape:connector-curvature="0" + id="path145" + d="m 50,702.51971 120,50 110,-50 -110,-50 z" + style="fill:#1a1a1a;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <text + id="text4458" + y="712.51971" + x="90.891823" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="712.51971" + x="90.891823" + id="tspan4456" + sodipodi:role="line">Condition</tspan></text> + </g> + <g + id="g4808" + transform="translate(-30,-89.999986)"> + <rect + y="782.51971" + x="150" + height="40" + width="200" + id="rect4803" + style="fill:#000000;stroke-width:5.1639781;stroke-miterlimit:4;stroke-dasharray:none" /> + <text + id="text4462" + y="812.51971" + x="160" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#ffffff;fill-opacity:1;stroke:none" + xml:space="preserve"><tspan + y="812.51971" + x="160" + id="tspan4460" + sodipodi:role="line">Code block</tspan></text> + </g> + <circle + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4820" + cx="55" + cy="377.51971" + r="5" /> + <ellipse + style="fill:none;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4824" + cx="130" + cy="482.51971" + rx="80" + ry="30" /> + <ellipse + style="fill:#000000;stroke:none;stroke-width:0.57854682;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="path4828" + cx="209.45428" + cy="452.49548" + rx="9.9901352" + ry="10.051409" /> + <g + id="g4849" + transform="translate(-73.821037,259.10369)"> + <ellipse + ry="14.991529" + rx="15.003441" + cy="572.61981" + cx="285.07419" + id="path4828-7" + style="fill:#000000;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + <ellipse + ry="19.497755" + rx="19.461161" + cy="572.5061" + cx="285.07285" + id="path4845" + style="fill:none;stroke:#000000;stroke-width:0.90602088;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + </g> + <path + style="fill:none;stroke:#000000;stroke-width:2.26778674;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6)" + d="m 210,462.51973 v 39.99999" + id="path4851-6" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-9)" + d="m 210,732.51972 v 20 H 10 v -280 h 190" + id="path4851-6-7" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:none;stroke:#ff0000;stroke-width:3;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker-end:url(#marker11618-6-4)" + d="m 320,562.51972 80,10e-6 V 762.51972 H 210 v 40" + id="path4851-6-2" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + </g> + <script + ns1:version="14.10-05142318" + id="sozi-script">function namespace(b,d,a){var c=b;d.split(".").forEach(function(e){if(typeof c[e]==="undefined"){c[e]={}}c=c[e]});if(a){a(c,b)}return c}namespace(this,"sozi.events",function(b){var a={};b.listen=function(c,d){if(!a.hasOwnProperty(c)){a[c]=[]}a[c].push(d)};b.fire=function(d){var c=Array.prototype.slice.call(arguments,1);if(a.hasOwnProperty(d)){a[d].forEach(function(e){e.apply(null,c)})}}});namespace(this,"sozi.proto",function(a){a.Object={installConstructors:function(){function b(){}b.prototype=this;this.instance=function(){var c=new b();c.construct.apply(c,arguments);return c};this.subtype=function(d){var c=new b();c.augment(d);c.installConstructors();return c}},construct:function(){},augment:function(c){for(var b in c){if(c.hasOwnProperty(b)){this[b]=c[b]}}return this},bind:function(c){var b=this;return function(){return c.apply(b,arguments)}}};a.Object.installConstructors()});namespace(this,"sozi.actions",function(A,g){var u=namespace(g,"sozi.player");var v=namespace(g,"sozi.display");var n=g.document;var o=0;var w=1;var t=1.05;var y=5;var m=5;var r=false;var i=0;var h=0;function a(C,B,D){u.stop();v.viewPorts.player.zoom(C>0?t:1/t,B,D)}function x(B){u.stop();v.viewPorts.player.rotate(B>0?y:-y)}function s(){if(sozi.framelist.isVisible()){sozi.framelist.hide();u.restart()}else{u.stop();sozi.framelist.show()}}function d(B){return v.viewPorts.player.contains(B.clientX,B.clientY)}function f(B){if(!d(B)){return}if(B.button===o){n.documentElement.addEventListener("mousemove",q,false);r=false;i=B.clientX;h=B.clientY}else{if(B.button===w){s()}}B.stopPropagation();B.preventDefault()}function q(B){if(!d(B)){return}u.stop();if(!r&&(Math.abs(B.clientX-i)>m||Math.abs(B.clientY-h)>m)){r=true}if(r){sozi.events.fire("sozi.player.cleanup");v.viewPorts.player.drag(B.clientX-i,B.clientY-h);i=B.clientX;h=B.clientY}B.stopPropagation()}function c(B){if(!d(B)){return}if(B.button===o){n.documentElement.removeEventListener("mousemove",q,false)}B.stopPropagation();B.preventDefault()}function p(B){if(!d(B)){return}u.moveToPrevious();B.stopPropagation();B.preventDefault()}function e(B){if(!d(B)){return}if(!r&&B.button!==w){u.moveToNext()}B.stopPropagation();B.preventDefault()}function j(B){if(!d(B)){return}if(!B){B=g.event}var C=0;if(B.wheelDelta){C=B.wheelDelta}else{if(B.detail){C=-B.detail}}if(C!==0){if(B.shiftKey){x(C)}else{a(C,B.clientX,B.clientY)}}B.stopPropagation();B.preventDefault()}function l(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.charCode||B.which){case 43:a(1,g.innerWidth/2,g.innerHeight/2);break;case 45:a(-1,g.innerWidth/2,g.innerHeight/2);break;case 61:u.moveToCurrent();break;case 70:case 102:u.showAll();break;case 84:case 116:s();break;case 82:x(-1);break;case 114:x(1);break;default:return}B.stopPropagation();B.preventDefault()}function b(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.keyCode){case 36:if(B.shiftKey){u.jumpToFirst()}else{u.moveToFirst()}break;case 35:if(B.shiftKey){u.jumpToLast()}else{u.moveToLast()}break;case 38:case 33:case 37:if(B.shiftKey){u.jumpToPrevious()}else{u.moveToPrevious()}break;case 40:case 34:case 39:case 13:case 32:if(B.shiftKey){u.jumpToNext()}else{u.moveToNext()}break;default:return}B.stopPropagation();B.preventDefault()}function z(B){B.stopPropagation()}function k(){var C=n.getElementsByTagName("a");for(var D=0;D<C.length;D+=1){C[D].addEventListener("click",z,false);C[D].addEventListener("contextmenu",z,false)}var B=n.documentElement;B.addEventListener("click",e,false);B.addEventListener("mousedown",f,false);B.addEventListener("mouseup",c,false);B.addEventListener("contextmenu",p,false);B.addEventListener("DOMMouseScroll",j,false);g.onmousewheel=j;B.addEventListener("keypress",l,false);B.addEventListener("keydown",b,false)}sozi.events.listen("sozi.display.ready",k)});namespace(this,"sozi.animation",function(d,g){var h=g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame;var k=function(){return g.performance&&g.performance.now?g.performance.now():Date.now()};d.setAnimationFrameHandlers=function(l,m){h=l;k=m};var i=40;var c;var j=[];function e(){if(j.length>0){if(h){h(e)}j.forEach(function(l){l.step(k())})}else{if(!h){g.clearInterval(c)}}}function b(){if(h){h(e)}else{c=g.setInterval(function(){e(k())},i)}}function a(l){j.push(l);if(j.length===1){b()}}function f(l){j.splice(j.indexOf(l),1)}d.Animator=sozi.proto.Object.subtype({construct:function(){this.durationMs=0;this.data=null;this.initialTime=0;this.started=false},start:function(l,m){this.durationMs=l;this.data=m;this.initialTime=k();this.onStep(0);if(!this.started){this.started=true;a(this)}},stop:function(){if(this.started){f(this);this.started=false}},step:function(m){var l=m-this.initialTime;if(l>=this.durationMs){this.stop();this.onStep(1);this.onDone()}else{this.onStep(l/this.durationMs)}},onStep:function(l){},onDone:function(){}});d.profiles={linear:function(l){return l},accelerate:function(l){return Math.pow(l,3)},"strong-accelerate":function(l){return Math.pow(l,5)},decelerate:function(l){return 1-Math.pow(1-l,3)},"strong-decelerate":function(l){return 1-Math.pow(1-l,5)},"accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,3)/2;return l<=0.5?n:1-n},"strong-accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,5)/2;return l<=0.5?n:1-n},"decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,2))/2;return l<=0.5?n:1-n},"strong-decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,3))/2;return l<=0.5?n:1-n},"immediate-beginning":function(l){return 1},"immediate-end":function(l){return l===1?1:0},"immediate-middle":function(l){return l>=0.5?1:0}}});namespace(this,"sozi.display",function(c,g){var f="http://www.w3.org/2000/svg";var b="http://www.w3.org/1999/xlink";var i=g.document;var k;var h;var j;c.viewPorts={};var e;c.CameraState=sozi.proto.Object.subtype({construct:function(){this.cx=this.cy=0;this.width=this.height=1;this.angle=0;this.clipped=true;this.transitionZoomPercent=0;this.transitionProfile=sozi.animation.profiles.linear;this.transitionPath=null},setCenter:function(l,m){this.cx=l;this.cy=m;return this},setSize:function(m,l){this.width=m;this.height=l;return this},setClipped:function(l){this.clipped=l;return this},setAngle:function(l){this.angle=(l+180)%360-180;return this},setRawAngle:function(l){this.angle=l;return this},setTransitionZoomPercent:function(l){this.transitionZoomPercent=l;return this},setTransitionProfile:function(l){this.transitionProfile=l;return this},setTransitionPath:function(l){this.transitionPath=l;return this},setAtElement:function(p){var s,o,t,m;if(p.nodeName==="rect"){s=p.x.baseVal.value;o=p.y.baseVal.value;t=p.width.baseVal.value;m=p.height.baseVal.value}else{var q=p.getBBox();s=q.x;o=q.y;t=q.width;m=q.height}var n=i.documentElement.createSVGPoint();n.x=s+t/2;n.y=o+m/2;var r=p.getCTM();n=n.matrixTransform(r);var l=Math.sqrt(r.a*r.a+r.b*r.b);return this.setCenter(n.x,n.y).setSize(t*l,m*l).setAngle(Math.atan2(r.b,r.a)*180/Math.PI)},setAtState:function(l){return this.setCenter(l.cx,l.cy).setSize(l.width,l.height).setAngle(l.angle).setClipped(l.clipped).setTransitionZoomPercent(l.transitionZoomPercent).setTransitionProfile(l.transitionProfile).setTransitionPath(l.transitionPath)},interpolatableAttributes:["width","height","angle"],interpolate:function(n,o,t,v,r){var p=1-t;for(var q=0;q<this.interpolatableAttributes.length;q+=1){var s=this.interpolatableAttributes[q];this[s]=o[s]*t+n[s]*p}var l=r?n.transitionPath:o.transitionPath;if(v&&l){var x=l.getTotalLength();if(r){var m=l.getPointAtLength(x);var u=l.getPointAtLength(0);var w=l.getPointAtLength(x*p)}else{var m=l.getPointAtLength(0);var u=l.getPointAtLength(x);var w=l.getPointAtLength(x*t)}this.cx=w.x+(o.cx-u.x)*t+(n.cx-m.x)*p;this.cy=w.y+(o.cy-u.y)*t+(n.cy-m.y)*p}else{this.cx=o.cx*t+n.cx*p;this.cy=o.cy*t+n.cy*p}}});c.Camera=c.CameraState.subtype({construct:function(n,o){c.CameraState.construct.call(this);this.viewPort=n;this.svgClipRect=i.createElementNS(f,"rect");var m=i.createElementNS(f,"clipPath");m.setAttribute("id","sozi-clip-path-"+n.id+"-"+o);m.appendChild(this.svgClipRect);n.svgGroup.appendChild(m);var l=i.createElementNS(f,"g");l.setAttribute("clip-path","url(#sozi-clip-path-"+n.id+"-"+o+")");n.svgGroup.appendChild(l);if(n.isPrimary){this.svgLayer=i.createElementNS(f,"g");this.svgLayer.appendChild(i.getElementById(o))}else{this.svgLayer=i.createElementNS(f,"use");this.svgLayer.setAttributeNS(b,"href","#"+o)}l.appendChild(this.svgLayer)},setAtState:function(l){return c.CameraState.setAtState.call(this,l).update()},getScale:function(){return Math.min(this.viewPort.width/this.width,this.viewPort.height/this.height)},rotate:function(l){return this.setAngle(this.angle+l).update()},zoom:function(m,l,n){return this.setSize(this.width/m,this.height/m).drag((1-m)*(l-this.viewPort.width/2),(1-m)*(n-this.viewPort.height/2))},drag:function(m,l){var q=this.getScale();var o=this.angle*Math.PI/180;var n=Math.sin(o);var p=Math.cos(o);return this.setCenter(this.cx-(m*p-l*n)/q,this.cy-(m*n+l*p)/q).setClipped(false).update()},update:function(){var q=this.getScale();var n=this.width*q;var m=this.height*q;var l=(this.viewPort.width-n)/2;var r=(this.viewPort.height-m)/2;this.svgClipRect.setAttribute("x",this.clipped?l:0);this.svgClipRect.setAttribute("y",this.clipped?r:0);this.svgClipRect.setAttribute("width",this.clipped?n:this.viewPort.width);this.svgClipRect.setAttribute("height",this.clipped?m:this.viewPort.height);var p=-this.cx+this.width/2+l/q;var o=-this.cy+this.height/2+r/q;this.svgLayer.setAttribute("transform","scale("+q+")translate("+p+","+o+")rotate("+(-this.angle)+","+this.cx+","+this.cy+")");return this}});c.ViewPort=sozi.proto.Object.subtype({construct:function(n,m,l){this.id=n;c.viewPorts[n]=this;this.isPrimary=!!l;if(this.isPrimary){if(e){throw"Failed to create a primary viewport. A primary viewport already exists."}else{e=this}}this.svgGroup=i.createElementNS(f,"g");this.svgGroup.setAttribute("class","sozi-viewport");this.svgGroup.setAttribute("id","sozi-viewport-"+n);i.documentElement.appendChild(this.svgGroup);this.setLocation(0,0).setSize(g.innerWidth,g.innerHeight);this.cameras={};m.forEach(function(o){this.cameras[o]=c.Camera.instance(this,o)},this)},setSize:function(m,l){this.width=m;this.height=l;return this},setLocation:function(l,m){this.x=l;this.y=m;return this},contains:function(l,m){return l>=this.x&&l<this.x+this.width&&m>=this.y&&m<this.y+this.height},getDocumentState:function(){var m=c.CameraState.instance().setCenter(k.x+k.width/2,k.y+k.height/2).setSize(k.width,k.height).setClipped(false);var l={};for(var n in this.cameras){l[n]=m}return l},update:function(){this.svgGroup.setAttribute("transform","translate("+this.x+","+this.y+")");for(var l in this.cameras){this.cameras[l].update()}return this},showFrame:function(l){for(var m in l.states){this.cameras[m].setAtState(l.states[m])}return this},drag:function(m,l){for(var n in this.cameras){this.cameras[n].drag(m,l)}return this},zoom:function(m,l,o){for(var n in this.cameras){this.cameras[n].zoom(m,l,o)}return this},rotate:function(l){for(var m in this.cameras){this.cameras[m].rotate(l)}return this},onWindowResize:function(m,l){this.setLocation(this.x*m,this.y*l).setSize(this.width*m,this.height*l).update()}});function d(){var l=i.documentElement;k=l.getBBox();h=g.innerWidth;j=g.innerHeight;l.setAttribute("width",h);l.setAttribute("height",j);sozi.events.fire("sozi.display.ready")}function a(){var l=i.documentElement;l.setAttribute("width",g.innerWidth);l.setAttribute("height",g.innerHeight);for(var m in c.viewPorts){c.viewPorts[m].onWindowResize(g.innerWidth/h,g.innerHeight/j)}h=g.innerWidth;j=g.innerHeight}sozi.events.listen("sozi.document.ready",d);g.addEventListener("resize",a,false)});namespace(this,"sozi.document",function(c,e){var g=e.document;var b="http://sozi.baierouge.fr";var d={title:"Untitled",sequence:"0",hide:"true",clip:"true","show-in-frame-list":"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear","transition-path-hide":"true"};var h=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"];c.frames=[];c.idLayerList=[];function j(l,k){return l.getAttributeNS(b,k)||d[k]}function i(o,p,k){var l=o.states[p]=o.states[p]||sozi.display.CameraState.instance();if(typeof l.transitionZoomPercent==="undefined"||k.hasAttributeNS(b,"transition-zoom-percent")){l.setTransitionZoomPercent(parseInt(j(k,"transition-zoom-percent"),10))}if(typeof l.transitionProfile==="undefined"||k.hasAttributeNS(b,"transition-profile")){l.setTransitionProfile(sozi.animation.profiles[j(k,"transition-profile")])}if(typeof l.transitionPath==="undefined"||k.hasAttributeNS(b,"transition-path")){var n=g.getElementById(k.getAttributeNS(b,"transition-path"));if(n&&n.nodeName==="path"){l.setTransitionPath(n);if(j(k,"transition-path-hide")==="true"){n.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"refid")){var m=g.getElementById(k.getAttributeNS(b,"refid"));if(m){l.setAtElement(m);if(j(k,"hide")==="true"){m.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"clip")){l.setClipped(j(k,"clip")==="true")}}function a(){var l=[];var p=g.getElementsByTagNameNS(b,"layer");for(var n=0;n<p.length;n+=1){var s=p[n].getAttributeNS(b,"group");if(s&&l.indexOf(s)===-1){l.push(s)}}var r=g.documentElement;var o="http://www.w3.org/2000/svg";var q=g.createElementNS(o,"g");var k=Array.prototype.slice.call(r.childNodes);k.forEach(function(u,t){if(!u.getAttribute){r.removeChild(u)}else{if(l.indexOf(u.getAttribute("id"))!==-1){if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+t);c.idLayerList.push("sozi-wrapper-"+t);r.insertBefore(q,u);q=g.createElementNS(o,"g")}c.idLayerList.push(u.getAttribute("id"))}else{if(h.indexOf(u.localName.toLowerCase())!==-1){r.removeChild(u);q.appendChild(u)}}}});if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+k.length);c.idLayerList.push("sozi-wrapper-"+k.length);r.appendChild(q)}var m=Array.prototype.slice.call(g.getElementsByTagNameNS(b,"frame"));m.sort(function(u,t){var w=parseInt(j(u,"sequence"),10);var v=parseInt(j(t,"sequence"),10);return w-v});m.forEach(function(v,u){var x={id:v.getAttribute("id"),title:j(v,"title"),showInFrameList:j(v,"show-in-frame-list")==="true",sequence:parseInt(j(v,"sequence"),10),timeoutEnable:j(v,"timeout-enable")==="true",timeoutMs:parseInt(j(v,"timeout-ms"),10),transitionDurationMs:parseInt(j(v,"transition-duration-ms"),10),states:{}};c.idLayerList.forEach(function(A){if(u===0||A.search("sozi-wrapper-[0-9]+")!==-1){i(x,A,v)}else{var z=x.states[A]=sozi.display.CameraState.instance();var y=c.frames[c.frames.length-1].states[A];z.setAtState(y)}});var t=Array.prototype.slice.call(v.getElementsByTagNameNS(b,"layer"));t.forEach(function(y){var z=y.getAttributeNS(b,"group");if(z&&c.idLayerList.indexOf(z)!==-1){i(x,z,y)}});for(var w in x.states){if(x.states.hasOwnProperty(w)){c.frames.push(x);break}}})}c.getFrameIndexForId=function(l){for(var k=0;k<c.frames.length;k+=1){if(c.frames[k].id===l){return k}}return -1};function f(){g.documentElement.removeAttribute("viewBox");a();sozi.events.fire("sozi.document.ready")}e.addEventListener("load",f,false)});namespace(this,"sozi.framelist",function(u,k){var o=k.document;var c=5;var i;var p;var j=0;var h;var s;var b;var v;var w;var t;var e=300;var f="decelerate";var a="http://www.w3.org/2000/svg";function n(z){var x=z.relatedTarget,y=o.documentElement;while(x&&x!==i&&x!==y){x=x.parentNode}if(x!==i){u.hide();sozi.player.restart();z.stopPropagation()}}function r(y){var x=p.getCTM().f;if(x<=-k.innerHeight/2){x+=k.innerHeight/2}else{if(x<0){x=0}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function d(y){var x=p.getCTM().f;if(x+j>=k.innerHeight*3/2){x-=k.innerHeight/2}else{if(x+j>k.innerHeight+2*c){x=k.innerHeight-j-4*c}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function g(x){return function(y){sozi.player.previewFrame(x);y.stopPropagation()}}function l(x){x.stopPropagation()}function q(){i=o.createElementNS(a,"g");i.setAttribute("id","sozi-toc");o.documentElement.appendChild(i);p=o.createElementNS(a,"g");i.appendChild(p);var y=o.createElementNS(a,"rect");y.setAttribute("id","sozi-toc-background");y.setAttribute("x",c);y.setAttribute("y",c);y.setAttribute("rx",c);y.setAttribute("ry",c);y.addEventListener("click",l,false);y.addEventListener("mousedown",l,false);y.addEventListener("mouseout",n,false);p.appendChild(y);var A=0;sozi.document.frames.forEach(function(D,E){if(D.showInFrameList){var C=o.createElementNS(a,"text");C.appendChild(o.createTextNode(D.title));C.setAttribute("id","sozi-toc-"+D.id);p.appendChild(C);if(E===sozi.player.currentFrameIndex){C.setAttribute("class","sozi-toc-current")}var B=C.getBBox().width;j+=C.getBBox().height;if(B>A){A=B}C.setAttribute("x",2*c);C.setAttribute("y",j+c);C.addEventListener("click",g(E),false);C.addEventListener("mousedown",l,false)}});var x=o.createElementNS(a,"path");x.setAttribute("class","sozi-toc-arrow");x.setAttribute("d","M"+(A+3*c)+","+(5*c)+" l"+(4*c)+",0 l-"+(2*c)+",-"+(3*c)+" z");x.addEventListener("click",r,false);x.addEventListener("mousedown",l,false);i.appendChild(x);var z=o.createElementNS(a,"path");z.setAttribute("class","sozi-toc-arrow");z.setAttribute("d","M"+(A+3*c)+","+(7*c)+" l"+(4*c)+",0 l-"+(2*c)+","+(3*c)+" z");z.addEventListener("click",d,false);z.addEventListener("mousedown",l,false);i.appendChild(z);y.setAttribute("width",A+7*c);y.setAttribute("height",j+2*c);h=-A-9*c;s=0;w=v=h;i.setAttribute("transform","translate("+h+",0)");t=sozi.animation.Animator.instance().augment({onStep:function(B){var D=sozi.animation.profiles[f](B),C=1-D;w=v*D+b*C;i.setAttribute("transform","translate("+w+",0)")}})}function m(x){var y=Array.prototype.slice.call(o.getElementsByClassName("sozi-toc-current"));y.forEach(function(A){A.removeAttribute("class")});var z=sozi.document.frames[x];if(z.showInFrameList){o.getElementById("sozi-toc-"+z.id).setAttribute("class","sozi-toc-current")}}u.show=function(){o.documentElement.appendChild(i);b=w;v=s;t.start(e)};u.hide=function(){b=w;v=h;t.start(e)};u.isVisible=function(){return v===s};sozi.events.listen("sozi.player.ready",q);sozi.events.listen("sozi.player.cleanup",u.hide);sozi.events.listen("sozi.player.framechange",m)});namespace(this,"sozi.framenumber",function(a,d){var g=d.document;var e;var k,i;var f;var b="http://www.w3.org/2000/svg";function h(){var m=k.getBBox(),n=Math.max(m.width,m.height)*0.75,l=n*1.25;f.setAttribute("r",n);e.setAttribute("transform","translate("+l+","+l+")")}function c(){e=g.createElementNS(b,"g");k=g.createElementNS(b,"text");f=g.createElementNS(b,"circle");e.setAttribute("id","sozi-framenumber");f.setAttribute("cx",0);f.setAttribute("cy",0);e.appendChild(f);i=g.createTextNode(sozi.player.currentFrameIndex+1);k.setAttribute("text-anchor","middle");k.setAttribute("dominant-baseline","central");k.setAttribute("x",0);k.setAttribute("y",0);k.appendChild(i);e.appendChild(k);g.documentElement.appendChild(e);h()}function j(l){i.nodeValue=l+1}sozi.events.listen("sozi.player.ready",c);sozi.events.listen("sozi.player.framechange",j)});namespace(this,"sozi.links",function(c,e){var b="http://www.w3.org/2000/svg";var a="http://www.w3.org/1999/xlink";function f(g){return function(h){sozi.player.moveToFrame(g);h.preventDefault();h.stopPropagation()}}function d(){var h=e.document.getElementsByTagNameNS(b,"a");for(var j=0;j<h.length;j+=1){var g=h[j].getAttributeNS(a,"href");if(g&&g[0]==="#"){h[j].addEventListener("click",f(sozi.location.getFrameIndexForHash(g)),false)}}}sozi.events.listen("sozi.document.ready",d)});namespace(this,"sozi.location",function(a,d){var b=false;a.getFrameIndex=function(){return a.getFrameIndexForHash(d.location.hash)};a.getFrameIndexForHash=function(g){var h=g?g.slice(1):"1";var f;if(/^[0-9]+$/.test(h)){f=parseInt(h,10)-1}else{f=sozi.document.getFrameIndexForId(h)}if(f<0){return 0}else{if(f>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return f}}};function e(){var f=a.getFrameIndex();if(!b){sozi.player.moveToFrame(f)}b=false}function c(f){b=true;d.location.hash="#"+sozi.document.frames[f].id}d.addEventListener("hashchange",e,false);sozi.events.listen("sozi.player.framechange",c)});namespace(this,"sozi.player",function(d,g){var l;var c;var i;var e=500;var n=-10;var j="linear";var f=0;d.currentFrameIndex=0;var k=false;var m=false;function h(){if(sozi.document.frames[d.currentFrameIndex].timeoutEnable){m=true;var o=(d.currentFrameIndex+1)%sozi.document.frames.length;i=g.setTimeout(function(){d.moveToFrame(o)},sozi.document.frames[d.currentFrameIndex].timeoutMs)}}d.startFromIndex=function(o){k=true;m=false;f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);h()};d.restart=function(){d.startFromIndex(d.currentFrameIndex)};d.stop=function(){c.stop();if(m){g.clearTimeout(i);m=false}k=false;f=d.currentFrameIndex};function b(o,y,w){var z={ss:((o<0)?Math.max(y,w):Math.min(y,w))*(100-o)/100,ts:0.5,k:0};if(o!==0){var s=y-w;var r=y-z.ss;var q=w-z.ss;if(s!==0){var p=Math.sqrt(r*q);var x=(r-p)/s;var t=(r+p)/s;z.ts=(x>0&&x<=1)?x:t}z.k=r/z.ts/z.ts}return z}d.jumpToFrame=function(o){d.stop();sozi.events.fire("sozi.player.cleanup");f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);sozi.events.fire("sozi.player.framechange",o)};d.getAnimationData=function(o,q,s,p,v,t){var r={};for(var w in o){r[w]={initialState:sozi.display.CameraState.instance(),finalState:sozi.display.CameraState.instance(),useTransitionPath:v,reverseTransitionPath:t};r[w].profile=p||q[w].transitionProfile;r[w].initialState.setAtState(o[w]);if(q.hasOwnProperty(w)){r[w].finalState.setAtState(q[w])}else{r[w].finalState.setAtState(o[w])}if(r[w].finalState.angle-r[w].initialState.angle>180){r[w].finalState.setRawAngle(r[w].finalState.angle-360)}else{if(r[w].finalState.angle-r[w].initialState.angle<-180){r[w].initialState.setRawAngle(r[w].initialState.angle-360)}}var u=s||q[w].transitionZoomPercent;if(u&&q.hasOwnProperty(w)){r[w].zoomWidth=b(u,o[w].width,q[w].width);r[w].zoomHeight=b(u,o[w].height,q[w].height)}}return r};d.previewFrame=function(o){d.currentFrameIndex=o;c.start(e,d.getAnimationData(l.cameras,sozi.document.frames[o].states,n,sozi.animation.profiles[j]),false,false);sozi.events.fire("sozi.player.framechange",o)};d.moveToFrame=function(r){if(m){g.clearTimeout(i);m=false}var q,t,s,p,o;if(r===(d.currentFrameIndex-1)%sozi.document.frames.length){q=sozi.document.frames[d.currentFrameIndex].transitionDurationMs;t=undefined;s=undefined;p=true;o=true}else{if(r===(d.currentFrameIndex+1)%sozi.document.frames.length){q=sozi.document.frames[r].transitionDurationMs;t=undefined;s=undefined;p=true;o=false}else{q=e;t=n;s=sozi.animation.profiles[j];p=false;o=false}}sozi.events.fire("sozi.player.cleanup");k=true;d.currentFrameIndex=r;c.start(q,d.getAnimationData(l.cameras,sozi.document.frames[r].states,t,s,p,o));sozi.events.fire("sozi.player.framechange",r)};d.jumpToFirst=function(){d.jumpToFrame(0)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var o=d.currentFrameIndex;if(!c.started||f<=d.currentFrameIndex){o-=1}if(o>=0){d.jumpToFrame(o)}};d.moveToPrevious=function(){for(var o=d.currentFrameIndex-1;o>=0;o-=1){var p=sozi.document.frames[o];if(!p.timeoutEnable||p.timeoutMs!==0){d.moveToFrame(o);break}}};d.jumpToNext=function(){var o=d.currentFrameIndex;if(!c.started||f>=d.currentFrameIndex){o+=1}if(o<sozi.document.frames.length){d.jumpToFrame(o)}};d.moveToNext=function(){if(d.currentFrameIndex<sozi.document.frames.length-1||sozi.document.frames[d.currentFrameIndex].timeoutEnable){d.moveToFrame((d.currentFrameIndex+1)%sozi.document.frames.length)}};d.jumpToLast=function(){d.jumpToFrame(sozi.document.frames.length-1)};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(d.currentFrameIndex)};d.showAll=function(){d.stop();sozi.events.fire("sozi.player.cleanup");c.start(e,d.getAnimationData(l.cameras,l.getDocumentState(),n,sozi.animation.profiles[j],false,false))};function a(){l=sozi.display.ViewPort.instance("player",sozi.document.idLayerList,true);d.startFromIndex(sozi.location.getFrameIndex());g.setTimeout(l.bind(l.update),1);sozi.events.fire("sozi.player.ready")}d.onAnimationStep=function(o,q){for(var s in q){var p=l.cameras[s];p.interpolate(q[s].initialState,q[s].finalState,q[s].profile(o),q[s].useTransitionPath,q[s].reverseTransitionPath);var r;if(q[s].zoomWidth&&q[s].zoomWidth.k!==0){r=o-q[s].zoomWidth.ts;p.width=q[s].zoomWidth.k*r*r+q[s].zoomWidth.ss}if(q[s].zoomHeight&&q[s].zoomHeight.k!==0){r=o-q[s].zoomHeight.ts;p.height=q[s].zoomHeight.k*r*r+q[s].zoomHeight.ss}p.setClipped(q[s].finalState.clipped)}l.update()};c=sozi.animation.Animator.instance().augment({onStep:function(o){d.onAnimationStep(o,this.data)},onDone:function(){for(var o in this.data){l.cameras[o].setAtState(this.data[o].finalState)}l.update();f=d.currentFrameIndex;if(k){h()}}});sozi.events.listen("sozi.display.ready",a)});</script> + <style + ns1:version="14.10-05142318" + id="sozi-style">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}#sozi-framenumber circle{stroke:#222;stroke-opacity:.1;stroke-width:4;fill:#222;fill-opacity:.9}#sozi-framenumber text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}</style> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="1" + ns1:title="Gcd implementation" + ns1:refid="rect10351" /> + <ns1:frame + ns1:refid="rect10841" + ns1:title="Gcd maven packaging" + ns1:sequence="2" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="3" + ns1:title="Using Math.getGcd()" + ns1:refid="rect11089" /> + <ns1:frame + ns1:refid="rect11381" + ns1:title="Fraction project" + ns1:sequence="4" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000.0" + ns1:transition-duration-ms="1000.0" + ns1:transition-zoom-percent="0.0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> + <ns1:frame + ns1:transition-path-hide="true" + ns1:transition-profile="linear" + ns1:transition-zoom-percent="0.0" + ns1:transition-duration-ms="1000.0" + ns1:timeout-ms="5000.0" + ns1:timeout-enable="false" + ns1:show-in-frame-list="true" + ns1:clip="true" + ns1:hide="true" + ns1:sequence="5" + ns1:title="Maven dependency definition" + ns1:refid="rect11637" /> + <ns1:frame + ns1:refid="rect11895" + ns1:title="Fraction depends on Gcd" + ns1:sequence="6" + ns1:hide="true" + ns1:clip="true" + ns1:show-in-frame-list="true" + ns1:timeout-enable="false" + ns1:timeout-ms="5000" + ns1:transition-duration-ms="1000" + ns1:transition-zoom-percent="0" + ns1:transition-profile="linear" + ns1:transition-path-hide="true" /> +</svg> diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index f4a4b2c1f6e15b5b83206075d32f1d99260ea425..b9ec052b2ea095ddd848d99ca652423f22624f87 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -1,13 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<chapter version="5.1" xml:id="sw1ChapterObjectsClasses" - xmlns="http://docbook.org/ns/docbook" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:xi="http://www.w3.org/2001/XInclude" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns:ns="http://docbook.org/ns/transclusion" - xmlns:m="http://www.w3.org/1998/Math/MathML" - xmlns:html="http://www.w3.org/1999/xhtml" - xmlns:db="http://docbook.org/ns/docbook"> +<chapter version="5.1" xml:id="sw1ChapterObjectsClasses" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns="http://docbook.org/ns/transclusion" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:db="http://docbook.org/ns/docbook"> <title>Objects and Classes</title> <section annotations="slide" xml:id="classintro"> @@ -19,8 +11,7 @@ <title>Classes in OO languages</title> <informalfigure> - <para>In object oriented languages <emphasis - role="bold">classes</emphasis>:</para> + <para>In object oriented languages <emphasis role="bold">classes</emphasis>:</para> <itemizedlist> <listitem> @@ -54,29 +45,23 @@ <figure xml:id="figClassBicycle"> <title>A class Bicycle</title> - <programlisting language="java">public class Bicycle <co - linkends="calloutClassBicycle-1" xml:id="calloutClassBicycle-1-co"/> { - float speed; <co linkends="calloutClassBicycle-2" - xml:id="calloutClassBicycle-2-co"/> // km per hour + <programlisting language="java">public class Bicycle <co linkends="calloutClassBicycle-1" xml:id="calloutClassBicycle-1-co"/> { + float speed; <co linkends="calloutClassBicycle-2" xml:id="calloutClassBicycle-2-co"/> // km per hour - void accelerate() <co linkends="calloutClassBicycle-3" - xml:id="calloutClassBicycle-3-co"/> { + void accelerate() <co linkends="calloutClassBicycle-3" xml:id="calloutClassBicycle-3-co"/> { speed += 2; }</programlisting> <calloutlist> - <callout arearefs="calloutClassBicycle-1-co" - xml:id="calloutClassBicycle-1"> + <callout arearefs="calloutClassBicycle-1-co" xml:id="calloutClassBicycle-1"> <para>Defining a class Bicycle</para> </callout> - <callout arearefs="calloutClassBicycle-2-co" - xml:id="calloutClassBicycle-2"> + <callout arearefs="calloutClassBicycle-2-co" xml:id="calloutClassBicycle-2"> <para>An attribute <property>speed</property>.</para> </callout> - <callout arearefs="calloutClassBicycle-3-co" - xml:id="calloutClassBicycle-3"> + <callout arearefs="calloutClassBicycle-3-co" xml:id="calloutClassBicycle-3"> <para>A method <methodname>accelerate()</methodname>.</para> </callout> </calloutlist> @@ -85,49 +70,25 @@ </section> <section xml:id="sd1SectMoreEclipseFeatures"> - <title>Preliminaries: <xref linkend="glo_Soft_Eclipse"/> and <xref - linkend="glo_Maven"/> tooling</title> + <title>Preliminaries: <xref linkend="glo_Soft_Eclipse"/> and <xref linkend="glo_Maven"/> tooling</title> - <para>Having advanced our <xref linkend="glo_Java"/> language knowledge we - now improve using the <xref linkend="glo_Soft_Eclipse"/> <xref - linkend="glo_IDE"/>.</para> + <para>Having advanced our <xref linkend="glo_Java"/> language knowledge we now improve using the <xref linkend="glo_Soft_Eclipse"/> <xref linkend="glo_IDE"/>.</para> <section xml:id="sd1SectUsingMavenEclipse"> - <title>Using <xref linkend="glo_Maven"/> with <xref - linkend="glo_Soft_Eclipse"/></title> - - <para>We extensively use <xref linkend="glo_Maven"/> both in the current - and in subsequent lectures. <xref linkend="glo_Maven"/> in the first - place is independent from Eclipse and other IDEs. Most IDEs however do - provide at least some level of <xref linkend="glo_Maven"/> integration. - The <link - xlink:href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars2">Eclipse - J2EE version</link> ships with first class Maven support. The Maven - software itself is already installed at MI/Ubuntu and in the current - lecture's VirtualBox image as well.</para> - - <para>You may want to watch the introduction <quote - xlink:href="https://www.youtube.com/watch?v=X8lu7Oi23YQ">Creating a - Simple Maven Project in m2eclipse</quote>.</para> - - <para>Furthermore the MI department provides additional <xref - linkend="glo_Maven"/> archetypes addressing different requirements with - respect to testing and logging. Some of them also include dedicated - frameworks addressing specific problem domains. Using these archetypes - in Eclipse requires a configuration step:</para> + <title>Using <xref linkend="glo_Maven"/> with <xref linkend="glo_Soft_Eclipse"/></title> + + <para>We extensively use <xref linkend="glo_Maven"/> both in the current and in subsequent lectures. <xref linkend="glo_Maven"/> in the first place is independent from Eclipse and other IDEs. Most IDEs however do provide at least some level of <xref linkend="glo_Maven"/> integration. The <link xlink:href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars2">Eclipse J2EE version</link> ships with first class Maven support. The Maven software itself is already installed at MI/Ubuntu and in the current lecture's VirtualBox image as well.</para> + + <para>You may want to watch the introduction <quote xlink:href="https://www.youtube.com/watch?v=X8lu7Oi23YQ">Creating a Simple Maven Project in m2eclipse</quote>.</para> + + <para>Furthermore the MI department provides additional <xref linkend="glo_Maven"/> archetypes addressing different requirements with respect to testing and logging. Some of them also include dedicated frameworks addressing specific problem domains. Using these archetypes in Eclipse requires a configuration step:</para> <itemizedlist> <listitem> - <para>Configure <link - xlink:href="https://maven.mi.hdm-stuttgart.de">https://maven.mi.hdm-stuttgart.de</link> - in your <xref linkend="glo_Soft_Eclipse"/> <xref linkend="glo_IDE"/> - at - <guimenu>Window-->Preferences-->Maven-->Archetypes-->Add - Remote Catalog</guimenu>.</para> + <para>Configure <link xlink:href="https://maven.mi.hdm-stuttgart.de">https://maven.mi.hdm-stuttgart.de</link> in your <xref linkend="glo_Soft_Eclipse"/> <xref linkend="glo_IDE"/> at <guimenu>Window-->Preferences-->Maven-->Archetypes-->Add Remote Catalog</guimenu>.</para> <caution> - <para>Click <guibutton>verify</guibutton> to assure correct - configuration.</para> + <para>Click <guibutton>verify</guibutton> to assure correct configuration.</para> </caution> <mediaobject> @@ -138,11 +99,7 @@ </listitem> <listitem> - <para>Tick the checkboxes <quote>Download Artifact JavaDoc</quote> - and <quote>Update Maven projects on startup</quote> in - <guimenu>Window</guimenu> --> - <guimenuitem>Preferences</guimenuitem> --> - <guimenuitem>Maven</guimenuitem>:</para> + <para>Tick the checkboxes <quote>Download Artifact JavaDoc</quote> and <quote>Update Maven projects on startup</quote> in <guimenu>Window</guimenu> --> <guimenuitem>Preferences</guimenuitem> --> <guimenuitem>Maven</guimenuitem>:</para> <mediaobject> <imageobject> @@ -150,16 +107,12 @@ </imageobject> </mediaobject> - <para>This will allow for context sensitive <xref - linkend="glo_Javadoc"/> help related to classes and methods - belonging to third-party libraries.</para> + <para>This will allow for context sensitive <xref linkend="glo_Javadoc"/> help related to classes and methods belonging to third-party libraries.</para> <tip> <itemizedlist> <listitem> - <para><link - xlink:href="https://stackoverflow.com/questions/24252256/how-to-enable-index-downloads-in-eclipse-for-maven-search">Enabling - maven indexing</link> in Eclipse.</para> + <para><link xlink:href="https://stackoverflow.com/questions/24252256/how-to-enable-index-downloads-in-eclipse-for-maven-search">Enabling maven indexing</link> in Eclipse.</para> </listitem> </itemizedlist> </tip> @@ -169,14 +122,9 @@ <section xml:id="sd1SectOwncloud"> <title>Working at HdM and at home seamlessly</title> - <para>We encourage all students to work both on our lab workstations - (especially with respect to the examination!) and on private - equipment.</para> + <para>We encourage all students to work both on our lab workstations (especially with respect to the examination!) and on private equipment.</para> - <para>Fortunately <xref linkend="glo_Maven"/> allows for developing - <xref linkend="glo_Java"/> software in a cross-platform (Windows, - Mac-OS, Linux) manner. With respect to the current lecture the - following preconditions must be met:</para> + <para>Fortunately <xref linkend="glo_Maven"/> allows for developing <xref linkend="glo_Java"/> software in a cross-platform (Windows, Mac-OS, Linux) manner. With respect to the current lecture the following preconditions must be met:</para> <itemizedlist> <listitem> @@ -188,38 +136,24 @@ </listitem> <listitem> - <para>Do not use just a <xref linkend="glo_JRE"/> rather than - a JDK. The latter (among other components) does not contain - the compiler.</para> + <para>Do not use just a <xref linkend="glo_JRE"/> rather than a JDK. The latter (among other components) does not contain the compiler.</para> </listitem> </itemizedlist> - <para>If installed correctly you should be able to execute the - <xref linkend="glo_Java"/> compiler:</para> + <para>If installed correctly you should be able to execute the <xref linkend="glo_Java"/> compiler:</para> <screen>goik@pdc1:~$ javac -version javac 1.8.0_91</screen> - <para>The above output shows a <xref linkend="glo_Java"/> 8 - compiler having release level 0_91. See <uri - xlink:href="https://www.java.com/en/download/faq/release_dates.xml">https://www.java.com/en/download/faq/release_dates.xml</uri> - for details.</para> + <para>The above output shows a <xref linkend="glo_Java"/> 8 compiler having release level 0_91. See <uri xlink:href="https://www.java.com/en/download/faq/release_dates.xml">https://www.java.com/en/download/faq/release_dates.xml</uri> for details.</para> </listitem> <listitem> - <para>Use the <link - xlink:href="https://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars1">Eclipse - IDE for Java EE Developers</link> flavour rather then merely <link - xlink:href="https://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/mars1">Eclipse - IDE for Java Developers</link>. Reason: The J2ee version does - include (among other things) <xref linkend="glo_Maven"/>.</para> + <para>Use the <link xlink:href="https://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/mars1">Eclipse IDE for Java EE Developers</link> flavour rather then merely <link xlink:href="https://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/mars1">Eclipse IDE for Java Developers</link>. Reason: The J2ee version does include (among other things) <xref linkend="glo_Maven"/>.</para> </listitem> </itemizedlist> - <para>The <link - xlink:href="https://cloud.mi.hdm-stuttgart.de/owncloud">MI - owncloud</link> service (like e.g. Dropbox) allows for working on - different devices independently:</para> + <para>The <link xlink:href="https://cloud.mi.hdm-stuttgart.de/owncloud">MI owncloud</link> service (like e.g. Dropbox) allows for working on different devices independently:</para> <mediaobject> <imageobject> @@ -227,25 +161,18 @@ javac 1.8.0_91</screen> </imageobject> </mediaobject> - <para>We highly recommend using the <link - xlink:href="https://cloud.mi.hdm-stuttgart.de/owncloud">MI - owncloud</link> (or a similar) service.This enables you to become - independent from out lab workstations but still work on your projects - during the exercise hours.</para> + <para>We highly recommend using the <link xlink:href="https://cloud.mi.hdm-stuttgart.de/owncloud">MI owncloud</link> (or a similar) service.This enables you to become independent from out lab workstations but still work on your projects during the exercise hours.</para> <tip> - <para>Do **not** configure Eclipse having its whole workspace on a - cloud device. Instead:</para> + <para>Do **not** configure Eclipse having its whole workspace on a cloud device. Instead:</para> <itemizedlist> <listitem> - <para>Leave Eclipse's workspace locally on a non-cloud file - system</para> + <para>Leave Eclipse's workspace locally on a non-cloud file system</para> </listitem> <listitem> - <para>Configure your individual projects to reside on a cloud - drive like:</para> + <para>Configure your individual projects to reside on a cloud drive like:</para> <mediaobject> <imageobject> @@ -256,25 +183,16 @@ javac 1.8.0_91</screen> </itemizedlist> </tip> - <para>Connecting different systems is now as easy as importing any - other existing <xref linkend="glo_Maven"/> project. You may have to - hit <quote>F5</quote> to force Eclipse updating a project when working - on a different machine.</para> + <para>Connecting different systems is now as easy as importing any other existing <xref linkend="glo_Maven"/> project. You may have to hit <quote>F5</quote> to force Eclipse updating a project when working on a different machine.</para> </section> <section xml:id="sd1SectCodingbatJunit"> - <title>From <orgname - xlink:href="http://codingbat.com">codingbat</orgname> to <productname - xlink:href="http://junit.org">Junit</productname>.</title> + <title>From <orgname xlink:href="http://codingbat.com">codingbat</orgname> to <productname xlink:href="http://junit.org">Junit</productname>.</title> - <para>Consider the following <orgname - xlink:href="http://codingbat.com">codingbat</orgname> - challenge:</para> + <para>Consider the following <orgname xlink:href="http://codingbat.com">codingbat</orgname> challenge:</para> <figure xml:id="sd1FigCodingbatSleepExample"> - <title>The <orgname - xlink:href="http://codingbat.com">codingbat</orgname> sleepIn - example.</title> + <title>The <orgname xlink:href="http://codingbat.com">codingbat</orgname> sleepIn example.</title> <mediaobject> <imageobject> @@ -283,22 +201,17 @@ javac 1.8.0_91</screen> </mediaobject> </figure> - <para>You'll get a presentation during your lectures how to model such - tests in <productname - xlink:href="http://junit.org">Junit</productname>.</para> + <para>You'll get a presentation during your lectures how to model such tests in <productname xlink:href="http://junit.org">Junit</productname>.</para> </section> <section xml:id="sd1GenerateJavadoc"> <title>Generating <xref linkend="glo_Javadoc"/>.</title> - <para>Java includes the powerful <xref linkend="glo_Javadoc"/> - documentation generating subsystem. There are multiple ways to - generate HTML documentation from your own Java code:</para> + <para>Java includes the powerful <xref linkend="glo_Javadoc"/> documentation generating subsystem. There are multiple ways to generate HTML documentation from your own Java code:</para> <itemizedlist> <listitem> - <para>Invoking the <command>javadoc</command> executable supplying - appropriate command line arguments.</para> + <para>Invoking the <command>javadoc</command> executable supplying appropriate command line arguments.</para> </listitem> <listitem> @@ -306,13 +219,7 @@ javac 1.8.0_91</screen> </listitem> <listitem> - <para>Using <productname>Eclipse</productname>. Just select your - project in the package view and choose <guimenu>Project</guimenu> - <guisubmenu>Generate Javadoc ...</guisubmenu> . See <link - xlink:href="https://www.youtube.com/watch?v=FCJKTT86vP0">related - video</link> in case of problems. You may also fancy <link - xlink:href="http://www.itcsolutions.eu/2010/12/23/tutorial-java-62-2-how-to-generate-javadoc-in-eclipse-or-netbean">How - to generate JavaDoc in Eclipse or NetBeans</link>.</para> + <para>Using <productname>Eclipse</productname>. Just select your project in the package view and choose <guimenu>Project</guimenu> <guisubmenu>Generate Javadoc ...</guisubmenu> . See <link xlink:href="https://www.youtube.com/watch?v=FCJKTT86vP0">related video</link> in case of problems. You may also fancy <link xlink:href="http://www.itcsolutions.eu/2010/12/23/tutorial-java-62-2-how-to-generate-javadoc-in-eclipse-or-netbean">How to generate JavaDoc in Eclipse or NetBeans</link>.</para> </listitem> </itemizedlist> </section> @@ -320,18 +227,11 @@ javac 1.8.0_91</screen> <section xml:id="sd1ImportMavenSolutions"> <title>Solutions to exercises</title> - <para>Most proposed solutions to current exercises are based on Maven - modules having a hierarchical structure starting from a root module. - Importing into Eclipse requires two steps:</para> + <para>Most proposed solutions to current exercises are based on Maven modules having a hierarchical structure starting from a root module. Importing into Eclipse requires two steps:</para> <orderedlist> <listitem> - <para>Cloning the lectures' source code. Just open the - <quote>git</quote> perspective in Eclipse (right upper corner open - <guimenu>Open perspective</guimenu>). Then choose <quote>Clone a - Git repository</quote> and enter - <code>https://gitlab.mi.hdm-stuttgart.de/goik/GoikLectures.git</code> - in the URI field:</para> + <para>Cloning the lectures' source code. Just open the <quote>git</quote> perspective in Eclipse (right upper corner open <guimenu>Open perspective</guimenu>). Then choose <quote>Clone a Git repository</quote> and enter <code>https://gitlab.mi.hdm-stuttgart.de/goik/GoikLectures.git</code> in the URI field:</para> <mediaobject> <imageobject> @@ -340,59 +240,35 @@ javac 1.8.0_91</screen> </mediaobject> <informalfigure> - <para>Select branch <quote>master</quote> and hit finish. This - will clone the repository and may take some time depending on - your available bandwidth (~100MB, mostly due to included - videos). As a result you will see the root folder - <filename>~/git/GoikLectures</filename>. This step is required - only once.</para> - - <para>If you fancy working on console level you may as well - issue the following command instead using - <productname>Eclipse</productname>:</para> + <para>Select branch <quote>master</quote> and hit finish. This will clone the repository and may take some time depending on your available bandwidth (~100MB, mostly due to included videos). As a result you will see the root folder <filename>~/git/GoikLectures</filename>. This step is required only once.</para> + + <para>If you fancy working on console level you may as well issue the following command instead using <productname>Eclipse</productname>:</para> </informalfigure> <screen>git clone https://gitlab.mi.hdm-stuttgart.de/goik/GoikLectures</screen> - <para>You may as well check out via ssh if a suitable key is being - configured:</para> + <para>You may as well check out via ssh if a suitable key is being configured:</para> <screen>git clone git@gitlab.mi.hdm-stuttgart.de:goik/GoikLectures.git</screen> </listitem> <listitem> - <para>Import an individual solution by hitting - <guisubmenu>File</guisubmenu> <guimenuitem>Import</guimenuitem> - <guisubmenu>Maven</guisubmenu> <guimenuitem>Existing Maven - Projects</guimenuitem>. Then choose the desired project below - <filename>GoikLectures/P</filename> like e.g. - <filename>GoikLectures/P/Sd1/interest/V1</filename> and hit - <guibutton>Finish</guibutton>.</para> + <para>Import an individual solution by hitting <guisubmenu>File</guisubmenu> <guimenuitem>Import</guimenuitem> <guisubmenu>Maven</guisubmenu> <guimenuitem>Existing Maven Projects</guimenuitem>. Then choose the desired project below <filename>GoikLectures/P</filename> like e.g. <filename>GoikLectures/P/Sd1/interest/V1</filename> and hit <guibutton>Finish</guibutton>.</para> </listitem> </orderedlist> </section> </section> <section xml:id="sd1SectMavenGenerateJavadoc"> - <title>Generating <xref linkend="glo_Javadoc"/> project - documentation</title> - - <para><xref linkend="glo_Javadoc"/> allows for literate code - documentation in a structured way. We provide an example based on the - <link - xlink:href="https://klausur.mi.hdm-stuttgart.de/ilias/goto.php?target=tst_301&client_id=iliasclient1">2016 - summer examination</link> Maven archive <filename>exam.zip</filename> . - We assume this project already being imported in <xref - linkend="glo_Soft_Eclipse"/>. Creating <xref linkend="glo_Javadoc"/> - <xref linkend="glo_HTML"/> documentation from embedded comments involves - the following steps:</para> + <title>Generating <xref linkend="glo_Javadoc"/> project documentation</title> + + <para><xref linkend="glo_Javadoc"/> allows for literate code documentation in a structured way. We provide an example based on the <link xlink:href="https://klausur.mi.hdm-stuttgart.de/ilias/goto.php?target=tst_301&client_id=iliasclient1">2016 summer examination</link> Maven archive <filename>exam.zip</filename> . We assume this project already being imported in <xref linkend="glo_Soft_Eclipse"/>. Creating <xref linkend="glo_Javadoc"/> <xref linkend="glo_HTML"/> documentation from embedded comments involves the following steps:</para> <orderedlist> <listitem> <screenshot> <info> - <title>Start configuring <xref linkend="glo_Maven"/> for <xref - linkend="glo_Javadoc"/> generation.</title> + <title>Start configuring <xref linkend="glo_Maven"/> for <xref linkend="glo_Javadoc"/> generation.</title> </info> <mediaobject> @@ -406,10 +282,7 @@ javac 1.8.0_91</screen> <listitem> <screenshot> <info> - <title>Enter the <xref linkend="glo_Maven"/> <link - xlink:href="https://www.tutorialspoint.com/maven/maven_build_life_cycle.htm">goal</link> - javadoc:javadoc. This step creates a permanent launch - configuration and is thus required only once.</title> + <title>Enter the <xref linkend="glo_Maven"/> <link xlink:href="https://www.tutorialspoint.com/maven/maven_build_life_cycle.htm">goal</link> javadoc:javadoc. This step creates a permanent launch configuration and is thus required only once.</title> </info> <mediaobject> @@ -423,8 +296,7 @@ javac 1.8.0_91</screen> <listitem> <screenshot> <info> - <title>Watch document generation in console view and copy the - resulting index file path.</title> + <title>Watch document generation in console view and copy the resulting index file path.</title> </info> <mediaobject> @@ -438,9 +310,7 @@ javac 1.8.0_91</screen> <listitem> <screenshot> <info> - <title>Insert the previously copied file path to your favourite - browser's address bar and read your generated - documentation.</title> + <title>Insert the previously copied file path to your favourite browser's address bar and read your generated documentation.</title> </info> <mediaobject> @@ -452,9 +322,7 @@ javac 1.8.0_91</screen> </listitem> </orderedlist> - <para>Alternatively you may as well simply use a terminal executing - <command>mvn</command> <option>javadoc:javadoc</option> achieving the - very same purpose:</para> + <para>Alternatively you may as well simply use a terminal executing <command>mvn</command> <option>javadoc:javadoc</option> achieving the very same purpose:</para> <screen>goik@hopc ~> cd Downloads/Exam goik@hopc Exam> mvn <emphasis role="bold">javadoc:javadoc</emphasis> @@ -485,9 +353,7 @@ Generating /ma/goik/Downloads/Exam/target/site/apidocs/help-doc.html... <qandadiv> <qandaentry> <question> - <para>Extend the <link - xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc2_html_5">Employee - example from chapter 4</link> by adding two methods:</para> + <para>Extend the <link xlink:href="https://proquest.safaribooksonline.com/9780992133047/toc2_html_5">Employee example from chapter 4</link> by adding two methods:</para> <itemizedlist> <listitem> @@ -518,8 +384,7 @@ Salary:30000.00</pre> </listitem> </itemizedlist> - <para>Run your implementation by a separate class - <code>Driver</code>:</para> + <para>Run your implementation by a separate class <code>Driver</code>:</para> <programlisting language="java">package company; @@ -579,28 +444,20 @@ Salary:30000.00</pre> <section xml:id="sw1SectEmployeeConstructorThis"> <title>Constructors and variable names</title> - <qandaset defaultlabel="qanda" - xml:id="sw1QandaEmployeeConstructorThis"> + <qandaset defaultlabel="qanda" xml:id="sw1QandaEmployeeConstructorThis"> <qandadiv> <qandaentry> <question> - <para>Currently our constructor is being implemented - as:</para> + <para>Currently our constructor is being implemented as:</para> <programlisting language="java"> public Employee(int ageValue, double salaryValue) { age = ageValue; salary = salaryValue; }</programlisting> - <para>This imposes problems with respect to proper - documentation. A developer will try to choose reasonable - variable names clearly indicating the desired purpose like - <quote>age</quote> and <quote>salary</quote>.</para> + <para>This imposes problems with respect to proper documentation. A developer will try to choose reasonable variable names clearly indicating the desired purpose like <quote>age</quote> and <quote>salary</quote>.</para> - <para>But the ratio for choosing <quote>ageValue</quote> and - <quote>salaryValue</quote> originates from the need to avoid - shadowing of variable names. From the viewpoint of mere code - comprehensibility we prefer:</para> + <para>But the ratio for choosing <quote>ageValue</quote> and <quote>salaryValue</quote> originates from the need to avoid shadowing of variable names. From the viewpoint of mere code comprehensibility we prefer:</para> <programlisting language="java">public Employee(int age, double salary) { // Compiler warnings: @@ -608,22 +465,15 @@ Salary:30000.00</pre> salary = salary; // The assignment to variable salary has no effect }</programlisting> - <para>Apparently we are missing something. Explain these two - compiler warnings. How can the underlying conflict be - resolved?</para> + <para>Apparently we are missing something. Explain these two compiler warnings. How can the underlying conflict be resolved?</para> <tip> - <para>Read the <link - xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-4-objects-and-classes/toc8_html_3">section - about the <quote>this</quote></link> keyword.</para> + <para>Read the <link xlink:href="https://proquest.safaribooksonline.com/book/programming/java/9780992133047/chapter-4-objects-and-classes/toc8_html_3">section about the <quote>this</quote></link> keyword.</para> </tip> </question> <answer> - <para>When choosing <methodname>public Employee(int age, - double salary)</methodname> we have two sets of variables - (<code>age</code>, <code>salary</code>) in two different - conflicting scopes:</para> + <para>When choosing <methodname>public Employee(int age, double salary)</methodname> we have two sets of variables (<code>age</code>, <code>salary</code>) in two different conflicting scopes:</para> <glosslist> <glossentry> @@ -639,28 +489,17 @@ Salary:30000.00</pre> </glossentry> <glossentry> - <glossterm>Method's formal parameter list - scope:</glossterm> + <glossterm>Method's formal parameter list scope:</glossterm> <glossdef> - <programlisting language="java">public Employee(int <emphasis - role="bold">age</emphasis>, double <emphasis - role="bold">salary</emphasis>) {.../* Constructor's method body */}</programlisting> + <programlisting language="java">public Employee(int <emphasis role="bold">age</emphasis>, double <emphasis role="bold">salary</emphasis>) {.../* Constructor's method body */}</programlisting> </glossdef> </glossentry> </glosslist> - <para>Within the constructor's method body the parameter list - scope will take precedence over class scope. Thus the - assignment <code>age = age</code> will assign the - constructor's argument <code>age</code> to itself rather than - assigning it to the instance variable <code>age</code> being - defined within class scope.</para> + <para>Within the constructor's method body the parameter list scope will take precedence over class scope. Thus the assignment <code>age = age</code> will assign the constructor's argument <code>age</code> to itself rather than assigning it to the instance variable <code>age</code> being defined within class scope.</para> - <para>We may explicitly resolve this scope conflict by - qualifying our instance variables <code>age</code> and - <code>salary</code> with their respective scope being - represented by the <code>this</code> keyword:</para> + <para>We may explicitly resolve this scope conflict by qualifying our instance variables <code>age</code> and <code>salary</code> with their respective scope being represented by the <code>this</code> keyword:</para> <programlisting language="java"> public Employee(int age, double salary) { // The "this" keyword refers to class scope @@ -682,32 +521,22 @@ Salary:30000.00</pre> <qandaentry> <question> - <para>We want to represent rectangles being defined by width and - height to allow for the subsequently demonstrated - operations:</para> + <para>We want to represent rectangles being defined by width and height to allow for the subsequently demonstrated operations:</para> - <programlisting language="java">final Rectangle r = new Rectangle(8, 5); <co - linkends="sw1CalloutRectangle-1" xml:id="constructor"/> + <programlisting language="java">final Rectangle r = new Rectangle(8, 5); <co linkends="sw1CalloutRectangle-1" xml:id="constructor"/> -System.out.println("Perimeter:" + r.getPerimeter()<co - linkends="sw1CalloutRectangle-2" xml:id="getPerimeter"/>); -System.out.println("Area:" + r.getArea()<co linkends="sw1CalloutRectangle-3" - xml:id="getArea"/>); +System.out.println("Perimeter:" + r.getPerimeter()<co linkends="sw1CalloutRectangle-2" xml:id="getPerimeter"/>); +System.out.println("Area:" + r.getArea()<co linkends="sw1CalloutRectangle-3" xml:id="getArea"/>); r.setWidth(4); <co linkends="sw1CalloutRectangle-4" xml:id="setWidth"/> r.setHeight(7); -System.out.println("Perimeter:" + r.getPerimeter()); <co - linkends="sw1CalloutRectangle-5" - xml:id="sw1CalloutRectangle-5-co"/> +System.out.println("Perimeter:" + r.getPerimeter()); <co linkends="sw1CalloutRectangle-5" xml:id="sw1CalloutRectangle-5-co"/> System.out.println("Area:" + r.getArea());</programlisting> <calloutlist> <callout arearefs="constructor" xml:id="sw1CalloutRectangle-1"> - <para>Creating an instance of class - <classname>Rectangle</classname> by calling a non-default - constructor which allows for providing width (8) and height - (5).</para> + <para>Creating an instance of class <classname>Rectangle</classname> by calling a non-default constructor which allows for providing width (8) and height (5).</para> </callout> <callout arearefs="getPerimeter" xml:id="sw1CalloutRectangle-2"> @@ -722,16 +551,12 @@ System.out.println("Area:" + r.getArea());</programlisting> <para>Setting with and height to new values.</para> </callout> - <callout arearefs="sw1CalloutRectangle-5-co" - xml:id="sw1CalloutRectangle-5"> - <para>Write (possibly) changed perimeter and area - values.</para> + <callout arearefs="sw1CalloutRectangle-5-co" xml:id="sw1CalloutRectangle-5"> + <para>Write (possibly) changed perimeter and area values.</para> </callout> </calloutlist> - <para>You may start from the following - <classname>Rectangle</classname> class dummy - implementation:</para> + <para>You may start from the following <classname>Rectangle</classname> class dummy implementation:</para> <programlisting language="java">/** * Representing rectangular shapes. @@ -791,10 +616,7 @@ public class Rectangle { </question> <answer> - <para>First we define two instance (= non-static) variables - <code>width</code> and <code>height</code> representing a - <classname>Rectangle</classname>'s corresponding two parameters - <code>width</code> and <code>height</code>:</para> + <para>First we define two instance (= non-static) variables <code>width</code> and <code>height</code> representing a <classname>Rectangle</classname>'s corresponding two parameters <code>width</code> and <code>height</code>:</para> <programlisting language="java">public class Rectangle { @@ -827,40 +649,27 @@ public class Rectangle { ... }</programlisting> - <para>Note the subtle implementation difference between - <methodname>setWidth(...)</methodname> and - <methodname>setHeight(...)</methodname>:</para> + <para>Note the subtle implementation difference between <methodname>setWidth(...)</methodname> and <methodname>setHeight(...)</methodname>:</para> <glosslist> <glossentry xml:id="glossMethodDiff1"> - <glossterm><methodname>setWidth(double - w)</methodname></glossterm> + <glossterm><methodname>setWidth(double w)</methodname></glossterm> <glossdef> - <para>We use the formal parameter name <quote>w</quote>. Its - name does not conflict with the instance variable name - <quote>width</quote> being defined at class level. We can - simply assign this value to our corresponding instance - variable using <code>width = w;</code>.</para> + <para>We use the formal parameter name <quote>w</quote>. Its name does not conflict with the instance variable name <quote>width</quote> being defined at class level. We can simply assign this value to our corresponding instance variable using <code>width = w;</code>.</para> </glossdef> </glossentry> <glossentry xml:id="xmlMethodDiff2"> - <glossterm><methodname>setHeight(double - height)</methodname></glossterm> + <glossterm><methodname>setHeight(double height)</methodname></glossterm> <glossdef> - <para>The method's formal parameter <quote>height</quote> - shadows the instance variable's name being defined at class - level. We need the <quote>this</quote> keyword in - <code>this.height = height</code> to resolve the - ambiguity.</para> + <para>The method's formal parameter <quote>height</quote> shadows the instance variable's name being defined at class level. We need the <quote>this</quote> keyword in <code>this.height = height</code> to resolve the ambiguity.</para> </glossdef> </glossentry> </glosslist> - <para>Both ways are perfectly legal. The complete implementation - including all remaining methods reads:</para> + <para>Both ways are perfectly legal. The complete implementation including all remaining methods reads:</para> <programlisting language="java">/** * Representing rectangular shapes. @@ -932,13 +741,9 @@ public class Rectangle { <qandadiv> <qandaentry> <question> - <para>This exercise is very similar to <xref - linkend="sd1ImplementRectangle"/>. With respect to the - upcoming section on inheritance its presence will be justified - later by <xref linkend="sw1SectGeometryInherit"/>.</para> + <para>This exercise is very similar to <xref linkend="sd1ImplementRectangle"/>. With respect to the upcoming section on inheritance its presence will be justified later by <xref linkend="sw1SectGeometryInherit"/>.</para> - <para>We provide a corresponding class - <classname>Circle</classname> dummy implementation:</para> + <para>We provide a corresponding class <classname>Circle</classname> dummy implementation:</para> <programlisting language="java">package step1.dummy; @@ -988,8 +793,7 @@ public class Circle { } }</programlisting> - <para>Instances of this class shall be usable in the following - fashion:</para> + <para>Instances of this class shall be usable in the following fashion:</para> <programlisting language="java"> public static void main(String[] args) { final Circle c = new Circle(2.3); @@ -1006,15 +810,11 @@ public class Circle { System.out.println("Area:" + c.getArea()); }</programlisting> - <para>Hint: Obviously you'll have to define an instance - variable within Circle to keep track of its current radius - value. All methods mentioned above simply depend on this - single value.</para> + <para>Hint: Obviously you'll have to define an instance variable within Circle to keep track of its current radius value. All methods mentioned above simply depend on this single value.</para> </question> <answer> - <para>We define an instance variable <code>radius</code> - inside our class <classname>Circle</classname>:</para> + <para>We define an instance variable <code>radius</code> inside our class <classname>Circle</classname>:</para> <programlisting language="java">public class Circle { @@ -1022,33 +822,21 @@ public class Circle { ... }</programlisting> - <para>Next we implement our method to change a circle's - radius:</para> + <para>Next we implement our method to change a circle's radius:</para> <programlisting language="java"> public void setRadius(double r) { radius = r; }</programlisting> - <para>Note that we have chosen a different value for the - method's formal radius parameter to be <quote>r</quote> rather - than <quote>radius</quote>. Many people prefer to use radius - here making it easier for a programmer to recognize the - expected name in the generated <xref - linkend="glo_Javadoc"/>:</para> + <para>Note that we have chosen a different value for the method's formal radius parameter to be <quote>r</quote> rather than <quote>radius</quote>. Many people prefer to use radius here making it easier for a programmer to recognize the expected name in the generated <xref linkend="glo_Javadoc"/>:</para> <programlisting language="java"> public void setRadius(double radius) { <emphasis role="bold">this.</emphasis>radius = radius; }</programlisting> - <para>This requires the usage of the <code>this</code> keyword - to distinguish the formal parameter in - <methodname>setRadius(double radius)</methodname> from the - instance variable previously being defined within our class - <classname>Circle</classname>. In other words: We have to - resolve a name shadowing conflict.</para> + <para>This requires the usage of the <code>this</code> keyword to distinguish the formal parameter in <methodname>setRadius(double radius)</methodname> from the instance variable previously being defined within our class <classname>Circle</classname>. In other words: We have to resolve a name shadowing conflict.</para> - <para>The rest of the implementation is (quite) - straightforward. A complete class reads:</para> + <para>The rest of the implementation is (quite) straightforward. A complete class reads:</para> <programlisting language="java">package step1; @@ -1103,26 +891,20 @@ public class Circle { </section> <section xml:id="sd1SectSvgAndTranslation"> - <title>Adding translations and <xref linkend="glo_SVG"/> - export.</title> + <title>Adding translations and <xref linkend="glo_SVG"/> export.</title> <qandaset defaultlabel="qanda" xml:id="sdQandaSvgAndTranslation"> <qandadiv> <qandaentry> <question> - <para>We want to add more features to tour - <classname>Circle</classname> and - <classname>Rectangle</classname> classes:</para> + <para>We want to add more features to tour <classname>Circle</classname> and <classname>Rectangle</classname> classes:</para> <glosslist> <glossentry> <glossterm>Translations</glossterm> <glossdef> - <para>Add two more instance variables x and y and - corresponding setter methods to account for a shape's - translation vector with respect to the origin (0,0). The - following hint may be helpful:</para> + <para>Add two more instance variables x and y and corresponding setter methods to account for a shape's translation vector with respect to the origin (0,0). The following hint may be helpful:</para> <programlisting language="java"> /** * @param x The circle's x center coordinate value @@ -1143,31 +925,14 @@ public class Circle { <glossterm><xref linkend="glo_SVG"/> export</glossterm> <glossdef> - <para>We would like Rectangle and Circle instances to be - visualized as <xref linkend="glo_SVG"/> graphics. <link - xlink:href="http://www.w3schools.com/graphics/svg_examples.asp">SVG - Examples</link> provides editor samples both for <link - xlink:href="http://www.w3schools.com/graphics/svg_circle.asp">circles</link> - and <link - xlink:href="http://www.w3schools.com/graphics/svg_rect.asp">rectangles</link>. - Add a method <methodname>void writeSvg()</methodname> to - both of your classes which allows for <xref - linkend="glo_SVG"/> code being written to standard - output. Use - <methodname>System.out.println(...)</methodname> calls - to create the desired <xref linkend="glo_SVG"/> output. - You may need <code>\"</code> to represent double quotes - as in the subsequent example or use single attribute - quotes instead:</para> + <para>We would like Rectangle and Circle instances to be visualized as <xref linkend="glo_SVG"/> graphics. <link xlink:href="http://www.w3schools.com/graphics/svg_examples.asp">SVG Examples</link> provides editor samples both for <link xlink:href="http://www.w3schools.com/graphics/svg_circle.asp">circles</link> and <link xlink:href="http://www.w3schools.com/graphics/svg_rect.asp">rectangles</link>. Add a method <methodname>void writeSvg()</methodname> to both of your classes which allows for <xref linkend="glo_SVG"/> code being written to standard output. Use <methodname>System.out.println(...)</methodname> calls to create the desired <xref linkend="glo_SVG"/> output. You may need <code>\"</code> to represent double quotes as in the subsequent example or use single attribute quotes instead:</para> <programlisting language="java">System.out.println("<rect width=\"20\"" ...</programlisting> </glossdef> </glossentry> </glosslist> - <para>The following code snippet may serve to illustrate the - intended use of <methodname>void - writeSvg()</methodname>:</para> + <para>The following code snippet may serve to illustrate the intended use of <methodname>void writeSvg()</methodname>:</para> <programlisting language="java">public class Driver { @@ -1192,11 +957,7 @@ public class Circle { } }</programlisting> - <para>Implement the method <methodname>void - writeSvg()</methodname> in both classes - <classname>Rectangle</classname> and - <classname>Circle</classname>. This should produce an output - result like:</para> + <para>Implement the method <methodname>void writeSvg()</methodname> in both classes <classname>Rectangle</classname> and <classname>Circle</classname>. This should produce an output result like:</para> <programlisting language="java"><!DOCTYPE html> <html> @@ -1210,9 +971,7 @@ public class Circle { </body> </html></programlisting> - <para>You may copy this output into a file - <filename>svg.html</filename>. A web browser should visualize - this output as:</para> + <para>You may copy this output into a file <filename>svg.html</filename>. A web browser should visualize this output as:</para> <informalfigure> <mediaobject> @@ -1294,27 +1053,19 @@ public void writeSvg() { <qandadiv> <qandaentry> <question> - <para>In <xref linkend="sd1SectExtendEmployee"/> you had your - two classes:</para> + <para>In <xref linkend="sd1SectExtendEmployee"/> you had your two classes:</para> <itemizedlist> <listitem> - <para>A class <classname>Employee</classname> defining an - employee's attributes and methods.</para> + <para>A class <classname>Employee</classname> defining an employee's attributes and methods.</para> </listitem> <listitem> - <para>A class <classname>Driver</classname> containing a - <methodname>main</methodname> method to start the - application.</para> + <para>A class <classname>Driver</classname> containing a <methodname>main</methodname> method to start the application.</para> </listitem> </itemizedlist> - <para>Currently both classes (hopefully!) reside in the same - package <package>company</package>. We will assume the two - attributes age and salary having no access modifiers - (<code>public</code> / <code>private</code> / - <code>protected</code>):</para> + <para>Currently both classes (hopefully!) reside in the same package <package>company</package>. We will assume the two attributes age and salary having no access modifiers (<code>public</code> / <code>private</code> / <code>protected</code>):</para> <programlisting language="java">package company; @@ -1345,38 +1096,23 @@ public class Driver { <itemizedlist> <listitem> - <para>Creating a new package named - <package>model</package>.</para> + <para>Creating a new package named <package>model</package>.</para> </listitem> <listitem> - <para>Moving your <classname>Employee</classname> class - definition from its current package - <package>company</package> to <package>model</package> but - leaving your <classname>Driver</classname> class in its - current package <package>company</package>. You may simply - use your Eclipse <xref linkend="glo_IDE"/>'s drag'n drop - capabilities.</para> + <para>Moving your <classname>Employee</classname> class definition from its current package <package>company</package> to <package>model</package> but leaving your <classname>Driver</classname> class in its current package <package>company</package>. You may simply use your Eclipse <xref linkend="glo_IDE"/>'s drag'n drop capabilities.</para> </listitem> </itemizedlist> - <para>What do you observe? Explain this result. How do you solve - this problem?</para> + <para>What do you observe? Explain this result. How do you solve this problem?</para> <tip> - <para>Read the section on <code>public</code> / - <code>private</code> / <code>protected</code> / default access - level.</para> + <para>Read the section on <code>public</code> / <code>private</code> / <code>protected</code> / default access level.</para> </tip> </question> <answer> - <para>Moving the <classname>Employee</classname> class from its - <package>company</package> package to <package>model</package> - changes just one line of code in - <filename>Employee.java</filename> namely its - <code>package</code> declaration. It also adds an - <code>import</code> statement</para> + <para>Moving the <classname>Employee</classname> class from its <package>company</package> package to <package>model</package> changes just one line of code in <filename>Employee.java</filename> namely its <code>package</code> declaration. It also adds an <code>import</code> statement</para> <informaltable border="1"> <colgroup width="45%"/> @@ -1404,11 +1140,7 @@ public class Employee { </tr> </informaltable> - <para>The movement also adds an additional line of code in our - <classname>Driver</classname> class which is required since our - <classname>Employee</classname> class now resides in a different - package (We may have other <classname>Employee</classname> - classes within other packages):</para> + <para>The movement also adds an additional line of code in our <classname>Driver</classname> class which is required since our <classname>Employee</classname> class now resides in a different package (We may have other <classname>Employee</classname> classes within other packages):</para> <informaltable border="1"> <colgroup width="45%"/> @@ -1440,9 +1172,7 @@ public class Driver { </tr> </informaltable> - <para>Unfortunately our <classname>Driver</classname> class - still residing in our <package>company</package> package will no - longer compile:</para> + <para>Unfortunately our <classname>Driver</classname> class still residing in our <package>company</package> package will no longer compile:</para> <programlisting language="java">package company; @@ -1460,30 +1190,16 @@ public class Driver { } }</programlisting> - <para>This error is in accordance with Table 4.1 from the <link - xlink:href="https://techbus.safaribooksonline.com/9780992133047/toc7_html_3">Encapsulation - and Access Control</link> section: The attributes - <property>age</property> and <property>salary</property> have no - access modifiers at all hence <quote>default</quote> access is - being granted. Default access type prohibits classes belonging - to other packages accessing the attributes in question. More - clearly: Members from class <classname>Driver</classname> have - no permission to access either <property>age</property> or - <property>salary</property>.</para> + <para>This error is in accordance with Table 4.1 from the <link xlink:href="https://techbus.safaribooksonline.com/9780992133047/toc7_html_3">Encapsulation and Access Control</link> section: The attributes <property>age</property> and <property>salary</property> have no access modifiers at all hence <quote>default</quote> access is being granted. Default access type prohibits classes belonging to other packages accessing the attributes in question. More clearly: Members from class <classname>Driver</classname> have no permission to access either <property>age</property> or <property>salary</property>.</para> - <para>There are two possible ways to overcome this - problem:</para> + <para>There are two possible ways to overcome this problem:</para> <glosslist> <glossentry> - <glossterm>Granting access to <quote>alien</quote> classes - (<quote>quick and dirty</quote>)</glossterm> + <glossterm>Granting access to <quote>alien</quote> classes (<quote>quick and dirty</quote>)</glossterm> <glossdef> - <para>Raising access level from default to - <code>public</code> thereby violating the <link - xlink:href="https://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming)">principle - of encapsulation</link>:</para> + <para>Raising access level from default to <code>public</code> thereby violating the <link xlink:href="https://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming)">principle of encapsulation</link>:</para> <programlisting language="java">public class Employee { <emphasis role="bold">public</emphasis> int age; @@ -1493,9 +1209,7 @@ public class Driver { </glossentry> <glossentry> - <glossterm>Providing a so called setter method in our - <classname>Employee</classname> class of access type - <code>public</code></glossterm> + <glossterm>Providing a so called setter method in our <classname>Employee</classname> class of access type <code>public</code></glossterm> <glossdef> <informaltable border="1"> @@ -1540,12 +1254,9 @@ public class Driver { </glossentry> </glosslist> - <para>The novice reader may question the advantage of the second - approach: Alien classes have essentially the same means changing - an employee's salary as with the first approach.</para> + <para>The novice reader may question the advantage of the second approach: Alien classes have essentially the same means changing an employee's salary as with the first approach.</para> - <para>There is however one apparent benefit: Developers do have - better bug tracking options on offer:</para> + <para>There is however one apparent benefit: Developers do have better bug tracking options on offer:</para> <programlisting language="java"> public void setSalary(double salary) { if (salary < 0) { @@ -1564,41 +1275,25 @@ public class Driver { <section xml:id="sd1SectEmployeeFilesystemRepresentation"> <title>File system representation</title> - <qandaset defaultlabel="qanda" - xml:id="sd1QandaEmployeeFilesystemRepresentation"> + <qandaset defaultlabel="qanda" xml:id="sd1QandaEmployeeFilesystemRepresentation"> <qandadiv> <qandaentry> <question> - <para>In <xref linkend="sd1SectRefineAccessEmployee"/> you moved - the <classname>Employee</classname> class to a package - <package>model</package>.</para> + <para>In <xref linkend="sd1SectRefineAccessEmployee"/> you moved the <classname>Employee</classname> class to a package <package>model</package>.</para> - <para>How are the corresponding <xref linkend="glo_Java"/> files - <filename>Employee.java</filename> and - <filename>Driver.java</filename> being represented? What about - the generated byte code files - <filename>Employee.</filename>class and - <filename>Driver.</filename>class?</para> + <para>How are the corresponding <xref linkend="glo_Java"/> files <filename>Employee.java</filename> and <filename>Driver.java</filename> being represented? What about the generated byte code files <filename>Employee.</filename>class and <filename>Driver.</filename>class?</para> <tip> - <para>You may use a general purpose file system explorer. - Eclipse provides a corresponding <quote>Navigator</quote> view - which is accessible via <guimenu>Window --> Show - View-->Navigator</guimenu>.</para> + <para>You may use a general purpose file system explorer. Eclipse provides a corresponding <quote>Navigator</quote> view which is accessible via <guimenu>Window --> Show View-->Navigator</guimenu>.</para> </tip> </question> <answer> - <para>Depending on your type of project (Java, Maven,...) both - your <filename>.java</filename> source files and generated - <filename>.class</filename> files will be organized below their - respective entry level directories. The following is valid for - a standard Eclipse Java project:</para> + <para>Depending on your type of project (Java, Maven,...) both your <filename>.java</filename> source files and generated <filename>.class</filename> files will be organized below their respective entry level directories. The following is valid for a standard Eclipse Java project:</para> <glosslist> <glossentry> - <glossterm><filename>.java</filename> source - files</glossterm> + <glossterm><filename>.java</filename> source files</glossterm> <glossdef> <para>Below folder <filename>src</filename>.</para> @@ -1606,8 +1301,7 @@ public class Driver { </glossentry> <glossentry> - <glossterm><filename>.class</filename> byte code - files</glossterm> + <glossterm><filename>.class</filename> byte code files</glossterm> <glossdef> <para>Below folder <filename>bin</filename>.</para> @@ -1615,24 +1309,14 @@ public class Driver { </glossentry> </glosslist> - <para>Packages give rise to further sub directories both for - source code and their generated byte code - <quote>partners</quote>. The following example is a minor - variation of our employee example. The package - <package>model</package> has been transformed into - <package>company.model</package>:</para> + <para>Packages give rise to further sub directories both for source code and their generated byte code <quote>partners</quote>. The following example is a minor variation of our employee example. The package <package>model</package> has been transformed into <package>company.model</package>:</para> <figure xml:id="sd1FigPackageHierarchy"> <title>Package hierarchy of the employee example</title> <screenshot> <info> - <title>On filesystem level the package - <package>company.model</package> becomes a subdirectory - <filename>model</filename> of sub directory - <filename>company</filename> for both our source - (<filename>src</filename>) and bytecode - (<filename>bin</filename>) file hierarchy.</title> + <title>On filesystem level the package <package>company.model</package> becomes a subdirectory <filename>model</filename> of sub directory <filename>company</filename> for both our source (<filename>src</filename>) and bytecode (<filename>bin</filename>) file hierarchy.</title> </info> <mediaobject> @@ -1647,7 +1331,6 @@ public class Driver { </qandadiv> </qandaset> </section> - </section> <section xml:id="sd1SectStaticMembers"> @@ -1662,9 +1345,7 @@ public class Driver { <qandadiv> <qandaentry> <question> - <para>In <xref linkend="sd1SectLeapYear"/> you already started a - leap year related exercise. This time wrap your implementation - into a single method:</para> + <para>In <xref linkend="sd1QandaLeapYear"/> you already started a leap year related exercise. This time wrap your implementation into a single method:</para> <programlisting language="java"> /** * Characterizing a given year either as leap year or @@ -1677,8 +1358,7 @@ public class Driver { ... }</programlisting> - <para>You should be able to test your implementation the - following way:</para> + <para>You should be able to test your implementation the following way:</para> <programlisting language="java"> public static void main(String[] args) { System.out.println("Is 1800 a leap year? " + isLeapYear(1800)); @@ -1700,8 +1380,7 @@ Is 2016 a leap year? true</screen> <para>A first solution may be:</para> - <programlisting language="java"> <link - xlink:href="Ref/api/P/leapYear/de/hdm_stuttgart/de/sd1/leap/LeapYear.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { + <programlisting language="java"> <link xlink:href="Ref/api/P/leapYear/de/hdm_stuttgart/de/sd1/leap/LeapYear.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { if (year % 400 == 0) { // Every 400 years we do have a leap year. return true; } else if (year % 4 == 0 && 0 != year % 100) { // Every 4 years we do have a leap @@ -1712,11 +1391,9 @@ Is 2016 a leap year? true</screen> } }</programlisting> - <para>This one is easy to read. Experienced programmers however - prefer compact code:</para> + <para>This one is easy to read. Experienced programmers however prefer compact code:</para> - <programlisting language="java"> <link - xlink:href="Ref/api/PlLeapYear/de/hdm_stuttgart/de/sd1/leap/LeapYearCompact.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { + <programlisting language="java"> <link xlink:href="Ref/api/PlLeapYear/de/hdm_stuttgart/de/sd1/leap/LeapYearCompact.html#isLeapYear-int-">public static boolean isLeapYear(int year)</link> { return year % 400 == 0 || // Every 400 years we do have a leap year. year % 4 == 0 && 0 != year % 100; // Every 4 years we do have a leap year @@ -1737,8 +1414,7 @@ Is 2016 a leap year? true</screen> <qandadiv> <qandaentry> <question> - <para>Suppose an arbitrary number n is given e.g n=5. We want to - compute the sum of all integers ranging from 1 to 5:</para> + <para>Suppose an arbitrary number n is given e.g n=5. We want to compute the sum of all integers ranging from 1 to 5:</para> <para>1 + 2 + 3 + 4 + 5 = 15</para> @@ -1761,8 +1437,7 @@ Is 2016 a leap year? true</screen> System.out.println("1 + 2 + ... + 150" + "=" + getSum(150)); }</programlisting> - <para><parameter>A loop is not required - since:</parameter></para> + <para><parameter>A loop is not required since:</parameter></para> <informalequation> <m:math display="block"> @@ -1814,21 +1489,17 @@ Is 2016 a leap year? true</screen> </m:math> </informalequation> - <para>You may use this formula to verify your - implementation.</para> + <para>You may use this formula to verify your implementation.</para> </question> <answer> - <para>The solution's class - <classname>de.hdm_stuttgart.de.sd1.sum.Summing</classname> is - being contained within:</para> + <para>The solution's class <classname>de.hdm_stuttgart.de.sd1.sum.Summing</classname> is being contained within:</para> <annotation role="make"> <para role="eclipse">Sd1/summing</para> </annotation> - <para>We just need a single loop in <link - xlink:href="Ref/api/P/summing/de/hdm_stuttgart/de/sd1/sum/Summing.html#getSum-int-">Summing.getSum(...)</link>.</para> + <para>We just need a single loop in <link xlink:href="Ref/api/P/summing/de/hdm_stuttgart/de/sd1/sum/Summing.html#getSum-int-">Summing.getSum(...)</link>.</para> </answer> </qandaentry> </qandadiv> @@ -1839,8 +1510,7 @@ Is 2016 a leap year? true</screen> <title>Rewriting a loop</title> <qandaset defaultlabel="qanda" xml:id="sd1QandaRewriteLoop"> - <title><code>for</code>, <code>while</code> and <code>do</code> ... - <code>while</code></title> + <title><code>for</code>, <code>while</code> and <code>do</code> ... <code>while</code></title> <qandadiv> <qandaentry> @@ -1902,24 +1572,17 @@ Is 2016 a leap year? true</screen> </listitem> </orderedlist> - <para>Caveat: The <code>do {...} while(...)</code> part is a - little bit tricky. Read the method's documentation - <emphasis><emphasis role="bold">precisely</emphasis></emphasis> - to avoid a common pitfall.</para> + <para>Caveat: The <code>do {...} while(...)</code> part is a little bit tricky. Read the method's documentation <emphasis><emphasis role="bold">precisely</emphasis></emphasis> to avoid a common pitfall.</para> - <para>Do you have a comment choosing the right type of - loop?</para> + <para>Do you have a comment choosing the right type of loop?</para> </question> <answer> - <para>The while loop is actually quite straightforward to - implement:</para> + <para>The while loop is actually quite straightforward to implement:</para> - <programlisting language="java">public class <link - xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html">LoopExample</link> { + <programlisting language="java">public class <link xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html">LoopExample</link> { ... - public static void <link - xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">while_squareNumbers(final int limit)</link> { + public static void <link xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">while_squareNumbers(final int limit)</link> { System.out.println("Computing square numbers"); int i = 4; while (i < limit) { @@ -1929,8 +1592,7 @@ Is 2016 a leap year? true</screen> System.out.println("Finished computing square numbers"); } ...</programlisting> - <para>Its tempting to implement a <code>do ... while</code> in a - similar fashion:</para> + <para>Its tempting to implement a <code>do ... while</code> in a similar fashion:</para> <programlisting language="java">public class LoopExample { ... @@ -1944,15 +1606,9 @@ Is 2016 a leap year? true</screen> System.out.println("Finished computing square numbers"); } ...</programlisting> - <para>This implementation however is flawed: If we call - doWhile_squareNumbers(3) we still receive one line of output. - But according to the documentation no output is to be expected. - Whatever the argument is, at least one output line gets printed. - To avoid this error the loop has to be enclosed by an if- - statement:</para> + <para>This implementation however is flawed: If we call doWhile_squareNumbers(3) we still receive one line of output. But according to the documentation no output is to be expected. Whatever the argument is, at least one output line gets printed. To avoid this error the loop has to be enclosed by an if- statement:</para> - <programlisting language="java"> public static void <link - xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">doWhile_squareNumbers</link>(final int limit) { + <programlisting language="java"> public static void <link xlink:href="Ref/api/P/loop/answer/de/hdm_stuttgart/de/sd1/loop/LoopExample.html#doWhile_squareNumbers-int-">doWhile_squareNumbers</link>(final int limit) { System.out.println("Computing square numbers"); int i = 4; if (i < limit) { // Needed !!! @@ -1964,15 +1620,9 @@ Is 2016 a leap year? true</screen> System.out.println("Finished computing square numbers"); }</programlisting> - <para>This required if-clause reminds us that a <code>do {...} - while (...)</code> is an ill-suited choice here in comparison to - a <code>while(...){...}</code> or a <code>for(...){...}</code> - loop.</para> + <para>This required if-clause reminds us that a <code>do {...} while (...)</code> is an ill-suited choice here in comparison to a <code>while(...){...}</code> or a <code>for(...){...}</code> loop.</para> - <para>Actually a <code>for(...){...} loop is the best choice - here since the number of iterations is known in advance, the - increment is constant and it allows for - initialization</code>.</para> + <para>Actually a <code>for(...){...} loop is the best choice here since the number of iterations is known in advance, the increment is constant and it allows for initialization</code>.</para> </answer> </qandaentry> </qandadiv> @@ -1988,8 +1638,7 @@ Is 2016 a leap year? true</screen> <qandadiv> <qandaentry> <question> - <para>We are interested in the following output presenting the - sine function rounded to three decimal places:</para> + <para>We are interested in the following output presenting the sine function rounded to three decimal places:</para> <screen> x | sin(x) ----+------ @@ -2017,38 +1666,23 @@ Is 2016 a leap year? true</screen> <para>You may also generate HTML output.</para> - <para>Write a corresponding Java application producing this - output. You will have to deal with alignment problems, leading - spaces, padding zeros and so on. Though more sophisticated - support exists the following hints will fully suffice:</para> + <para>Write a corresponding Java application producing this output. You will have to deal with alignment problems, leading spaces, padding zeros and so on. Though more sophisticated support exists the following hints will fully suffice:</para> <orderedlist> <listitem> - <para>Consider the <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#sin-double-">sin(...)</link> - function. The documentation will tell you that the argument - to sin(...) is expected to be in radians rather than common - degree values from [0,360[ being expected on output. So you - will have to transform degree values to radians.</para> + <para>Consider the <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#sin-double-">sin(...)</link> function. The documentation will tell you that the argument to sin(...) is expected to be in radians rather than common degree values from [0,360[ being expected on output. So you will have to transform degree values to radians.</para> </listitem> <listitem> - <para>Depending on the angle's value you may want to add one - or two leading spaces to keep the first column right - aligned.</para> + <para>Depending on the angle's value you may want to add one or two leading spaces to keep the first column right aligned.</para> </listitem> <listitem> - <para>Depending on the sign you may want to add leading - spaces to the second column.</para> + <para>Depending on the sign you may want to add leading spaces to the second column.</para> </listitem> <listitem> - <para>Rounding the sine's value is the crucial part here. - The function <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#round-double-">round()</link> - is quite helpful. Consider the following example rounding - 23.22365 to four decimal places:</para> + <para>Rounding the sine's value is the crucial part here. The function <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#round-double-">round()</link> is quite helpful. Consider the following example rounding 23.22365 to four decimal places:</para> <orderedlist> <listitem> @@ -2056,9 +1690,7 @@ Is 2016 a leap year? true</screen> </listitem> <listitem> - <para><link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#round-double-">round(232236.5)</link> - results in 232237 (long).</para> + <para><link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#round-double-">round(232236.5)</link> results in 232237 (long).</para> </listitem> <listitem> @@ -2076,8 +1708,7 @@ Is 2016 a leap year? true</screen> </listitem> <listitem> - <para>You'll need padding zero values to transform e.g. - <quote>0.4</quote> to <quote>0.400</quote>.</para> + <para>You'll need padding zero values to transform e.g. <quote>0.4</quote> to <quote>0.400</quote>.</para> </listitem> </orderedlist> </question> @@ -2087,8 +1718,7 @@ Is 2016 a leap year? true</screen> <para role="eclipse">Sd1/rounding</para> </annotation> - <para>See <link - xlink:href="Ref/api/P/rounding/de/hdm_stuttgart/de/sd1/rounding/MathTable.html">MathTable</link>.</para> + <para>See <link xlink:href="Ref/api/P/rounding/de/hdm_stuttgart/de/sd1/rounding/MathTable.html">MathTable</link>.</para> </answer> </qandaentry> </qandadiv> @@ -2101,8 +1731,7 @@ Is 2016 a leap year? true</screen> <section xml:id="sd1InterestCalculatorSimple"> <title>A simple interest calculator</title> - <para>Consider the following implementation of an interest - calculator:</para> + <para>Consider the following implementation of an interest calculator:</para> <annotation role="make"> <para role="eclipse">Sd1/interest/V1</para> @@ -2117,30 +1746,23 @@ Is 2016 a leap year? true</screen> <glosslist> <glossentry> - <glossterm>Instance variables and methods, non-static - declaration</glossterm> + <glossterm>Instance variables and methods, non-static declaration</glossterm> <glossdef> - <para><code>private double balance</code>, <code>public - void setBalance(double balance)</code></para> + <para><code>private double balance</code>, <code>public void setBalance(double balance)</code></para> </glossdef> </glossentry> <glossentry> - <glossterm>Class variables and methods, static - declaration</glossterm> + <glossterm>Class variables and methods, static declaration</glossterm> <glossdef> - <para><code>private static double </code>interestRate, - <code>public static void setInterestRate(double - z)</code></para> + <para><code>private static double </code>interestRate, <code>public static void setInterestRate(double z)</code></para> </glossdef> </glossentry> </glosslist> - <para>For both categories chapter 5, <quote>Fields in a Class - Definition</quote> and <quote>Methods in a Class - Definition</quote>.</para> + <para>For both categories chapter 5, <quote>Fields in a Class Definition</quote> and <quote>Methods in a Class Definition</quote>.</para> </glossdef> </glossentry> @@ -2159,18 +1781,13 @@ Is 2016 a leap year? true</screen> interestRate = z; // in contrast interestRate has } // class scope.</programlisting> - <para>The formal variable's name <quote><code>z</code></quote> - may be <emphasis>consistently</emphasis> renamed to any other - legal, non-conflicting value like - <quote><code>myFunnyVariableName</code></quote>:</para> + <para>The formal variable's name <quote><code>z</code></quote> may be <emphasis>consistently</emphasis> renamed to any other legal, non-conflicting value like <quote><code>myFunnyVariableName</code></quote>:</para> <programlisting language="java"> public static void setInterestRate(double myFunnyVariableName) { interestRate = myFunnyVariableName; }</programlisting> - <para>Alternatively name shadowing conflicts may be resolved by - using the keyword <emphasis><code>this</code></emphasis> <coref - linkend="sd1ListingThis"/>:</para> + <para>Alternatively name shadowing conflicts may be resolved by using the keyword <emphasis><code>this</code></emphasis> <coref linkend="sd1ListingThis"/>:</para> <programlisting language="java">public class Konto { ... @@ -2179,8 +1796,7 @@ Is 2016 a leap year? true</screen> ... public void setBalance(double balance) { if (balance <= 10000) { - <emphasis role="bold">this</emphasis>.balance <co - xml:id="sd1ListingThis"/> = balance; // "this" required to resolve name shadowing + <emphasis role="bold">this</emphasis>.balance <co xml:id="sd1ListingThis"/> = balance; // "this" required to resolve name shadowing // conflict by method parameter name // "double balance". } else { @@ -2193,8 +1809,7 @@ Is 2016 a leap year? true</screen> </glossentry> <glossentry> - <glossterm>Access restrictions public / private / protected to - attributes and methods</glossterm> + <glossterm>Access restrictions public / private / protected to attributes and methods</glossterm> <glossdef> <programlisting language="java">public class Account { @@ -2207,8 +1822,7 @@ Is 2016 a leap year? true</screen> } ...</programlisting> - <para>See , chapter 5, <quote>CONTROLLING ACCESS TO CLASS - MEMBERS</quote>.</para> + <para>See , chapter 5, <quote>CONTROLLING ACCESS TO CLASS MEMBERS</quote>.</para> </glossdef> </glossentry> @@ -2250,8 +1864,7 @@ Is 2016 a leap year? true</screen> <glossdef> <programlisting language="java">Math.pow((1 + interestRate / 100), years)</programlisting> - <para>See , chapter 2, <quote>MATHEMATICAL FUNCTIONS AND - CONSTANTS</quote>.</para> + <para>See , chapter 2, <quote>MATHEMATICAL FUNCTIONS AND CONSTANTS</quote>.</para> </glossdef> </glossentry> </glosslist> @@ -2264,23 +1877,12 @@ Is 2016 a leap year? true</screen> <qandadiv> <qandaentry> <question> - <para>Our current <code>Account</code> class does not handle - negative balances accordingly. Typically banks will charge a - different interest rate whenever an account is in debt i.e. - having a negative balance. In this case a second so called - default interest rate (being significantly higher) will be - applied.</para> - - <para>Extend the current project by adding a new instance - variable <varname>defaultInterestRate</varname> along with - getter and setter methods. Then change the implementation of - <code>applyInterest()</code> and <code>applyInterest(int - years)</code> by using the correct interest value according to - the account's balance being positive or negative.</para> + <para>Our current <code>Account</code> class does not handle negative balances accordingly. Typically banks will charge a different interest rate whenever an account is in debt i.e. having a negative balance. In this case a second so called default interest rate (being significantly higher) will be applied.</para> + + <para>Extend the current project by adding a new instance variable <varname>defaultInterestRate</varname> along with getter and setter methods. Then change the implementation of <code>applyInterest()</code> and <code>applyInterest(int years)</code> by using the correct interest value according to the account's balance being positive or negative.</para> <caution> - <para>Do not forget to change the <command>Javadoc</command> - comments accordingly!</para> + <para>Do not forget to change the <command>Javadoc</command> comments accordingly!</para> </caution> </question> @@ -2289,24 +1891,19 @@ Is 2016 a leap year? true</screen> <para role="eclipse">Sd1/interest/V2</para> </annotation> - <para>We introduce a new variable - <code>defaultInterestRate</code> to cover negative balance - values:</para> + <para>We introduce a new variable <code>defaultInterestRate</code> to cover negative balance values:</para> <programlisting language="java"> private static double interestRate = 1.5, // applied to positive balances <emphasis role="bold">defaultInterestRate = 15.; // applied to negative balances</emphasis></programlisting> - <para>We need the appropriate getter and setter methods in - <classname - xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html">Account</classname>:</para> + <para>We need the appropriate getter and setter methods in <classname xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html">Account</classname>:</para> <programlisting language="java"> /** * @return * the current default interest rate value. */ - public static double <link - xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html#getDefaultInterestRate--">getDefaultInterestRate()</link> { + public static double <link xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html#getDefaultInterestRate--">getDefaultInterestRate()</link> { return defaultInterestRate; } @@ -2317,13 +1914,11 @@ Is 2016 a leap year? true</screen> * @param defaultInterestRate * the desired default interest rate value. */ - public static void <link - xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html#setDefaultInterestRate-double-">setDefaultInterestRate(double defaultInterestRate)</link> { + public static void <link xlink:href="Ref/api/P/interest/V2/de/hdm_stuttgart/mi/sd1/interest/Account.html#setDefaultInterestRate-double-">setDefaultInterestRate(double defaultInterestRate)</link> { Account.defaultInterestRate = defaultInterestRate; }</programlisting> - <para>The computed interest depends on positive or negative - balance values:</para> + <para>The computed interest depends on positive or negative balance values:</para> <programlisting language="java"> public void applyInterest(int years) { if (0 < balance) { @@ -2333,11 +1928,7 @@ Is 2016 a leap year? true</screen> } }</programlisting> - <para>A complete solution including updated - <productname>Javadoc</productname> comments can be downloaded - <link - xlink:href="https://cloud.mi.hdm-stuttgart.de/owncloud/public.php?service=files&t=577bc9091391524692b6d812a6d2737a">from - here</link>.</para> + <para>A complete solution including updated <productname>Javadoc</productname> comments can be downloaded <link xlink:href="https://cloud.mi.hdm-stuttgart.de/owncloud/public.php?service=files&t=577bc9091391524692b6d812a6d2737a">from here</link>.</para> </answer> </qandaentry> </qandadiv> @@ -2357,29 +1948,17 @@ Is 2016 a leap year? true</screen> ...// statements being omitted int sum = a + b;</programlisting> - <para>Which representation related problem may arise here? May - you supply a solution?</para> + <para>Which representation related problem may arise here? May you supply a solution?</para> </question> <answer> - <para>The sum of a and b may either exceed - <code>java.lang.Integer.MAX_VALUE</code> or in turn may be - less than <code>java.lang.Integer.MIN_VALUE</code>. To avoid - this type of overflow error our variable <code>sum</code> may - be declared of type long:</para> + <para>The sum of a and b may either exceed <code>java.lang.Integer.MAX_VALUE</code> or in turn may be less than <code>java.lang.Integer.MIN_VALUE</code>. To avoid this type of overflow error our variable <code>sum</code> may be declared of type long:</para> <programlisting language="java">int a = ..., b = ...; ...// statements being omitted long sum = a + b;</programlisting> - <para>Unfortunately this does not (yet) help at all: Since - both operands <code>a</code> and <code>b</code> are of type - <code>int</code> the expression <code>a + b</code> is also of - type int and will be evaluated as such. To circumvent this - problem we have to cast at least one operand to type - <code>long</code> prior to computing the sum. This works since - the cast operator <code>(long)</code> does have higher - priority than the <quote>+</quote> operator</para> + <para>Unfortunately this does not (yet) help at all: Since both operands <code>a</code> and <code>b</code> are of type <code>int</code> the expression <code>a + b</code> is also of type int and will be evaluated as such. To circumvent this problem we have to cast at least one operand to type <code>long</code> prior to computing the sum. This works since the cast operator <code>(long)</code> does have higher priority than the <quote>+</quote> operator</para> <programlisting language="java">int a = ..., b = ...; ...// statements being omitted @@ -2397,20 +1976,13 @@ long sum = (long)a + b;</programlisting> <qandadiv> <qandaentry> <question> - <para>Implement a class representing fractions. You may find a - dummy implementation containing some (not yet working) sample - usage code being contained in a <code>main()</code> - method.</para> + <para>Implement a class representing fractions. You may find a dummy implementation containing some (not yet working) sample usage code being contained in a <code>main()</code> method.</para> <annotation role="make"> <para role="eclipse">Sd1/fraction/V05</para> </annotation> - <para>This Maven archive does include a <xref - linkend="glo_Junit"/> test currently being disabled by an - <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - directive:</para> + <para>This Maven archive does include a <xref linkend="glo_Junit"/> test currently being disabled by an <interfacename xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> directive:</para> <programlisting language="java">public class FractionTest { /** @@ -2421,11 +1993,7 @@ long sum = (long)a + b;</programlisting> public void testAdditionMultiply() { </programlisting> - <para>The current skeleton will yield a NullPointerException - on test execution. After completing your implementation remove - this <interfacename - xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> - directive allowing for test execution.</para> + <para>The current skeleton will yield a NullPointerException on test execution. After completing your implementation remove this <interfacename xlink:href="http://junit.sourceforge.net/javadoc/org/junit/Ignore.html">@Ignore</interfacename> directive allowing for test execution.</para> </question> <answer> @@ -2433,8 +2001,7 @@ long sum = (long)a + b;</programlisting> <para role="eclipse">Sd1/fraction/V1</para> </annotation> - <para>See implementation at <link - xlink:href="Ref/api/P/fraction/V1/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">Fraction</link>.</para> + <para>See implementation at <link xlink:href="Ref/api/P/fraction/V1/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">Fraction</link>.</para> </answer> </qandaentry> </qandadiv> @@ -2457,23 +2024,13 @@ long sum = (long)a + b;</programlisting> result += ++a - b++ + --c;</programlisting> - <para>Rewrite this code by decomposing the last line into - several lines to make the code easier to understand.</para> + <para>Rewrite this code by decomposing the last line into several lines to make the code easier to understand.</para> - <para>Hint: After execution of your modified code all variable - must have identical values with respect to the original code. - In other words: Your modifications shall not alter the code's - behaviour in any way.</para> + <para>Hint: After execution of your modified code all variable must have identical values with respect to the original code. In other words: Your modifications shall not alter the code's behaviour in any way.</para> </question> <answer> - <para>Incrementing <code>++a</code> and decrementing - <code>--c</code> happens prior to adding / subtracting their - values to the variable <code>result</code> (prefix notation). - The increment operation <code>b--</code> in contrast happens - after being being subtracted from variable <code>result</code> - (postfix notation). The following code snippet is thus - equivalent:</para> + <para>Incrementing <code>++a</code> and decrementing <code>--c</code> happens prior to adding / subtracting their values to the variable <code>result</code> (prefix notation). The increment operation <code>b--</code> in contrast happens after being being subtracted from variable <code>result</code> (postfix notation). The following code snippet is thus equivalent:</para> <programlisting language="java"> int a = 6, b = 7, @@ -2497,10 +2054,7 @@ long sum = (long)a + b;</programlisting> <qandadiv> <qandaentry> <question> - <para>Wrap your implementation from <xref - linkend="sd1SectPlayingLottery"/> into a single method - <methodname>binomial(int n, int k)</methodname>. Then manually - calculate smaller values such as <inlineequation> + <para>Wrap your implementation from <xref linkend="sd1SectPlayingLottery"/> into a single method <methodname>binomial(int n, int k)</methodname>. Then manually calculate smaller values such as <inlineequation> <m:math display="inline"> <m:mrow> <m:mrow> @@ -2526,8 +2080,7 @@ long sum = (long)a + b;</programlisting> </m:mrow> </m:mrow> </m:math> - </inlineequation> beforehand to define corresponding unit - tests. Do not forget: <inlineequation> + </inlineequation> beforehand to define corresponding unit tests. Do not forget: <inlineequation> <m:math display="inline"> <m:mrow> <m:mrow> @@ -2633,11 +2186,7 @@ long sum = (long)a + b;</programlisting> </m:mrow> </m:mrow> </m:math> - </inlineequation> beforehand to add more unit tests. Your - implementation is likely to fail for (at least) one of these. - Why does this happen? May you propose a solution? Keep in mind - the idea to deal with <quote>6 out of 90</quote> lottery - situations.</para> + </inlineequation> beforehand to add more unit tests. Your implementation is likely to fail for (at least) one of these. Why does this happen? May you propose a solution? Keep in mind the idea to deal with <quote>6 out of 90</quote> lottery situations.</para> <tip> <para>Be careful about possible arithmetic overflows.</para> @@ -2645,17 +2194,13 @@ long sum = (long)a + b;</programlisting> </question> <answer> - <para>A complete implementation among with some unit tests is - available at:</para> + <para>A complete implementation among with some unit tests is available at:</para> <annotation role="make"> <para role="eclipse">Sd1/Binomial/V1</para> </annotation> - <para>This actually wraps <xref - linkend="sd1EqnBinomialCalculate"/> into a method - <methodname>public static long binomial(int n, int - k)</methodname>.</para> + <para>This actually wraps <xref linkend="sd1EqnBinomialCalculate"/> into a method <methodname>public static long binomial(int n, int k)</methodname>.</para> <para>What happens when calculating <inlineequation> <m:math display="inline"> @@ -2691,10 +2236,7 @@ long sum = (long)a + b;</programlisting> numerator *= i; }</programlisting> - <para>In this case our numerator variable of type - <code>long</code> will be set to a value 22! (factorial). - Consider a simple demo code snippet among with its - result:</para> + <para>In this case our numerator variable of type <code>long</code> will be set to a value 22! (factorial). Consider a simple demo code snippet among with its result:</para> <informaltable border="1"> <colgroup width="10%"/> @@ -2742,8 +2284,7 @@ Largest long value:9223372036854775807</screen></td> </tr> </informaltable> - <para>So 21! already yields a negative value. Actually - <inlineequation> + <para>So 21! already yields a negative value. Actually <inlineequation> <m:math display="inline"> <m:mrow> <m:mrow> @@ -2761,13 +2302,9 @@ Largest long value:9223372036854775807</screen></td> <m:mi>9223372036854775807</m:mi> </m:mrow> </m:math> - </inlineequation> still holds. The subsequent multiplication - by 21 however results in an arithmetic overflow.</para> + </inlineequation> still holds. The subsequent multiplication by 21 however results in an arithmetic overflow.</para> - <para>This does not show up as an error since exactly the same - (mis)calculation happens for the denominator. Thus their - quotient by coincidence returns a correct value of 1. This - however is no longer true when examining <inlineequation> + <para>This does not show up as an error since exactly the same (mis)calculation happens for the denominator. Thus their quotient by coincidence returns a correct value of 1. This however is no longer true when examining <inlineequation> <m:math display="inline"> <m:mrow> <m:mrow> @@ -2795,9 +2332,7 @@ Largest long value:9223372036854775807</screen></td> </m:math> </inlineequation>.</para> - <para>We may still get correct results in many situations - including the given example. If k gets too large we may - use:</para> + <para>We may still get correct results in many situations including the given example. If k gets too large we may use:</para> <informalequation> <m:math display="block"> @@ -2913,8 +2448,7 @@ Largest long value:9223372036854775807</screen></td> </m:mrow> </m:mrow> </m:math> - </inlineequation> having identical value by adding a simple - <code>if</code> statement:</para> + </inlineequation> having identical value by adding a simple <code>if</code> statement:</para> <programlisting language="java"> public static long binomial(int n, int k) { @@ -2931,9 +2465,7 @@ Largest long value:9223372036854775807</screen></td> long numerator = 1; ...</programlisting> - <para>Finally our lottery code from <xref - linkend="sd1SectPlayingLottery"/> gets a little bit - simplified:</para> + <para>Finally our lottery code from <xref linkend="sd1SectPlayingLottery"/> gets a little bit simplified:</para> <informaltable border="1"> <colgroup width="10%"/> @@ -2970,16 +2502,12 @@ Largest long value:9223372036854775807</screen></td> <title>The greatest common divisor and the common multiple</title> <qandaset defaultlabel="qanda" xml:id="sd1QandaGcd"> - <title>Finding the greatest common divisor of two integer - values</title> + <title>Finding the greatest common divisor of two integer values</title> <qandadiv> <qandaentry> <question> - <para>We recall <xref linkend="sd1SectFraction"/>. So far no one - demanded cancelling fractions. Yet calling <code>new - Fraction(4,8)</code> will create an instance internally being - represented by <inlineequation> + <para>We recall <xref linkend="sd1SectFraction"/>. So far no one demanded cancelling fractions. Yet calling <code>new Fraction(4,8)</code> will create an instance internally being represented by <inlineequation> <m:math display="inline"> <m:mfrac> <m:mi>4</m:mi> @@ -2997,25 +2525,16 @@ Largest long value:9223372036854775807</screen></td> </m:math> </inlineequation>.</para> - <para>Cancelling fractions requires implementing e.g. the <link - xlink:href="https://www.math.rutgers.edu/~greenfie/gs2004/euclid.html">Euclidean - algorithm</link> in order to find the greatest common divisor - (<acronym>GCD</acronym>) of two non-zero integer values.</para> + <para>Cancelling fractions requires implementing e.g. the <link xlink:href="https://www.math.rutgers.edu/~greenfie/gs2004/euclid.html">Euclidean algorithm</link> in order to find the greatest common divisor (<acronym>GCD</acronym>) of two non-zero integer values.</para> - <para>Read the above link and implement a class method - getGcd(long, long) inside a class - <classname>Math</classname>:</para> + <para>Read the above link and implement a class method getGcd(long, long) inside a class <classname>Math</classname>:</para> - <programlisting language="java"> public static long getGcd(long a, long b) <co - xml:id="sd1ListEuclidNeg"/> { + <programlisting language="java"> public static long getGcd(long a, long b) <co xml:id="sd1ListEuclidNeg"/> { // Following http://www.math.rutgers.edu/~greenfie/gs2004/euclid.html return ??; }</programlisting> - <para>With respect to fractions one or both parameters - <code>a</code> and <code>b</code> <coref - linkend="sd1ListEuclidNeg"/> may be zero or negative. So we do - have several special cases to handle:</para> + <para>With respect to fractions one or both parameters <code>a</code> and <code>b</code> <coref linkend="sd1ListEuclidNeg"/> may be zero or negative. So we do have several special cases to handle:</para> <glosslist> <glossentry> @@ -3038,21 +2557,15 @@ Largest long value:9223372036854775807</screen></td> <glossterm>a != 0 and b != 0</glossterm> <glossdef> - <para>Return the <acronym>gcd</acronym> of the absolute - values of a and b</para> + <para>Return the <acronym>gcd</acronym> of the absolute values of a and b</para> </glossdef> </glossentry> </glosslist> - <para>Based on <methodname>getGcd(...)</methodname> implement - the <link - xlink:href="https://en.wikipedia.org/wiki/Least_common_multiple">least - common multiple</link> of two long values:</para> + <para>Based on <methodname>getGcd(...)</methodname> implement the <link xlink:href="https://en.wikipedia.org/wiki/Least_common_multiple">least common multiple</link> of two long values:</para> <tip> - <para>Follow the test driven approach: Provide dummy methods - and write tests prior to implementation of - <methodname>getGcd()</methodname>.</para> + <para>Follow the test driven approach: Provide dummy methods and write tests prior to implementation of <methodname>getGcd()</methodname>.</para> </tip> <programlisting language="java">public static long getCommonMultiple(long a, long b) {...}</programlisting> @@ -3063,11 +2576,9 @@ Largest long value:9223372036854775807</screen></td> <para role="eclipse">Sd1/Gcd/V1</para> </annotation> - <para>Implementing <methodname - xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getGcd(</methodname>...):</para> + <para>Implementing <methodname xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getGcd(</methodname>...):</para> - <programlisting language="java"> public static long <link - xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getCommonMultiple-long-long-">getGcd(long a, long b)</link> { + <programlisting language="java"> public static long <link xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getCommonMultiple-long-long-">getGcd(long a, long b)</link> { // Following http://www.math.rutgers.edu/~greenfie/gs2004/euclid.html if (a < b) { // Swap the values of a and b @@ -3083,8 +2594,7 @@ Largest long value:9223372036854775807</screen></td> return a; }</programlisting> - <para>Knowing the the <acronym>gcd</acronym> of two values a and - b the common multiple may be obtained by <inlineequation> + <para>Knowing the the <acronym>gcd</acronym> of two values a and b the common multiple may be obtained by <inlineequation> <m:math display="inline"> <m:mrow> <m:mfrac> @@ -3122,8 +2632,7 @@ Largest long value:9223372036854775807</screen></td> </m:math> </inlineequation>. Thus we have:</para> - <programlisting language="java"> public static long <link - xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getLeastCommonMultiple(long a, long b)</link> { + <programlisting language="java"> public static long <link xlink:href="Ref/api/P/Gcd/V1/de/hdm_stuttgart/mi/sd1/gcd/Math.html#getGcd-long-long-">getLeastCommonMultiple(long a, long b)</link> { final long gcd = getGcd(a, b); if (1 == gcd) { return a * b; @@ -3140,24 +2649,15 @@ Largest long value:9223372036854775807</screen></td> <section xml:id="ed1FractionCancel"> <title>Cancelling fractions</title> - <para>The following exercise requires the import of the previous Maven - based exercise <xref linkend="sd1QandaGcd"/>. The import may be effected - by:</para> + <para>The following exercise requires the import of the previous Maven based exercise <xref linkend="sd1QandaGcd"/>. The import may be effected by:</para> <orderedlist> <listitem> - <para>Creating a local Maven jar archive export by executing - <quote><command>mvn</command> <option>install</option></quote> in - project <xref linkend="sd1QandaGcd"/> at the command line. - Alternatively you may right click on your <xref - linkend="glo_pom.xml"/> file in <xref linkend="glo_Soft_Eclipse"/> - hitting <quote>Run as Maven build</quote> using - <parameter>install</parameter> as goal.</para> + <para>Creating a local Maven jar archive export by executing <quote><command>mvn</command> <option>install</option></quote> in project <xref linkend="sd1QandaGcd"/> at the command line. Alternatively you may right click on your <xref linkend="glo_pom.xml"/> file in <xref linkend="glo_Soft_Eclipse"/> hitting <quote>Run as Maven build</quote> using <parameter>install</parameter> as goal.</para> </listitem> <listitem> - <para>Defining <xref linkend="sd1QandaGcd"/> as a dependency <coref - linkend="mvnGcdDep"/> in your current project:</para> + <para>Defining <xref linkend="sd1QandaGcd"/> as a dependency <coref linkend="mvnGcdDep"/> in your current project:</para> <programlisting language="xml"><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" @@ -3205,24 +2705,15 @@ Largest long value:9223372036854775807</screen></td> <qandadiv> <qandaentry> <question> - <para>We have implemented <acronym>GCD</acronym> computation in - <xref linkend="sd1QandaGcd"/>. The current exercises idea is to - implement cancelling of fractions by using the method - <methodname>long getGcd(long a, long b)</methodname>. Change the - following implementation items:</para> + <para>We have implemented <acronym>GCD</acronym> computation in <xref linkend="sd1QandaGcd"/>. The current exercises idea is to implement cancelling of fractions by using the method <methodname>long getGcd(long a, long b)</methodname>. Change the following implementation items:</para> <itemizedlist> <listitem> - <para>The constructor should cancel a fraction if required, - see introductory remark.</para> + <para>The constructor should cancel a fraction if required, see introductory remark.</para> </listitem> <listitem> - <para>The Methods <methodname>mult(...)</methodname> and - <methodname>add(...)</methodname> should cancel any - resulting Fraction instance. It might be worth to consider a - defensive strategy to avoid unnecessary overflow - errors.</para> + <para>The Methods <methodname>mult(...)</methodname> and <methodname>add(...)</methodname> should cancel any resulting Fraction instance. It might be worth to consider a defensive strategy to avoid unnecessary overflow errors.</para> </listitem> </itemizedlist> @@ -3234,28 +2725,23 @@ Largest long value:9223372036854775807</screen></td> <para role="eclipse">Sd1/fraction/V2</para> </annotation> - <para>Modifying the constructor is straightforward: On creating - a fraction we simply divide both numerator and denominator by - the <acronym>GCD</acronym> value:</para> + <para>Modifying the constructor is straightforward: On creating a fraction we simply divide both numerator and denominator by the <acronym>GCD</acronym> value:</para> - <programlisting language="java"> <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#Fraction-long-long-">public Fraction(long numerator, long denominator)</link> { + <programlisting language="java"> <link xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#Fraction-long-long-">public Fraction(long numerator, long denominator)</link> { final long gcd = Math.getGcd(numerator, denominator); setNumerator(numerator / gcd); setDenominator(denominator / gcd); }</programlisting> - <para>Its tempting to implement - <methodname>mult(...)</methodname> in a simple fashion:</para> + <para>Its tempting to implement <methodname>mult(...)</methodname> in a simple fashion:</para> <programlisting language="java"> public Fraction mult2(Fraction f) { return new Fraction(numerator * f.numerator, denominator * f.denominator); }</programlisting> - <para>This is however too shortsighted. Consider the example - <inlineequation> + <para>This is however too shortsighted. Consider the example <inlineequation> <m:math display="inline"> <m:mrow> <m:mfrac> @@ -3273,15 +2759,9 @@ Largest long value:9223372036854775807</screen></td> </m:mfrac> </m:mrow> </m:math> - </inlineequation>. Our simple implementation proposal would - call <code>new Fraction(12, 14)</code> only to discover a - <acronym>GCD</acronym> value of 4. Having larger argument values - this might cause an unnecessary overflow. Moreover the - <acronym>GCD</acronym> calculation will take longer than - needed.</para> - - <para>We may instead transform the term in question by - exchanging the numerators like <inlineequation> + </inlineequation>. Our simple implementation proposal would call <code>new Fraction(12, 14)</code> only to discover a <acronym>GCD</acronym> value of 4. Having larger argument values this might cause an unnecessary overflow. Moreover the <acronym>GCD</acronym> calculation will take longer than needed.</para> + + <para>We may instead transform the term in question by exchanging the numerators like <inlineequation> <m:math display="inline"> <m:mrow> <m:mfrac> @@ -3299,10 +2779,7 @@ Largest long value:9223372036854775807</screen></td> </m:mfrac> </m:mrow> </m:math> - </inlineequation> to enable cancelling <emphasis - role="bold">prior</emphasis> to multiplying. Now the call - <code>new Fraction(4,2)</code> will construct the representation - <inlineequation> + </inlineequation> to enable cancelling <emphasis role="bold">prior</emphasis> to multiplying. Now the call <code>new Fraction(4,2)</code> will construct the representation <inlineequation> <m:math display="inline"> <m:mfrac> <m:mi>2</m:mi> @@ -3310,8 +2787,7 @@ Largest long value:9223372036854775807</screen></td> <m:mi>1</m:mi> </m:mfrac> </m:math> - </inlineequation> and finishing the computation will yield the - correct result <inlineequation> + </inlineequation> and finishing the computation will yield the correct result <inlineequation> <m:math display="inline"> <m:mfrac> <m:mi>6</m:mi> @@ -3321,8 +2797,7 @@ Largest long value:9223372036854775807</screen></td> </m:math> </inlineequation>. We should thus implement:</para> - <programlisting language="java"> public Fraction <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#mult-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">mult(Fraction f)</link> { + <programlisting language="java"> public Fraction <link xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#mult-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">mult(Fraction f)</link> { final Fraction f1 = new Fraction(f.numerator, denominator), f2 = new Fraction(numerator, f.denominator); @@ -3330,14 +2805,9 @@ Largest long value:9223372036854775807</screen></td> f1.denominator * f2.denominator); }</programlisting> - <para>Similar reflections lead to the clue decomposing the - denominators when implementing - <methodname>add(...)</methodname>. This is what you'd do as well - if your task was adding two fractions by hand trying to avoid - large numbers:</para> + <para>Similar reflections lead to the clue decomposing the denominators when implementing <methodname>add(...)</methodname>. This is what you'd do as well if your task was adding two fractions by hand trying to avoid large numbers:</para> - <programlisting language="java"> public Fraction <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#add-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">add(Fraction f)</link> { + <programlisting language="java"> public Fraction <link xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html#add-de.hdm_stuttgart.mi.sd1.fraction.Fraction-">add(Fraction f)</link> { final long gcd = Math.getGcd(denominator, f.denominator); @@ -3345,12 +2815,9 @@ Largest long value:9223372036854775807</screen></td> (denominator / gcd) * f.numerator, (denominator / gcd) * f.denominator); }</programlisting> - <para>See complete <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">implementation - here</link>. We may re-use out test:</para> + <para>See complete <link xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Fraction.html">implementation here</link>. We may re-use out test:</para> - <programlisting language="java"> public static void <link - xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Driver.html#main-java.lang.String:A-">main(String[] args)</link> { + <programlisting language="java"> public static void <link xlink:href="Ref/api/P/fraction/V2/de/hdm_stuttgart/mi/sd1/fraction/Driver.html#main-java.lang.String:A-">main(String[] args)</link> { // Input final Fraction @@ -3374,8 +2841,7 @@ Largest long value:9223372036854775807</screen></td> <section xml:id="sd1MathMaxAbs"> <title>Building a private library of mathematical functions.</title> - <para>The following sections provide exercises on implementing - mathematical functions. We start with an easy one.</para> + <para>The following sections provide exercises on implementing mathematical functions. We start with an easy one.</para> <section xml:id="sd1SectMaxAbs"> <title>Maximum and absolute value</title> @@ -3384,12 +2850,7 @@ Largest long value:9223372036854775807</screen></td> <qandadiv> <qandaentry> <question> - <para>Implement a class method methods <methodname>double - abs(double)</methodname> and two overloaded methods - <methodname>double max(double, double)</methodname> and - <methodname>double max(double, double, double)</methodname> in - a class <classname>Math</classname> living in a package of - your choice:</para> + <para>Implement a class method methods <methodname>double abs(double)</methodname> and two overloaded methods <methodname>double max(double, double)</methodname> and <methodname>double max(double, double, double)</methodname> in a class <classname>Math</classname> living in a package of your choice:</para> <programlisting language="java">package de.hdm_stuttgart.de.sd1.math; @@ -3438,9 +2899,7 @@ public class Math { <para role="eclipse">Sd1/math/V0_5</para> </annotation> - <para>See <link - xlink:href="Ref/api/P/math/V0_5/de/hdm_stuttgart/de/sd1/math/Math.html">implementation - here.</link></para> + <para>See <link xlink:href="Ref/api/P/math/V0_5/de/hdm_stuttgart/de/sd1/math/Math.html">implementation here.</link></para> </answer> </qandaentry> </qandadiv> @@ -3454,8 +2913,7 @@ public class Math { <qandadiv> <qandaentry> <question> - <para>Compute the factorial of a given integer value, for - example:</para> + <para>Compute the factorial of a given integer value, for example:</para> <informalequation> <m:math display="block"> @@ -3506,22 +2964,15 @@ public class Math { <orderedlist> <listitem> - <para>The method's signature looks slightly weird: It does - expect an argument of type <code>int</code> but returns a - <code>long</code> value. Explain the underlying - ratio.</para> + <para>The method's signature looks slightly weird: It does expect an argument of type <code>int</code> but returns a <code>long</code> value. Explain the underlying ratio.</para> </listitem> <listitem> - <para>Mind the above <xref linkend="glo_Javadoc"/> passage - concerning integer overflow related problems with respect - to your own implementation.</para> + <para>Mind the above <xref linkend="glo_Javadoc"/> passage concerning integer overflow related problems with respect to your own implementation.</para> </listitem> <listitem> - <para>Provide adequate unit tests. Do not forget special - values and handling of arithmetic overflow - problems.</para> + <para>Provide adequate unit tests. Do not forget special values and handling of arithmetic overflow problems.</para> </listitem> </orderedlist> </question> @@ -3535,11 +2986,7 @@ public class Math { <orderedlist> <listitem> - <para>Returning a long is sensible since even small - argument values in return yield large factorials. - <code>long</code> is the best (largest) choice among the - <xref linkend="glo_Java"/> built-in integer types. - Consider the following example code:</para> + <para>Returning a long is sensible since even small argument values in return yield large factorials. <code>long</code> is the best (largest) choice among the <xref linkend="glo_Java"/> built-in integer types. Consider the following example code:</para> <programlisting language="java"> public static void main(String[] args) { @@ -3578,32 +3025,20 @@ public class Math { <m:mo>!</m:mo> </m:mrow> </m:math> - </inlineequation> we already see <code>long</code> - overflow related errors. Thus allowing for even larger - <code>long</code> arguments instead of <code>int</code> - does not make sense at all.</para> + </inlineequation> we already see <code>long</code> overflow related errors. Thus allowing for even larger <code>long</code> arguments instead of <code>int</code> does not make sense at all.</para> - <para>Since <quote>21</quote> is pretty small we might - favour <code>short</code> (or even <code>char</code>) as - argument type:</para> + <para>Since <quote>21</quote> is pretty small we might favour <code>short</code> (or even <code>char</code>) as argument type:</para> <programlisting language="java">static public long factorial(short n) { ... }</programlisting> - <para>This however is a bad idea: Even simple expressions - would be flagged as compile time errors since both integer - literals and arithmetic expressions in <xref - linkend="glo_Java"/> evaluate to the data type - <code>int</code>:</para> + <para>This however is a bad idea: Even simple expressions would be flagged as compile time errors since both integer literals and arithmetic expressions in <xref linkend="glo_Java"/> evaluate to the data type <code>int</code>:</para> <programlisting language="java">// Compile time error: // The method factorial(short) in the type // App is not applicable for the arguments (int) System.out.println(factorial(3));</programlisting> - <para>BTW: If we choose <methodname>static public int - factorial(short n)</methodname> (int return type) the - first overflow error happens already when trying to - calculate <inlineequation> + <para>BTW: If we choose <methodname>static public int factorial(short n)</methodname> (int return type) the first overflow error happens already when trying to calculate <inlineequation> <m:math display="inline"> <m:mrow> <m:mi>13</m:mi> @@ -3629,8 +3064,7 @@ System.out.println(factorial(3));</programlisting> </listitem> <listitem> - <para>Tests must address regular, special and overflow - related argument values.</para> + <para>Tests must address regular, special and overflow related argument values.</para> </listitem> </orderedlist> </answer> @@ -3646,19 +3080,13 @@ System.out.println(factorial(3));</programlisting> <qandadiv> <qandaentry> <question> - <para>We introduce a second strategy calculating a given - argument's factorial by introducing recursive methods. - Recursive programming is also a prerequisite for the later - <link linkend="sd1SectTicTacToeComputerVsHuman">tic-tac-toe - strategy exercise</link>.</para> + <para>We introduce a second strategy calculating a given argument's factorial by introducing recursive methods. Recursive programming is also a prerequisite for the later <link linkend="sd1SectTicTacToeComputerVsHuman">tic-tac-toe strategy exercise</link>.</para> - <para>Recursive methods will call themselves. Recursive - methods typically have:</para> + <para>Recursive methods will call themselves. Recursive methods typically have:</para> <orderedlist> <listitem> - <para>A recursive expression reducing a problem step by - step.</para> + <para>A recursive expression reducing a problem step by step.</para> </listitem> <listitem> @@ -3666,8 +3094,7 @@ System.out.println(factorial(3));</programlisting> </listitem> </orderedlist> - <para>With respect to calculating factorials the former may be - expresses as:</para> + <para>With respect to calculating factorials the former may be expresses as:</para> <glosslist> <glossentry> @@ -3731,8 +3158,7 @@ System.out.println(factorial(3));</programlisting> </glossentry> </glosslist> - <para>This allows for calculating e.g. 4! in a recursive - fashion:</para> + <para>This allows for calculating e.g. 4! in a recursive fashion:</para> <informaltable border="1"> <colgroup width="4%"/> @@ -3944,16 +3370,9 @@ System.out.println(factorial(3));</programlisting> </tr> </informaltable> - <para>Use the above scheme for implementing a second method - <methodname>static public long factorialRecurse(int - n)</methodname>. The implementation should only use recursion - and termination conditions but no kind of loops whatsoever. - You may disregard the arithmetic overflow problem.</para> + <para>Use the above scheme for implementing a second method <methodname>static public long factorialRecurse(int n)</methodname>. The implementation should only use recursion and termination conditions but no kind of loops whatsoever. You may disregard the arithmetic overflow problem.</para> - <para>BTW: The concept of recursion in computer science is - closely related to the <link - xlink:href="https://en.wikipedia.org/wiki/Mathematical_induction">mathematical - concept of induction</link>.</para> + <para>BTW: The concept of recursion in computer science is closely related to the <link xlink:href="https://en.wikipedia.org/wiki/Mathematical_induction">mathematical concept of induction</link>.</para> </question> <answer> @@ -3966,13 +3385,11 @@ System.out.println(factorial(3));</programlisting> return n * factorialRecurse(n - 1); // Reducing step: n! = n * (n - 1)! }</programlisting> - <para>If you fancy <quote>compact</quote> code you may as well - write.</para> + <para>If you fancy <quote>compact</quote> code you may as well write.</para> <programlisting language="java"> static public long factorialRecurse(int n) { return 0 == n ? 1: n * f(n - 1);}</programlisting> - <para>Beware: The latter sacrifies both readability and the - ability to debug for brevity. Your mileage may vary.</para> + <para>Beware: The latter sacrifies both readability and the ability to debug for brevity. Your mileage may vary.</para> </answer> </qandaentry> </qandadiv> @@ -3986,17 +3403,10 @@ System.out.println(factorial(3));</programlisting> <qandadiv> <qandaentry> <question> - <para>With respect to the upcoming <link - linkend="sd1SectTicTacToeComputerVsHuman">tic-tac-toe strategy - exercise</link> we provide a second example of a recursively - defined method. Our binomial coefficients from our <link - linkend="sd1SectLotteryRevisited">lottery exercise</link> may - be computed in a recursive fashion. Consider pascal's - triangle:</para> + <para>With respect to the upcoming <link linkend="sd1SectTicTacToeComputerVsHuman">tic-tac-toe strategy exercise</link> we provide a second example of a recursively defined method. Our binomial coefficients from our <link linkend="sd1SectLotteryRevisited">lottery exercise</link> may be computed in a recursive fashion. Consider pascal's triangle:</para> <figure xml:id="sd1FigPascalTriangle"> - <title>Pascal's triangle representing binomial - coefficients.</title> + <title>Pascal's triangle representing binomial coefficients.</title> <mediaobject> <imageobject> @@ -4005,10 +3415,7 @@ System.out.println(factorial(3));</programlisting> </mediaobject> </figure> - <para>Each inner node within the triangle is the sum of its - two upper left and right neighbours. With respect to a - recursive definition <xref linkend="sd1FigPascalTriangle"/> - tells us:</para> + <para>Each inner node within the triangle is the sum of its two upper left and right neighbours. With respect to a recursive definition <xref linkend="sd1FigPascalTriangle"/> tells us:</para> <glosslist> <glossentry> @@ -4137,9 +3544,7 @@ System.out.println(factorial(3));</programlisting> </m:math> </inlineequation> .</para> - <para>This equation is actually a straightforward - exercise by simply adding two fractions. Wanna - try?</para> + <para>This equation is actually a straightforward exercise by simply adding two fractions. Wanna try?</para> </glossdef> </glossentry> @@ -4207,8 +3612,7 @@ System.out.println(factorial(3));</programlisting> </m:math> </inlineequation>.</para> - <para>NB: These values show up along the left and right - edge in <xref linkend="sd1FigPascalTriangle"/>.</para> + <para>NB: These values show up along the left and right edge in <xref linkend="sd1FigPascalTriangle"/>.</para> </glossdef> </glossentry> </glosslist> @@ -4217,41 +3621,23 @@ System.out.println(factorial(3));</programlisting> <orderedlist> <listitem> - <para>Re-implement <methodname>public static long - binomial(int n, int k)</methodname> in a recursive fashion - as outlined above.</para> + <para>Re-implement <methodname>public static long binomial(int n, int k)</methodname> in a recursive fashion as outlined above.</para> <tip> - <para>This is surprisingly simple. You may want to - consider reading external resources dealing with the - subject of recursively implemented methods.</para> + <para>This is surprisingly simple. You may want to consider reading external resources dealing with the subject of recursively implemented methods.</para> </tip> </listitem> <listitem> - <para>Compare the performance of your recursive - implementation and the traditional loop based approach. - The <quote>6 out of 90</quote> lottery is a good starting - point.</para> + <para>Compare the performance of your recursive implementation and the traditional loop based approach. The <quote>6 out of 90</quote> lottery is a good starting point.</para> <tip> - <para>The standard methods <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#currentTimeMillis--">currentTimeMillis()</link> - and <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#nanoTime--">nanoTime</link> - allow for measuring method execution by means of - subtracting time stamp values prior and after execution. - <quote - xlink:href="https://www.mkyong.com/java/how-do-calculate-elapsed-execute-time-in-java">See - How to calculate elapsed / execute time in - Java</quote>.</para> + <para>The standard methods <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#currentTimeMillis--">currentTimeMillis()</link> and <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#nanoTime--">nanoTime</link> allow for measuring method execution by means of subtracting time stamp values prior and after execution. <quote xlink:href="https://www.mkyong.com/java/how-do-calculate-elapsed-execute-time-in-java">See How to calculate elapsed / execute time in Java</quote>.</para> </tip> </listitem> <listitem> - <para>Reuse your unit tests from the <link - linkend="sd1SectLotteryRevisited">lottery - exercise</link>.</para> + <para>Reuse your unit tests from the <link linkend="sd1SectLotteryRevisited">lottery exercise</link>.</para> </listitem> </orderedlist> </question> @@ -4272,10 +3658,7 @@ System.out.println(factorial(3));</programlisting> } }</programlisting> - <para>For the purpose of comparison we rename the - <quote>traditional</quote> loop based implementation as - <methodname>static public long binomialLoop(int n, int - k)</methodname> and add a performance test:</para> + <para>For the purpose of comparison we rename the <quote>traditional</quote> loop based implementation as <methodname>static public long binomialLoop(int n, int k)</methodname> and add a performance test:</para> <informaltable border="1"> <colgroup width="10%"/> @@ -4335,15 +3718,9 @@ Ratio Recursive / Loop: 65554</screen></td> </tr> </informaltable> - <para>From a performance point of view this result is quite - disillusioning: The loop based implementation is on average - ~65000 times faster compared to the recursive approach.</para> + <para>From a performance point of view this result is quite disillusioning: The loop based implementation is on average ~65000 times faster compared to the recursive approach.</para> - <para>This is a typical result: Albeit providing elegant - solutions recursion based implementations frequently fails - when it comes to performance. Hence using recursion is often - strongly discouraged. There are however situations - where:</para> + <para>This is a typical result: Albeit providing elegant solutions recursion based implementations frequently fails when it comes to performance. Hence using recursion is often strongly discouraged. There are however situations where:</para> <orderedlist> <listitem> @@ -4351,8 +3728,7 @@ Ratio Recursive / Loop: 65554</screen></td> </listitem> <listitem> - <para>Recursion is the (maybe only) way to implement a - desired logic.</para> + <para>Recursion is the (maybe only) way to implement a desired logic.</para> </listitem> </orderedlist> </answer> @@ -4554,19 +3930,9 @@ Ratio Recursive / Loop: 65554</screen></td> </m:math> </equation> - <para>Implement a class method <methodname>double - exp(double)</methodname> inside a class - <package>Math</package> choosing a package of your choice. The - name clash with the Java standard class <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html">java.lang.Math</link> - is intended: You'll learn how to resolve naming - conflicts.</para> + <para>Implement a class method <methodname>double exp(double)</methodname> inside a class <package>Math</package> choosing a package of your choice. The name clash with the Java standard class <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html">java.lang.Math</link> is intended: You'll learn how to resolve naming conflicts.</para> - <para>Regarding practical calculations we replace the above - infinite series by a limited one. So the number of terms to be - considered will become a parameter which shall be - configurable. Continue the implementation of the following - skeleton:</para> + <para>Regarding practical calculations we replace the above infinite series by a limited one. So the number of terms to be considered will become a parameter which shall be configurable. Continue the implementation of the following skeleton:</para> <figure xml:id="sd1FigExpSketch"> <title>An implementation sketch for the exponential</title> @@ -4595,11 +3961,7 @@ Ratio Recursive / Loop: 65554</screen></td> }</programlisting> </figure> - <para>Compare your results using <code>seriesLimit=8</code> - terms and the corresponding values from the professional - implementation <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#exp-double">java.lang.Math.exp</link> - by calculating <inlineequation> + <para>Compare your results using <code>seriesLimit=8</code> terms and the corresponding values from the professional implementation <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#exp-double">java.lang.Math.exp</link> by calculating <inlineequation> <m:math display="inline"> <m:msup> <m:mi>e</m:mi> @@ -4623,30 +3985,19 @@ Ratio Recursive / Loop: 65554</screen></td> <m:mi>3</m:mi> </m:msup> </m:math> - </inlineequation>. What do you observe? Can you explain this - result?</para> + </inlineequation>. What do you observe? Can you explain this result?</para> - <para>Do not forget to provide suitable - <command>Javadoc</command> comments and check the generated - <xref linkend="glo_HTML"/> documentation for - correctness.</para> + <para>Do not forget to provide suitable <command>Javadoc</command> comments and check the generated <xref linkend="glo_HTML"/> documentation for correctness.</para> <para>Hints:</para> <itemizedlist> <listitem> - <para>You should only use basic arithmetic operations like - +, - * and /. Do not use <link - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#pow-double-double-">Math.pow(double - a, double b)</link> and friends! Their implementations use - power series expansions as well and are designed for a - different purpose like having fractional exponent - values.</para> + <para>You should only use basic arithmetic operations like +, - * and /. Do not use <link xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#pow-double-double-">Math.pow(double a, double b)</link> and friends! Their implementations use power series expansions as well and are designed for a different purpose like having fractional exponent values.</para> </listitem> <listitem> - <para>The power series' elements may be obtained in a - recursive fashion like e.g.:</para> + <para>The power series' elements may be obtained in a recursive fashion like e.g.:</para> <informalequation> <m:math display="block"> @@ -4702,10 +4053,7 @@ Ratio Recursive / Loop: 65554</screen></td> <para role="eclipse">Sd1/math/V1</para> </annotation> - <para>Regarding the finite number of terms we provide a class - variable <coref linkend="sd1ListingSeriesLimit"/> having - default value of 5 corresponding to just the first 1 + 5 = 6 - terms:</para> + <para>Regarding the finite number of terms we provide a class variable <coref linkend="sd1ListingSeriesLimit"/> having default value of 5 corresponding to just the first 1 + 5 = 6 terms:</para> <informalequation> <m:math display="block"> @@ -4761,27 +4109,22 @@ Ratio Recursive / Loop: 65554</screen></td> </m:math> </informalequation> - <para>We also provide a corresponding setter method <coref - linkend="sd1ListingSeriesLimitSetter"/> enabling users of our - class to choose a different value:</para> + <para>We also provide a corresponding setter method <coref linkend="sd1ListingSeriesLimitSetter"/> enabling users of our class to choose a different value:</para> <programlisting language="java">public class Math { - static int <emphasis role="bold">seriesLimit = 5</emphasis>; <co - xml:id="sd1ListingSeriesLimit"/> + static int <emphasis role="bold">seriesLimit = 5</emphasis>; <co xml:id="sd1ListingSeriesLimit"/> /** * * @param seriesLimit The last term's index of a power series to be included, * {@link }}. */ - public static void setSeriesLimit(int seriesLimit) { <co - xml:id="sd1ListingSeriesLimitSetter"/> + public static void setSeriesLimit(int seriesLimit) { <co xml:id="sd1ListingSeriesLimitSetter"/> Math.seriesLimit = seriesLimit; } ...</programlisting> - <para>Calculating values by a finite series requires a - loop:</para> + <para>Calculating values by a finite series requires a loop:</para> <programlisting language="java"> public static double exp(double x) { double currentTerm = 1., // the first (i == 0) term x^0/0! @@ -4794,11 +4137,7 @@ Ratio Recursive / Loop: 65554</screen></td> return sum; }</programlisting> - <para>You may also view the <productname>Javadoc</productname> - and the implementation of <link - xlink:href="Ref/api/P/math/V1/de/hdm_stuttgart/de/sd1/math/Math.html#exp-double-">double - Math.exp(double)</link>. We may use the subsequent code - snippet for testing and comparing our implementation:</para> + <para>You may also view the <productname>Javadoc</productname> and the implementation of <link xlink:href="Ref/api/P/math/V1/de/hdm_stuttgart/de/sd1/math/Math.html#exp-double-">double Math.exp(double)</link>. We may use the subsequent code snippet for testing and comparing our implementation:</para> <programlisting language="java"> Math.setSeriesLimit(6); @@ -4814,19 +4153,15 @@ Ratio Recursive / Loop: 65554</screen></td> System.out.println("e^3=" + byPowerSeries + ", difference=" + (byPowerSeries - java.lang.Math.exp(3.)));</programlisting> - <para>In comparison with a professional implementation we have - the following results:</para> + <para>In comparison with a professional implementation we have the following results:</para> <screen>e^1=2.7180555555555554, difference=-2.262729034896438E-4 e^2=7.355555555555555, difference=-0.033500543375095226 e^3=19.412499999999998, difference=-0.67303692318767</screen> - <para>Our implementation based on just 6 terms is quite good - for small values of x. Larger values however exhibit growing - differences.</para> + <para>Our implementation based on just 6 terms is quite good for small values of x. Larger values however exhibit growing differences.</para> - <para>This is due to the fact that our approximation is in - fact just a polynomial of degree 6.</para> + <para>This is due to the fact that our approximation is in fact just a polynomial of degree 6.</para> </answer> </qandaentry> </qandadiv> @@ -4874,8 +4209,7 @@ e^3=19.412499999999998, difference=-0.67303692318767</screen> </m:mrow> </m:mrow> </m:math> - </inlineequation> in a similar fashion to <xref - linkend="sd1EqnDefExp"/>:</para> + </inlineequation> in a similar fashion to <xref linkend="sd1EqnDefExp"/>:</para> <equation xml:id="sd1EqnDefSin"> <title>Power series definition of <inlineequation> @@ -5065,13 +4399,9 @@ e^3=19.412499999999998, difference=-0.67303692318767</screen> </m:math> </equation> - <para>Extend <xref linkend="sd1FigExpSketch"/> by adding a - second method <methodname>double sin(double)</methodname>. Do - not forget to add suitable <command>Javadoc</command> comments - and watch the generated documentation.</para> + <para>Extend <xref linkend="sd1FigExpSketch"/> by adding a second method <methodname>double sin(double)</methodname>. Do not forget to add suitable <command>Javadoc</command> comments and watch the generated documentation.</para> - <para>Test your implementation by calculating the known values - <inlineequation> + <para>Test your implementation by calculating the known values <inlineequation> <m:math display="inline"> <m:mrow> <m:mi>sin</m:mi> @@ -5127,9 +4457,7 @@ e^3=19.412499999999998, difference=-0.67303692318767</screen> </m:mrow> </m:mrow> </m:math> - </inlineequation> using <varname - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#PI">java.lang.Math.PI</varname>. - Explain your results</para> + </inlineequation> using <varname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#PI">java.lang.Math.PI</varname>. Explain your results</para> </question> <answer> @@ -5137,8 +4465,7 @@ e^3=19.412499999999998, difference=-0.67303692318767</screen> <para role="eclipse">Sd1/math/V2</para> </annotation> - <para>Taking seven terms into account we have the following - results:</para> + <para>Taking seven terms into account we have the following results:</para> <screen>sin(pi/2)=0.9999999999939768, difference=-6.023181953196399E-12 sin(pi)=-7.727858895155385E-7, difference=-7.727858895155385E-7 @@ -5152,17 +4479,9 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 <m:mi>x</m:mi> </m:msup> </m:math> - </inlineequation> larger (positive or negative) argument - values show growing differences. On the other hand the - approximation is remarkably precise for smaller arguments. The - reason again is the fact that our power series is just a - polynomial approximation.</para> - - <para>You may also view the <link - xlink:href="Ref/api/P/math/V2/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">Javadoc</link> - and the implementation of <link - xlink:href="Ref/api/P/math/V2/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double - Math.sin(double)</link>.</para> + </inlineequation> larger (positive or negative) argument values show growing differences. On the other hand the approximation is remarkably precise for smaller arguments. The reason again is the fact that our power series is just a polynomial approximation.</para> + + <para>You may also view the <link xlink:href="Ref/api/P/math/V2/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">Javadoc</link> and the implementation of <link xlink:href="Ref/api/P/math/V2/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double Math.sin(double)</link>.</para> </answer> </qandaentry> </qandadiv> @@ -5178,8 +4497,7 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 <qandadiv> <qandaentry> <question> - <para>We may reorder summing up within our power series - defining<inlineequation> + <para>We may reorder summing up within our power series defining<inlineequation> <m:math display="inline"> <m:mrow> <m:mi>sin</m:mi> @@ -5198,8 +4516,7 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 </inlineequation>:</para> <equation xml:id="sde1MathReorderSumming"> - <title>Reordering of terms with respect to an - implementation.</title> + <title>Reordering of terms with respect to an implementation.</title> <m:math display="block"> <m:mrow> @@ -5306,26 +4623,19 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 </m:math> </equation> - <para>From a mathematical point of view there is no difference - to <xref linkend="sd1EqnDefSin"/>. Nevertheless:</para> + <para>From a mathematical point of view there is no difference to <xref linkend="sd1EqnDefSin"/>. Nevertheless:</para> <itemizedlist> <listitem> - <para>Rename your current sine implementation to - <methodname>double sinOld(double)</methodname>.</para> + <para>Rename your current sine implementation to <methodname>double sinOld(double)</methodname>.</para> </listitem> <listitem> - <para>Implement a new method <methodname>double - sin(double)</methodname> using the above summing - reordering.</para> + <para>Implement a new method <methodname>double sin(double)</methodname> using the above summing reordering.</para> </listitem> </itemizedlist> - <para>Compare the results of <methodname>double - sinOld(double)</methodname> and <methodname>double - sin(double)</methodname> for seven terms. What do you observe? - Do you have an explanation?</para> + <para>Compare the results of <methodname>double sinOld(double)</methodname> and <methodname>double sin(double)</methodname> for seven terms. What do you observe? Do you have an explanation?</para> </question> <answer> @@ -5333,9 +4643,7 @@ sin(4 * PI)=-9143.306026012957, <emphasis role="bold">difference=-9143.306026012 <para role="eclipse">Sd1/math/V3</para> </annotation> - <para>The following results result from <link - xlink:href="Ref/api/P/math/V3/de/hdm_stuttgart/de/sd1/math/Driver.html">this - test</link>:</para> + <para>The following results result from <link xlink:href="Ref/api/P/math/V3/de/hdm_stuttgart/de/sd1/math/Driver.html">this test</link>:</para> <screen>Old Implementation:+++++++++++++++++++++++++++++++++++++++ @@ -5349,13 +4657,9 @@ sin(pi/2)=1.0000000000000435, difference=4.3520742565306136E-14 sin(pi)=2.2419510618081458E-8, difference=2.2419510618081458E-8 sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> - <para>Comparing corresponding values our reordered - implementation is more than 100 times more precise. For larger - values we still have a factor of two.</para> + <para>Comparing corresponding values our reordered implementation is more than 100 times more precise. For larger values we still have a factor of two.</para> - <para>This is due to limited arithmetic precision: Each double - value can only be approximated by an in memory representation - of eight bytes. Consider the following example:</para> + <para>This is due to limited arithmetic precision: Each double value can only be approximated by an in memory representation of eight bytes. Consider the following example:</para> <programlisting language="java"> double one = 1., a = 0.000000000000200, @@ -5369,9 +4673,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> <screen>(1 + (a - b)) - 1:-9.992007221626409E-16 ((1 + a) - b) - 1:-8.881784197001252E-16</screen> - <para>Errors like this sum up in a power series giving rise to - reasonable deviations especially if higher powers are - involved.</para> + <para>Errors like this sum up in a power series giving rise to reasonable deviations especially if higher powers are involved.</para> </answer> </qandaentry> </qandadiv> @@ -5387,8 +4689,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> <qandadiv> <qandaentry> <question> - <para>We've reached an implementation offering good results - for <inlineequation> + <para>We've reached an implementation offering good results for <inlineequation> <m:math display="inline"> <m:mrow> <m:mi>sin</m:mi> @@ -5438,8 +4739,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </m:mrow> </m:mrow> </m:math> - </inlineequation>. The following rules may be used to retain - precision for arbitrary argument values:</para> + </inlineequation>. The following rules may be used to retain precision for arbitrary argument values:</para> <orderedlist> <listitem> @@ -5523,8 +4823,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </m:math> </informalequation> - <para>This rule of periodicity allows us to consider only - the interval <inlineequation> + <para>This rule of periodicity allows us to consider only the interval <inlineequation> <m:math display="inline"> <m:mrow> <m:mo>[</m:mo> @@ -5670,8 +4969,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </m:math> </informalequation> - <para>This rule allows us to narrow down values from - <inlineequation> + <para>This rule allows us to narrow down values from <inlineequation> <m:math display="inline"> <m:mrow> <m:mo>[</m:mo> @@ -5837,8 +5135,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </m:math> </informalequation> - <para>This rule allows us to further narrow down values - from <inlineequation> + <para>This rule allows us to further narrow down values from <inlineequation> <m:math display="inline"> <m:mrow> <m:mo>[</m:mo> @@ -5952,8 +5249,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </m:mrow> </m:mrow> </m:math> - </inlineequation>. We must however implement the - corresponding power series of <inlineequation> + </inlineequation>. We must however implement the corresponding power series of <inlineequation> <m:math display="inline"> <m:mrow> <m:mi>cos</m:mi> @@ -6139,8 +5435,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </listitem> </orderedlist> - <para>The above rules allow for computation of arbitrary - <inlineequation> + <para>The above rules allow for computation of arbitrary <inlineequation> <m:math display="inline"> <m:mrow> <m:mi>sin</m:mi> @@ -6156,8 +5451,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </m:mrow> </m:mrow> </m:math> - </inlineequation> values by means of power series expansion - limited to the interval <inlineequation> + </inlineequation> values by means of power series expansion limited to the interval <inlineequation> <m:math display="inline"> <m:mrow> <m:mo>[</m:mo> @@ -6185,14 +5479,9 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> <m:mo>]</m:mo> </m:mrow> </m:math> - </inlineequation> thereby gaining high precision results. - Extend your current implementation by mapping arbitrary - arguments to this interval appropriately.</para> - - <para>Hint: The standard function <methodname - xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#floor-double-">Math.rint(double)</methodname> - could be helpful: It may turn e.g. 4.47 (<code>double</code>) - to 4 (<code>long</code>).</para> + </inlineequation> thereby gaining high precision results. Extend your current implementation by mapping arbitrary arguments to this interval appropriately.</para> + + <para>Hint: The standard function <methodname xlink:href="https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#floor-double-">Math.rint(double)</methodname> could be helpful: It may turn e.g. 4.47 (<code>double</code>) to 4 (<code>long</code>).</para> </question> <answer> @@ -6200,8 +5489,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> <para role="eclipse">Sd1/math/V4</para> </annotation> - <para>For convenience reasons we start defining PI within our - class:</para> + <para>For convenience reasons we start defining PI within our class:</para> <programlisting language="java">public class Math { @@ -6229,12 +5517,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> // Step 3: Continue with business as usual ...</programlisting> - <para>This yet sows only the result from applying the first - two rules. You may also view the - <productname>Javadoc</productname> and the implementation of - <link - xlink:href="Ref/api/P/math/V4/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double - Math.sin(double)</link>.</para> + <para>This yet sows only the result from applying the first two rules. You may also view the <productname>Javadoc</productname> and the implementation of <link xlink:href="Ref/api/P/math/V4/de/hdm_stuttgart/de/sd1/math/Math.html#sin-double-">double Math.sin(double)</link>.</para> </answer> </qandaentry> </qandadiv> @@ -6245,11 +5528,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> <section xml:id="sw1ChapterObjectsClassesCannon"> <title>Simulating a car jump</title> - <para>We want to model a <link - xlink:href="https://www.sciencechannel.com/tv-shows/outrageous-acts-of-science/videos/insane-car-jump">car - jump</link> to be used in a computer game. <link - xlink:href="https://www.sciencechannel.com/tv-shows/outrageous-acts-of-science/videos/insane-car-jump">Watch - the video</link> to understand the subsequent explanations</para> + <para>We want to model a <link xlink:href="https://www.sciencechannel.com/tv-shows/outrageous-acts-of-science/videos/insane-car-jump">car jump</link> to be used in a computer game. <link xlink:href="https://www.sciencechannel.com/tv-shows/outrageous-acts-of-science/videos/insane-car-jump">Watch the video</link> to understand the subsequent explanations</para> <section xml:id="sd1SectCarJumpBasic"> <title>A basic model, rolling downwards</title> @@ -6258,30 +5537,24 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> <qandadiv> <qandaentry> <question> - <para>Our Java model will be implemented in a class - <classname>CarJump</classname>. We start by two simple - assumptions:</para> + <para>Our Java model will be implemented in a class <classname>CarJump</classname>. We start by two simple assumptions:</para> <itemizedlist> <listitem> - <para>Initially our car will gain speed just just rolling - down the slope.</para> + <para>Initially our car will gain speed just just rolling down the slope.</para> </listitem> <listitem> - <para>The car's motor will remain idle and in particular - will not provide any additional thrust.</para> + <para>The car's motor will remain idle and in particular will not provide any additional thrust.</para> </listitem> <listitem> - <para>Friction and (airborne) drag shall be - neglected.</para> + <para>Friction and (airborne) drag shall be neglected.</para> </listitem> </itemizedlist> <figure xml:id="sd1FigCarJump"> - <title>An accelerating car jumping between two - slopes.</title> + <title>An accelerating car jumping between two slopes.</title> <mediaobject> <imageobject> @@ -6290,13 +5563,7 @@ sin(4 * PI)=4518.2187229323445, difference=4518.2187229323445</screen> </mediaobject> </figure> - <para>Watch <link - xlink:href="/Sd1/Ref/Fig/carSlope.pdf">carJump.pdf</link> for - parameter details of the above image. In this exercise we - start by just considering the car's velocity when getting - airborne. To get an implementation sketch you may want to - import the subsequently described Maven skeleton and continue - its implementation.</para> + <para>Watch <link xlink:href="/Sd1/Ref/Fig/carSlope.pdf">carJump.pdf</link> for parameter details of the above image. In this exercise we start by just considering the car's velocity when getting airborne. To get an implementation sketch you may want to import the subsequently described Maven skeleton and continue its implementation.</para> <annotation role="make"> <para role="eclipse">Sd1/CarJump/V1</para> @@ -6329,8 +5596,7 @@ public class ModelTest { <tip> <orderedlist> <listitem> - <para>This exercise requires some physics knowledge. - Since our car starts from height <inlineequation> + <para>This exercise requires some physics knowledge. Since our car starts from height <inlineequation> <m:math display="inline"> <m:msub> <m:mi>h</m:mi> @@ -6346,18 +5612,11 @@ public class ModelTest { <m:mn>2</m:mn> </m:msub> </m:math> - </inlineequation> we can easily calculate the amount - of (potential) energy. According to the well known - formula relating a bodies velocity and kinetic energy - this allows for calculating the car's velocity when - getting airborne.</para> + </inlineequation> we can easily calculate the amount of (potential) energy. According to the well known formula relating a bodies velocity and kinetic energy this allows for calculating the car's velocity when getting airborne.</para> </listitem> <listitem> - <para>The project skeleton does not yet provide instance - variables describing the model's internal state. - Furthermore the desired velocity is depending on these - model parameters.</para> + <para>The project skeleton does not yet provide instance variables describing the model's internal state. Furthermore the desired velocity is depending on these model parameters.</para> </listitem> </orderedlist> </tip> @@ -6368,8 +5627,7 @@ public class ModelTest { <m:math display="inline"> <m:mi>g</m:mi> </m:math> - </inlineequation> being the gravity acceleration constant of - <inlineequation> + </inlineequation> being the gravity acceleration constant of <inlineequation> <m:math display="inline"> <m:mrow> <m:mi>9.81</m:mi> @@ -6391,8 +5649,7 @@ public class ModelTest { <glosslist> <glossentry> - <glossterm>The car's (difference in) potential Energy when - rolling from <inlineequation> + <glossterm>The car's (difference in) potential Energy when rolling from <inlineequation> <m:math display="inline"> <m:msub> <m:mi>h</m:mi> @@ -6460,13 +5717,11 @@ public class ModelTest { </glossentry> <glossentry> - <glossterm>The car's kinetic Energy due to its speed - <inlineequation> + <glossterm>The car's kinetic Energy due to its speed <inlineequation> <m:math display="inline"> <m:mi>v</m:mi> </m:math> - </inlineequation> when leaving the ascending - slope:</glossterm> + </inlineequation> when leaving the ascending slope:</glossterm> <glossdef> <informalequation> @@ -6506,8 +5761,7 @@ public class ModelTest { </glossentry> <glossentry> - <glossterm>The car's potential and kinetic energy amounts - are equal:</glossterm> + <glossterm>The car's potential and kinetic energy amounts are equal:</glossterm> <glossdef> <informalequation> @@ -6597,8 +5851,7 @@ public class ModelTest { <qandadiv> <qandaentry> <question> - <para>Our game developer asks for the following (derived) - parameters:</para> + <para>Our game developer asks for the following (derived) parameters:</para> <itemizedlist> <listitem> @@ -6606,26 +5859,20 @@ public class ModelTest { <m:math display="inline"> <m:mi>d</m:mi> </m:math> - </inlineequation> (see previous exercise pdf - figure).</para> + </inlineequation> (see previous exercise pdf figure).</para> </listitem> <listitem> - <para>The car's maximum height above ground during its - flight.</para> + <para>The car's maximum height above ground during its flight.</para> </listitem> </itemizedlist> <tip> - <para>The car will travel the ascending slope at an angle of - <inlineequation> + <para>The car will travel the ascending slope at an angle of <inlineequation> <m:math display="inline"> <m:mi>α</m:mi> </m:math> - </inlineequation> given in ordinary degrees ranging from 0 - to 90. You can decompose the car's velocity into its - horizontal and vertical components (See pdf for - details):</para> + </inlineequation> given in ordinary degrees ranging from 0 to 90. You can decompose the car's velocity into its horizontal and vertical components (See pdf for details):</para> <mediaobject> <imageobject> @@ -6633,18 +5880,12 @@ public class ModelTest { </imageobject> </mediaobject> - <para>The car's horizontal velocity component will remain - constant during flight time. The vertical component will - give rise to an <quote>inverse</quote> free fall until - reaching maximum height. Afterwards the car will enter a - free fall until (hopefully!) landing on the second - slope.</para> + <para>The car's horizontal velocity component will remain constant during flight time. The vertical component will give rise to an <quote>inverse</quote> free fall until reaching maximum height. Afterwards the car will enter a free fall until (hopefully!) landing on the second slope.</para> </tip> </question> <answer> - <para>Decomposing the car's velocity into its horizontal and - vertical components requires trigonometric functions:</para> + <para>Decomposing the car's velocity into its horizontal and vertical components requires trigonometric functions:</para> <informalequation> <m:math display="inline"> @@ -6708,8 +5949,7 @@ public class ModelTest { </m:math> </informalequation> - <para>A bodies' velocity in free fall relates to time - by:</para> + <para>A bodies' velocity in free fall relates to time by:</para> <informalequation> <m:math display="block"> @@ -6729,8 +5969,7 @@ public class ModelTest { </m:math> </informalequation> - <para>During a given time a free falling bodies' traveling - distance will be:</para> + <para>During a given time a free falling bodies' traveling distance will be:</para> <informalequation> <m:math display="block"> diff --git a/Doc/Sd1/statements.xml b/Doc/Sd1/statements.xml index 48ad1f16d56886d1228084441e1c2fe9155a823b..99685bfc59defec59fa3c87863a277c8e1ac4c28 100644 --- a/Doc/Sd1/statements.xml +++ b/Doc/Sd1/statements.xml @@ -158,15 +158,49 @@ <figure xml:id="sd1_fig_if"> <title><code>if</code> ... <code>else</code> for block selection</title> - <programlisting language="java">double initialAmount = 320000; + <informaltable border="1"> + <tr> + <td valign="top"><programlisting language="java">double initialAmount = 320000.00; if (100000 <= initialAmount) { // Rich customer, 1,2% interest rate - System.out.println("Interest:" + 1.2 * initialAmount / 100); + System.out.println( + "Interest:" + 1.2 * initialAmount / 100); +} </programlisting><screen>Interest:3840.0</screen></td> + + <td valign="top"><mediaobject> + <imageobject> + <imagedata fileref="Ref/Statements/if.svg"/> + </imageobject> + </mediaobject></td> + </tr> + </informaltable> + </figure> + + <figure xml:id="sd1_fig_ifElse"> + <title><code>if</code> ... <code>else</code> for block selection</title> + + <informaltable border="1"> + <tr> + <td valign="top"><programlisting language="java">double initialAmount = 420.00; + +if (100000 <= initialAmount) { + // Rich customer, 1,2% interest rate + System.out.println( + "Interest:" + 1.2 * initialAmount / 100); } else { // Joe customer, 0.8% standard interest rate - System.out.println("Interest:" + 0.8 * initialAmount / 100); -}</programlisting> + System.out.println( + "Interest:" + 0.8 * initialAmount / 100); +}</programlisting><screen>Interest:3.36</screen></td> + + <td valign="top"><mediaobject> + <imageobject> + <imagedata fileref="Ref/Statements/ifElse.svg"/> + </imageobject> + </mediaobject></td> + </tr> + </informaltable> <informaltable border="1"> <tr> @@ -1298,7 +1332,7 @@ Midweek</screen> </section> <section xml:id="sd1_sect_loops"> - <title><code>while</code>, <code>do ... while</code> and <code>for</code> loops</title> + <title>Loops</title> <figure xml:id="sd1_fig_loopWhy"> <title>Why loops?</title> @@ -1342,7 +1376,8 @@ System.out.println("Do not copy!");</programlisting> <programlisting language="java">int repetitions; -repetitions = 3; // value dynamically set +repetitions = 3; // Simulated dynamic value + // Runtime, not compile-time switch(repetitions) { case 5: System.out.println("Do not copy!"); @@ -1355,58 +1390,102 @@ switch(repetitions) { <para>Problem: Clumsy and limited (five lines of output max.)</para> </figure> - <figure xml:id="sd1_fig_loopParamSolution"> - <title>A <code>while</code> loop</title> + <section xml:id="sd1_sect_while"> + <title><code>while</code></title> - <programlisting language="java">int repetitions = 3; <co linkends="sd1_callout_whileLoop-1" xml:id="sd1_callout_whileLoop-1-co"/> + <figure xml:id="sd1_fig_loopParamSolution"> + <title>A <code>while</code> loop</title> + + <informaltable border="1"> + <tr> + <td valign="top"><programlisting language="java">int repetitions = 3; <co linkends="sd1_callout_whileLoop-1" xml:id="sd1_callout_whileLoop-1-co"/> int loopCounter = 1; <co linkends="sd1_callout_whileLoop-2" xml:id="sd1_callout_whileLoop-2-co"/> while (loopCounter <= repetitions <co linkends="sd1_callout_whileLoop-3" xml:id="sd1_callout_whileLoop-3-co"/>) { - System.out.println("Do not copy!"); <co linkends="sd1_callout_whileLoop-4" xml:id="sd1_callout_whileLoop-4-co"/> + System.out.println("Do not copy!"); <co linkends="sd1_callout_whileLoop-4" xml:id="sd1_callout_whileLoop-4-co"/> loopCounter++; <co linkends="sd1_callout_whileLoop-5" xml:id="sd1_callout_whileLoop-5-co"/> +}</programlisting><screen>Do not copy! +Do not copy! +Do not copy!</screen></td> + + <td valign="top"><mediaobject> + <imageobject> + <imagedata fileref="Ref/Statements/while.svg"/> + </imageobject> + </mediaobject></td> + </tr> + </informaltable> + </figure> + + <calloutlist> + <callout arearefs="sd1_callout_whileLoop-1-co" xml:id="sd1_callout_whileLoop-1"> + <para>Will be repeated this number of times</para> + </callout> + + <callout arearefs="sd1_callout_whileLoop-2-co" xml:id="sd1_callout_whileLoop-2"> + <para>Helper variable keeping track of repetitions</para> + </callout> + + <callout arearefs="sd1_callout_whileLoop-3-co" xml:id="sd1_callout_whileLoop-3"> + <para>Condition to be checked before each new execution.</para> + </callout> + + <callout arearefs="sd1_callout_whileLoop-4-co" xml:id="sd1_callout_whileLoop-4"> + <para>Statement(s) to be repeated.</para> + </callout> + + <callout arearefs="sd1_callout_whileLoop-5-co" xml:id="sd1_callout_whileLoop-5"> + <para>Increment helper variable each iteration.</para> + </callout> + </calloutlist> + + <figure xml:id="sd1_fig_loopParamSolutionSyntaxSugar"> + <title>Combining increment and termination condition</title> + + <programlisting language="java">int repetitions = 3; +int loopCounter = 1; + +while (loopCounter++ <= repetitions) { + System.out.println("Do not copy!"); }</programlisting> - <screen>Do not copy! + <screen>Do not copy! Do not copy! Do not copy!</screen> - </figure> - - <calloutlist> - <callout arearefs="sd1_callout_whileLoop-1-co" xml:id="sd1_callout_whileLoop-1"> - <para>Will be repeated this number of times</para> - </callout> - - <callout arearefs="sd1_callout_whileLoop-2-co" xml:id="sd1_callout_whileLoop-2"> - <para>Helper variable keeping track of repetitions</para> - </callout> + </figure> + </section> - <callout arearefs="sd1_callout_whileLoop-3-co" xml:id="sd1_callout_whileLoop-3"> - <para>Condition to be checked before each new execution.</para> - </callout> + <section xml:id="sd1_sect_doWhile"> + <title><code>do ... while</code></title> - <callout arearefs="sd1_callout_whileLoop-4-co" xml:id="sd1_callout_whileLoop-4"> - <para>Statement(s) to be repeated.</para> - </callout> + <para><figure xml:id="sd1_fig_doWhile"> + <title>A <code>do ... while</code> loop</title> - <callout arearefs="sd1_callout_whileLoop-5-co" xml:id="sd1_callout_whileLoop-5"> - <para>Increment helper variable each iteration.</para> - </callout> - </calloutlist> + <informaltable border="1"> + <tr> + <td valign="top"><programlisting language="java">int loopCounter = 3; - <figure xml:id="sd1_fig_loopParamSolutionSyntaxSugar"> - <title>Combining increment and termination condition</title> +do { + System.out.println("loopCounter == " + loopCounter); +} while (0 < --loopCounter);</programlisting><screen>Do not copy! +Do not copy! +Do not copy!</screen></td> - <programlisting language="java">int repetitions = 3; -int loopCounter = 1; + <td valign="top"><mediaobject> + <imageobject> + <imagedata fileref="Ref/Statements/doWhile.svg"/> + </imageobject> + </mediaobject></td> + </tr> + </informaltable> + </figure></para> + </section> -while (loopCounter++ <= repetitions) { - System.out.println("Do not copy!"); -}</programlisting> + <section xml:id="sd1_sect_for"> + <title>for</title> - <screen>Do not copy! -Do not copy! -Do not copy!</screen> - </figure> + <para/> + </section> </section> <section xml:id="ex">