diff --git a/.vscode/launch.json b/.vscode/launch.json index 2771848..f8042e5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,8 +7,8 @@ { "type": "xmake", "request": "launch", - "name": "Debug XMake target", - "target": "Pivot", + "name": "Debug random kernel", + "target": "test_random_kernel", "cwd": "${workspaceFolder}/matricies", } ] diff --git a/.vscode/settings.json b/.vscode/settings.json index d926cc3..370ad84 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -44,6 +44,23 @@ "stdexcept": "cpp", "streambuf": "cpp", "cinttypes": "cpp", - "typeinfo": "cpp" + "typeinfo": "cpp", + "codecvt": "cpp", + "condition_variable": "cpp", + "cstring": "cpp", + "ctime": "cpp", + "ratio": "cpp", + "fstream": "cpp", + "future": "cpp", + "iomanip": "cpp", + "mutex": "cpp", + "semaphore": "cpp", + "sstream": "cpp", + "stop_token": "cpp", + "thread": "cpp", + "chrono": "cpp", + "optional": "cpp", + "ranges": "cpp", + "span": "cpp" } } \ No newline at end of file diff --git a/imgui.ini b/imgui.ini new file mode 100644 index 0000000..a20f5e9 --- /dev/null +++ b/imgui.ini @@ -0,0 +1,16 @@ +[Window][Debug##Default] +Pos=60,60 +Size=400,400 + +[Window][Right Top Window] +Pos=640,0 +Size=640,576 + +[Window][Bottom Part] +Pos=0,576 +Size=1280,144 + +[Window][Left Top Window] +Pos=0,0 +Size=640,576 + diff --git a/include/Matrix.h b/include/Matrix.h index c0b6df5..9a8a2da 100644 --- a/include/Matrix.h +++ b/include/Matrix.h @@ -18,7 +18,7 @@ */ class Matrix { public: - typedef NR Element; + typedef long double Element; typedef std::vector::iterator iterator; private: diff --git a/matricies/core b/matricies/core new file mode 100644 index 0000000..176111b Binary files /dev/null and b/matricies/core differ diff --git a/matricies/plot.eps b/matricies/plot.eps new file mode 100644 index 0000000..c6641f6 --- /dev/null +++ b/matricies/plot.eps @@ -0,0 +1,2067 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Title: plot.tex +%%Creator: gnuplot 5.4 patchlevel 4 +%%CreationDate: Tue May 14 16:32:19 2024 +%%DocumentFonts: +%%BoundingBox: 50 50 410 302 +%%EndComments +%%BeginProlog +/gnudict 256 dict def +gnudict begin +% +% The following true/false flags may be edited by hand if desired. +% The unit line width and grayscale image gamma correction may also be changed. +% +/Color true def +/Blacktext true def +/Solid false def +/Dashlength 1 def +/Landscape false def +/Level1 false def +/Level3 false def +/Rounded false def +/ClipToBoundingBox false def +/SuppressPDFMark false def +/TransparentPatterns false def +/gnulinewidth 5.000 def +/userlinewidth gnulinewidth def +/Gamma 1.0 def +/BackgroundColor {-1.000 -1.000 -1.000} def +% +/vshift -73 def +/dl1 { + 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + Rounded { currentlinewidth 0.75 mul sub dup 0 le { pop 0.01 } if } if +} def +/dl2 { + 10.0 Dashlength userlinewidth gnulinewidth div mul mul mul + Rounded { currentlinewidth 0.75 mul add } if +} def +/hpt_ 31.5 def +/vpt_ 31.5 def +/hpt hpt_ def +/vpt vpt_ def +/doclip { + ClipToBoundingBox { + newpath 50 50 moveto 410 50 lineto 410 302 lineto 50 302 lineto closepath + clip + } if +} def +% +% Gnuplot Prolog Version 5.2 (Dec 2017) +% +%/SuppressPDFMark true def +% +/M {moveto} bind def +/L {lineto} bind def +/R {rmoveto} bind def +/V {rlineto} bind def +/N {newpath moveto} bind def +/Z {closepath} bind def +/C {setrgbcolor} bind def +/f {rlineto fill} bind def +/g {setgray} bind def +/Gshow {show} def % May be redefined later in the file to support UTF-8 +/vpt2 vpt 2 mul def +/hpt2 hpt 2 mul def +/Lshow {currentpoint stroke M 0 vshift R + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def +/Rshow {currentpoint stroke M dup stringwidth pop neg vshift R + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def +/Cshow {currentpoint stroke M dup stringwidth pop -2 div vshift R + Blacktext {gsave 0 setgray textshow grestore} {textshow} ifelse} def +/UP {dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def + /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def} def +/DL {Color {setrgbcolor Solid {pop []} if 0 setdash} + {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse} def +/BL {stroke userlinewidth 2 mul setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/AL {stroke userlinewidth 2 div setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +/UL {dup gnulinewidth mul /userlinewidth exch def + dup 1 lt {pop 1} if 10 mul /udl exch def} def +/PL {stroke userlinewidth setlinewidth + Rounded {1 setlinejoin 1 setlinecap} if} def +3.8 setmiterlimit +% Classic Line colors (version 5.0) +/LCw {1 1 1} def +/LCb {0 0 0} def +/LCa {0 0 0} def +/LC0 {1 0 0} def +/LC1 {0 1 0} def +/LC2 {0 0 1} def +/LC3 {1 0 1} def +/LC4 {0 1 1} def +/LC5 {1 1 0} def +/LC6 {0 0 0} def +/LC7 {1 0.3 0} def +/LC8 {0.5 0.5 0.5} def +% Default dash patterns (version 5.0) +/LTB {BL [] LCb DL} def +/LTw {PL [] 1 setgray} def +/LTb {PL [] LCb DL} def +/LTa {AL [1 udl mul 2 udl mul] 0 setdash LCa setrgbcolor} def +/LT0 {PL [] LC0 DL} def +/LT1 {PL [2 dl1 3 dl2] LC1 DL} def +/LT2 {PL [1 dl1 1.5 dl2] LC2 DL} def +/LT3 {PL [6 dl1 2 dl2 1 dl1 2 dl2] LC3 DL} def +/LT4 {PL [1 dl1 2 dl2 6 dl1 2 dl2 1 dl1 2 dl2] LC4 DL} def +/LT5 {PL [4 dl1 2 dl2] LC5 DL} def +/LT6 {PL [1.5 dl1 1.5 dl2 1.5 dl1 1.5 dl2 1.5 dl1 6 dl2] LC6 DL} def +/LT7 {PL [3 dl1 3 dl2 1 dl1 3 dl2] LC7 DL} def +/LT8 {PL [2 dl1 2 dl2 2 dl1 6 dl2] LC8 DL} def +/SL {[] 0 setdash} def +/Pnt {stroke [] 0 setdash gsave 1 setlinecap M 0 0 V stroke grestore} def +/Dia {stroke [] 0 setdash 2 copy vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke + Pnt} def +/Pls {stroke [] 0 setdash vpt sub M 0 vpt2 V + currentpoint stroke M + hpt neg vpt neg R hpt2 0 V stroke + } def +/Box {stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke + Pnt} def +/Crs {stroke [] 0 setdash exch hpt sub exch vpt add M + hpt2 vpt2 neg V currentpoint stroke M + hpt2 neg 0 R hpt2 vpt2 V stroke} def +/TriU {stroke [] 0 setdash 2 copy vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke + Pnt} def +/Star {2 copy Pls Crs} def +/BoxF {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath fill} def +/TriUF {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath fill} def +/TriD {stroke [] 0 setdash 2 copy vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke + Pnt} def +/TriDF {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath fill} def +/DiaF {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath fill} def +/Pent {stroke [] 0 setdash 2 copy gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore Pnt} def +/PentF {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath fill grestore} def +/Circle {stroke [] 0 setdash 2 copy + hpt 0 360 arc stroke Pnt} def +/CircleF {stroke [] 0 setdash hpt 0 360 arc fill} def +/C0 {BL [] 0 setdash 2 copy moveto vpt 90 450 arc} bind def +/C1 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + vpt 0 360 arc closepath} bind def +/C2 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C3 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C4 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C5 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc + 2 copy moveto + 2 copy vpt 180 270 arc closepath fill + vpt 0 360 arc} bind def +/C6 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C7 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 270 arc closepath fill + vpt 0 360 arc closepath} bind def +/C8 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C9 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 270 450 arc closepath fill + vpt 0 360 arc closepath} bind def +/C10 {BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill + 2 copy moveto + 2 copy vpt 90 180 arc closepath fill + vpt 0 360 arc closepath} bind def +/C11 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 180 arc closepath fill + 2 copy moveto + 2 copy vpt 270 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C12 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C13 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 0 90 arc closepath fill + 2 copy moveto + 2 copy vpt 180 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/C14 {BL [] 0 setdash 2 copy moveto + 2 copy vpt 90 360 arc closepath fill + vpt 0 360 arc} bind def +/C15 {BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill + vpt 0 360 arc closepath} bind def +/Rec {newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto + neg 0 rlineto closepath} bind def +/Square {dup Rec} bind def +/Bsquare {vpt sub exch vpt sub exch vpt2 Square} bind def +/S0 {BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare} bind def +/S1 {BL [] 0 setdash 2 copy vpt Square fill Bsquare} bind def +/S2 {BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S3 {BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare} bind def +/S4 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S5 {BL [] 0 setdash 2 copy 2 copy vpt Square fill + exch vpt sub exch vpt sub vpt Square fill Bsquare} bind def +/S6 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S7 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S8 {BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare} bind def +/S9 {BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare} bind def +/S10 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill + Bsquare} bind def +/S11 {BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill + Bsquare} bind def +/S12 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare} bind def +/S13 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy vpt Square fill Bsquare} bind def +/S14 {BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill + 2 copy exch vpt sub exch vpt Square fill Bsquare} bind def +/S15 {BL [] 0 setdash 2 copy Bsquare fill Bsquare} bind def +/D0 {gsave translate 45 rotate 0 0 S0 stroke grestore} bind def +/D1 {gsave translate 45 rotate 0 0 S1 stroke grestore} bind def +/D2 {gsave translate 45 rotate 0 0 S2 stroke grestore} bind def +/D3 {gsave translate 45 rotate 0 0 S3 stroke grestore} bind def +/D4 {gsave translate 45 rotate 0 0 S4 stroke grestore} bind def +/D5 {gsave translate 45 rotate 0 0 S5 stroke grestore} bind def +/D6 {gsave translate 45 rotate 0 0 S6 stroke grestore} bind def +/D7 {gsave translate 45 rotate 0 0 S7 stroke grestore} bind def +/D8 {gsave translate 45 rotate 0 0 S8 stroke grestore} bind def +/D9 {gsave translate 45 rotate 0 0 S9 stroke grestore} bind def +/D10 {gsave translate 45 rotate 0 0 S10 stroke grestore} bind def +/D11 {gsave translate 45 rotate 0 0 S11 stroke grestore} bind def +/D12 {gsave translate 45 rotate 0 0 S12 stroke grestore} bind def +/D13 {gsave translate 45 rotate 0 0 S13 stroke grestore} bind def +/D14 {gsave translate 45 rotate 0 0 S14 stroke grestore} bind def +/D15 {gsave translate 45 rotate 0 0 S15 stroke grestore} bind def +/DiaE {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V closepath stroke} def +/BoxE {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V closepath stroke} def +/TriUE {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V closepath stroke} def +/TriDE {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V closepath stroke} def +/PentE {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + closepath stroke grestore} def +/CircE {stroke [] 0 setdash + hpt 0 360 arc stroke} def +/Opaque {gsave closepath 1 setgray fill grestore 0 setgray closepath} def +/DiaW {stroke [] 0 setdash vpt add M + hpt neg vpt neg V hpt vpt neg V + hpt vpt V hpt neg vpt V Opaque stroke} def +/BoxW {stroke [] 0 setdash exch hpt sub exch vpt add M + 0 vpt2 neg V hpt2 0 V 0 vpt2 V + hpt2 neg 0 V Opaque stroke} def +/TriUW {stroke [] 0 setdash vpt 1.12 mul add M + hpt neg vpt -1.62 mul V + hpt 2 mul 0 V + hpt neg vpt 1.62 mul V Opaque stroke} def +/TriDW {stroke [] 0 setdash vpt 1.12 mul sub M + hpt neg vpt 1.62 mul V + hpt 2 mul 0 V + hpt neg vpt -1.62 mul V Opaque stroke} def +/PentW {stroke [] 0 setdash gsave + translate 0 hpt M 4 {72 rotate 0 hpt L} repeat + Opaque stroke grestore} def +/CircW {stroke [] 0 setdash + hpt 0 360 arc Opaque stroke} def +/BoxFill {gsave Rec 1 setgray fill grestore} def +/Density { + /Fillden exch def + currentrgbcolor + /ColB exch def /ColG exch def /ColR exch def + /ColR ColR Fillden mul Fillden sub 1 add def + /ColG ColG Fillden mul Fillden sub 1 add def + /ColB ColB Fillden mul Fillden sub 1 add def + ColR ColG ColB setrgbcolor} def +/BoxColFill {gsave Rec PolyFill} def +/PolyFill {gsave Density fill grestore grestore} def +/h {rlineto rlineto rlineto closepath gsave fill grestore stroke} bind def +% +% PostScript Level 1 Pattern Fill routine for rectangles +% Usage: x y w h s a XX PatternFill +% x,y = lower left corner of box to be filled +% w,h = width and height of box +% a = angle in degrees between lines and x-axis +% XX = 0/1 for no/yes cross-hatch +% +/PatternFill {gsave /PFa [ 9 2 roll ] def + PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate + PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse + clip + currentlinewidth 0.5 mul setlinewidth + /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def + 0 0 M PFa 5 get rotate PFs -2 div dup translate + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 M 0 PFs V} for + 0 PFa 6 get ne { + 0 1 PFs PFa 4 get div 1 add floor cvi + {PFa 4 get mul 0 2 1 roll M PFs 0 V} for + } if + stroke grestore} def +% +/languagelevel where + {pop languagelevel} {1} ifelse +dup 2 lt + {/InterpretLevel1 true def + /InterpretLevel3 false def} + {/InterpretLevel1 Level1 def + 2 gt + {/InterpretLevel3 Level3 def} + {/InterpretLevel3 false def} + ifelse } + ifelse +% +% PostScript level 2 pattern fill definitions +% +/Level2PatternFill { +/Tile8x8 {/PaintType 2 /PatternType 1 /TilingType 1 /BBox [0 0 8 8] /XStep 8 /YStep 8} + bind def +/KeepColor {currentrgbcolor [/Pattern /DeviceRGB] setcolorspace} bind def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke} +>> matrix makepattern +/Pat1 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 8 8 L 0 8 M 8 0 L stroke + 0 4 M 4 8 L 8 4 L 4 0 L 0 4 L stroke} +>> matrix makepattern +/Pat2 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 0 M 0 8 L + 8 8 L 8 0 L 0 0 L fill} +>> matrix makepattern +/Pat3 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 8 M 8 -4 L + 0 12 M 12 0 L stroke} +>> matrix makepattern +/Pat4 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -4 0 M 8 12 L + 0 -4 M 12 8 L stroke} +>> matrix makepattern +/Pat5 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 8 M 4 -4 L + 0 12 M 8 -4 L 4 12 M 10 0 L stroke} +>> matrix makepattern +/Pat6 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop -2 0 M 4 12 L + 0 -4 M 8 12 L 4 -4 M 10 8 L stroke} +>> matrix makepattern +/Pat7 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 8 -2 M -4 4 L + 12 0 M -4 8 L 12 4 M 0 10 L stroke} +>> matrix makepattern +/Pat8 exch def +<< Tile8x8 + /PaintProc {0.5 setlinewidth pop 0 -2 M 12 4 L + -4 0 M 12 8 L -4 4 M 8 10 L stroke} +>> matrix makepattern +/Pat9 exch def +/Pattern1 {PatternBgnd KeepColor Pat1 setpattern} bind def +/Pattern2 {PatternBgnd KeepColor Pat2 setpattern} bind def +/Pattern3 {PatternBgnd KeepColor Pat3 setpattern} bind def +/Pattern4 {PatternBgnd KeepColor Landscape {Pat5} {Pat4} ifelse setpattern} bind def +/Pattern5 {PatternBgnd KeepColor Landscape {Pat4} {Pat5} ifelse setpattern} bind def +/Pattern6 {PatternBgnd KeepColor Landscape {Pat9} {Pat6} ifelse setpattern} bind def +/Pattern7 {PatternBgnd KeepColor Landscape {Pat8} {Pat7} ifelse setpattern} bind def +} def +% +% +%End of PostScript Level 2 code +% +/PatternBgnd { + TransparentPatterns {} {gsave 1 setgray fill grestore} ifelse +} def +% +% Substitute for Level 2 pattern fill codes with +% grayscale if Level 2 support is not selected. +% +/Level1PatternFill { +/Pattern1 {0.250 Density} bind def +/Pattern2 {0.500 Density} bind def +/Pattern3 {0.750 Density} bind def +/Pattern4 {0.125 Density} bind def +/Pattern5 {0.375 Density} bind def +/Pattern6 {0.625 Density} bind def +/Pattern7 {0.875 Density} bind def +} def +% +% Now test for support of Level 2 code +% +Level1 {Level1PatternFill} {Level2PatternFill} ifelse +% +/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont +dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall +currentdict end definefont pop +% +Level1 SuppressPDFMark or +{} { +/SDict 10 dict def +systemdict /pdfmark known not { + userdict /pdfmark systemdict /cleartomark get put +} if +SDict begin [ + /Title (plot.tex) + /Subject (gnuplot plot) + /Creator (gnuplot 5.4 patchlevel 4) +% /Producer (gnuplot) +% /Keywords () + /CreationDate (Tue May 14 16:32:19 2024) + /DOCINFO pdfmark +end +} ifelse +% +% Support for boxed text - Ethan A Merritt Sep 2016 +% +/InitTextBox { userdict /TBy2 3 -1 roll put userdict /TBx2 3 -1 roll put + userdict /TBy1 3 -1 roll put userdict /TBx1 3 -1 roll put + /Boxing true def } def +/ExtendTextBox { dup type /stringtype eq + { Boxing { gsave dup false charpath pathbbox + dup TBy2 gt {userdict /TBy2 3 -1 roll put} {pop} ifelse + dup TBx2 gt {userdict /TBx2 3 -1 roll put} {pop} ifelse + dup TBy1 lt {userdict /TBy1 3 -1 roll put} {pop} ifelse + dup TBx1 lt {userdict /TBx1 3 -1 roll put} {pop} ifelse + grestore } if } + {} ifelse} def +/PopTextBox { newpath TBx1 TBxmargin sub TBy1 TBymargin sub M + TBx1 TBxmargin sub TBy2 TBymargin add L + TBx2 TBxmargin add TBy2 TBymargin add L + TBx2 TBxmargin add TBy1 TBymargin sub L closepath } def +/DrawTextBox { PL PopTextBox stroke /Boxing false def} def +/FillTextBox { gsave PopTextBox fill grestore /Boxing false def} def +0 0 0 0 InitTextBox +/TBxmargin 20 def +/TBymargin 20 def +/Boxing false def +/textshow { ExtendTextBox Gshow } def +% +end +%%EndProlog +%%Page: 1 1 +gnudict begin +gsave +doclip +50 50 translate +0.050 0.050 scale +0 setgray +newpath +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 554 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 1141 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 1727 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 2314 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 2901 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 3488 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 4074 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 4661 M +63 0 V +5517 0 R +-63 0 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +1865 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +2795 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +3725 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +4655 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +5585 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +6515 554 M +0 63 V +0 4044 R +0 -63 V +stroke +0.15 0.15 0.15 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +935 4661 N +935 554 L +5580 0 V +0 4107 V +-5580 0 V +Z stroke +1.000 UP +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +LCb setrgbcolor +LTb +0.500 UL +LTb +0.00 0.00 0.00 C +1067 3718 N +0 880 V +5475 0 V +0 -880 V +-5475 0 V +Z stroke +% Begin plot #1 +0.500 UL +LTb +LCb setrgbcolor +0.00 0.44 0.74 C +954 554 M +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 1 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 1 V +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 1 V +19 0 V +19 0 V +18 1 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 1 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 1 V +19 0 V +18 0 V +19 0 V +19 0 V +18 1 V +19 0 V +18 1 V +19 0 V +19 -1 V +18 1 V +19 1 V +18 0 V +19 0 V +19 0 V +18 1 V +19 0 V +18 1 V +19 -1 V +19 0 V +18 1 V +19 1 V +18 -1 V +19 2 V +19 -1 V +18 1 V +19 1 V +18 0 V +19 1 V +19 0 V +18 2 V +19 0 V +18 0 V +19 -1 V +19 1 V +18 2 V +19 -1 V +18 0 V +19 0 V +19 -1 V +18 1 V +19 2 V +18 6 V +19 -2 V +19 0 V +18 0 V +19 1 V +18 2 V +19 2 V +19 -5 V +18 -1 V +19 2 V +18 -1 V +19 1 V +19 -1 V +18 2 V +19 1 V +18 1 V +19 1 V +19 -1 V +18 2 V +19 -2 V +18 2 V +19 0 V +19 0 V +18 2 V +19 3 V +18 -2 V +19 5 V +19 -6 V +18 2 V +19 1 V +18 -1 V +19 0 V +19 1 V +18 1 V +19 1 V +18 1 V +19 0 V +19 1 V +18 -1 V +19 0 V +18 3 V +19 1 V +19 2 V +18 1 V +19 -1 V +18 0 V +19 4 V +19 -3 V +18 -2 V +19 2 V +18 6 V +19 -1 V +19 1 V +18 -2 V +19 5 V +18 -3 V +19 1 V +19 2 V +18 7 V +19 -7 V +18 1 V +19 3 V +19 4 V +18 -5 V +19 0 V +18 3 V +19 -3 V +19 6 V +18 -1 V +19 -3 V +18 5 V +19 0 V +19 2 V +18 -2 V +19 0 V +18 0 V +19 2 V +19 7 V +18 -6 V +19 -2 V +18 5 V +19 -1 V +19 0 V +18 2 V +19 2 V +18 0 V +19 2 V +19 2 V +18 3 V +19 -5 V +18 -1 V +19 0 V +19 10 V +18 4 V +19 -2 V +18 -4 V +19 3 V +19 2 V +18 3 V +19 -2 V +18 -1 V +19 1 V +19 3 V +18 7 V +19 -4 V +18 3 V +19 0 V +19 -4 V +18 10 V +19 -3 V +18 7 V +19 -7 V +19 4 V +18 -5 V +19 3 V +18 -3 V +19 8 V +19 -4 V +18 3 V +19 2 V +18 -2 V +19 7 V +19 10 V +18 -14 V +19 7 V +18 -1 V +19 3 V +19 1 V +18 -1 V +19 2 V +18 -2 V +19 -5 V +19 7 V +18 -1 V +19 13 V +18 -2 V +19 1 V +19 -1 V +18 -2 V +19 -4 V +18 1 V +19 3 V +19 10 V +18 -12 V +19 7 V +18 7 V +19 -13 V +19 4 V +18 16 V +19 -6 V +18 1 V +19 4 V +19 -4 V +18 0 V +19 3 V +18 -1 V +19 10 V +19 -4 V +18 2 V +19 -6 V +18 12 V +19 10 V +stroke 5585 722 M +19 -9 V +18 4 V +19 -9 V +18 -1 V +19 2 V +19 10 V +18 -2 V +19 -4 V +18 0 V +19 20 V +19 -12 V +18 5 V +19 -2 V +18 0 V +19 5 V +19 -6 V +18 6 V +19 -5 V +18 8 V +19 9 V +19 -11 V +18 2 V +19 8 V +18 5 V +19 9 V +19 -11 V +18 -2 V +19 2 V +18 11 V +19 2 V +19 -1 V +18 -2 V +19 8 V +18 -15 V +19 19 V +19 0 V +18 7 V +19 9 V +18 -18 V +19 -11 V +19 11 V +18 -1 V +19 1 V +18 20 V +19 -3 V +19 -13 V +18 14 V +19 3 V +18 3 V +19 -21 V +stroke +LTw +% End plot #1 +% Begin plot #2 +0.500 UL +LTb +LCb setrgbcolor +0.85 0.32 0.09 C +954 554 M +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 1 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 1 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 1 V +18 0 V +19 0 V +18 1 V +19 0 V +19 0 V +18 1 V +19 -1 V +18 0 V +19 0 V +19 0 V +18 1 V +19 -1 V +18 0 V +19 1 V +19 0 V +18 0 V +19 0 V +18 0 V +19 1 V +19 -1 V +18 1 V +19 0 V +18 1 V +19 0 V +19 0 V +18 1 V +19 0 V +18 -1 V +19 1 V +19 1 V +18 0 V +19 0 V +18 0 V +19 1 V +19 1 V +18 0 V +19 1 V +18 -1 V +19 0 V +19 1 V +18 0 V +19 1 V +18 0 V +19 0 V +19 2 V +18 0 V +19 1 V +18 -2 V +19 2 V +19 0 V +18 0 V +19 0 V +18 3 V +19 2 V +19 -2 V +18 -1 V +19 1 V +18 -1 V +19 1 V +19 2 V +18 3 V +19 1 V +18 -2 V +19 2 V +19 0 V +18 4 V +19 0 V +18 -4 V +19 0 V +19 -1 V +18 0 V +19 0 V +18 1 V +19 2 V +19 0 V +18 0 V +19 2 V +18 1 V +19 -2 V +19 0 V +18 2 V +19 0 V +18 3 V +19 -1 V +19 3 V +18 -2 V +19 3 V +18 -3 V +19 2 V +19 0 V +18 0 V +19 1 V +18 0 V +19 0 V +19 3 V +18 -1 V +19 2 V +18 -3 V +19 1 V +19 3 V +18 -1 V +19 2 V +18 0 V +19 2 V +19 -2 V +18 4 V +19 2 V +18 -2 V +19 0 V +19 4 V +18 -1 V +19 1 V +18 1 V +19 -1 V +19 4 V +18 -3 V +19 4 V +18 1 V +19 5 V +19 -8 V +18 4 V +19 -1 V +18 5 V +19 -6 V +19 4 V +18 -2 V +19 2 V +18 4 V +19 -2 V +19 1 V +18 4 V +19 -3 V +18 4 V +19 -2 V +19 1 V +18 -1 V +19 4 V +18 2 V +19 -4 V +19 1 V +18 3 V +19 0 V +18 0 V +19 1 V +19 -1 V +18 6 V +19 1 V +18 2 V +19 -4 V +19 -1 V +18 -1 V +19 5 V +18 5 V +19 -1 V +19 -1 V +18 0 V +19 -2 V +18 9 V +19 -5 V +19 6 V +18 -2 V +19 2 V +18 3 V +19 -1 V +19 2 V +18 1 V +19 1 V +18 -3 V +19 10 V +19 -4 V +18 4 V +19 -1 V +18 3 V +19 -5 V +19 3 V +18 -2 V +19 9 V +18 -5 V +19 -3 V +19 4 V +18 3 V +19 18 V +18 -18 V +19 2 V +19 3 V +18 2 V +19 -1 V +18 2 V +19 2 V +19 -1 V +18 -4 V +19 0 V +18 8 V +19 6 V +19 2 V +18 3 V +19 -3 V +18 -2 V +19 -4 V +19 4 V +18 2 V +19 2 V +18 1 V +19 0 V +19 -2 V +18 6 V +19 -8 V +18 2 V +19 17 V +19 -7 V +18 8 V +19 -6 V +18 -5 V +19 2 V +19 13 V +18 -11 V +19 7 V +18 3 V +19 5 V +19 -7 V +18 14 V +19 -8 V +18 10 V +19 0 V +stroke 5585 720 M +19 -14 V +18 6 V +19 8 V +18 -9 V +19 2 V +19 7 V +18 9 V +19 -4 V +18 3 V +19 0 V +19 0 V +18 -8 V +19 8 V +18 1 V +19 -6 V +19 7 V +18 7 V +19 -4 V +18 -5 V +19 9 V +19 11 V +18 -10 V +19 9 V +18 0 V +19 -2 V +19 -5 V +18 19 V +19 -2 V +18 -7 V +19 15 V +19 -10 V +18 -6 V +19 29 V +18 -12 V +19 17 V +19 -8 V +18 -19 V +19 5 V +18 0 V +19 5 V +19 8 V +18 -3 V +19 4 V +18 10 V +19 3 V +19 -4 V +18 -6 V +19 0 V +18 10 V +19 -1 V +stroke +LTw +% End plot #2 +% Begin plot #3 +0.500 UL +LTb +LCb setrgbcolor +0.93 0.69 0.12 C +954 554 M +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 1 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 1 V +18 -1 V +19 1 V +18 0 V +19 1 V +19 0 V +18 0 V +19 1 V +18 0 V +19 -1 V +19 1 V +18 1 V +19 -1 V +18 1 V +19 0 V +19 1 V +18 0 V +19 0 V +18 1 V +19 0 V +19 0 V +18 1 V +19 0 V +18 0 V +19 1 V +19 0 V +18 0 V +19 1 V +18 1 V +19 1 V +19 1 V +18 0 V +19 0 V +18 3 V +19 0 V +19 0 V +18 0 V +19 2 V +18 2 V +19 0 V +19 3 V +18 -1 V +19 1 V +18 2 V +19 1 V +19 1 V +18 2 V +19 0 V +18 0 V +19 1 V +19 11 V +18 -1 V +19 -1 V +18 6 V +19 -2 V +19 -2 V +18 -1 V +19 1 V +18 1 V +19 2 V +19 2 V +18 1 V +19 2 V +18 1 V +19 2 V +19 1 V +18 2 V +19 2 V +18 2 V +19 3 V +19 2 V +18 3 V +19 0 V +18 3 V +19 1 V +19 0 V +18 5 V +19 2 V +18 2 V +19 3 V +19 1 V +18 4 V +19 1 V +18 3 V +19 2 V +19 4 V +18 4 V +19 4 V +18 3 V +19 3 V +19 2 V +18 1 V +19 6 V +18 1 V +19 7 V +19 0 V +18 -1 V +19 5 V +18 6 V +19 2 V +19 2 V +18 1 V +19 7 V +18 6 V +19 5 V +19 3 V +18 4 V +19 1 V +18 2 V +19 6 V +19 -2 V +18 13 V +19 3 V +18 7 V +19 -2 V +19 6 V +18 3 V +19 6 V +18 2 V +19 1 V +19 7 V +18 10 V +19 3 V +18 4 V +19 7 V +19 4 V +18 3 V +19 4 V +18 5 V +19 9 V +19 1 V +18 9 V +19 5 V +18 8 V +19 0 V +19 6 V +18 6 V +19 3 V +18 10 V +19 4 V +19 9 V +18 7 V +19 2 V +18 7 V +19 6 V +19 7 V +18 5 V +19 6 V +18 8 V +19 9 V +19 10 V +18 4 V +19 5 V +18 15 V +19 -1 V +19 12 V +18 -1 V +19 13 V +18 11 V +19 3 V +19 11 V +18 6 V +19 15 V +18 29 V +19 -25 V +19 17 V +18 -2 V +19 43 V +18 -50 V +19 4 V +19 3 V +18 -2 V +19 -2 V +18 59 V +19 35 V +19 -15 V +18 -11 V +19 33 V +18 12 V +19 -55 V +19 26 V +18 12 V +19 27 V +18 -32 V +19 71 V +19 -55 V +18 12 V +19 7 V +18 75 V +19 25 V +19 -33 V +18 14 V +19 87 V +18 18 V +19 -95 V +19 122 V +18 -82 V +19 -24 V +18 12 V +19 46 V +19 51 V +18 16 V +19 -20 V +18 -28 V +19 62 V +19 35 V +18 23 V +19 10 V +18 -8 V +19 -58 V +19 7 V +18 102 V +19 -27 V +18 -22 V +19 96 V +19 -39 V +18 -14 V +19 84 V +18 -58 V +19 81 V +19 -19 V +18 -50 V +19 105 V +18 -90 V +19 96 V +19 -71 V +18 32 V +19 11 V +18 52 V +19 -17 V +stroke 5585 1694 M +19 -14 V +18 81 V +19 -28 V +18 -13 V +19 66 V +19 47 V +18 -10 V +19 83 V +18 -49 V +19 19 V +19 -51 V +18 14 V +19 11 V +18 13 V +19 29 V +19 101 V +18 42 V +19 -100 V +18 6 V +19 27 V +19 34 V +18 47 V +19 26 V +18 92 V +19 -21 V +19 -52 V +18 14 V +19 87 V +18 13 V +19 -67 V +19 102 V +18 -19 V +19 37 V +18 103 V +19 -36 V +19 -2 V +18 -27 V +19 46 V +18 116 V +19 -81 V +19 6 V +18 -54 V +19 136 V +18 14 V +19 67 V +19 37 V +18 -31 V +19 100 V +18 -97 V +19 52 V +stroke +LTw +% End plot #3 +% Begin plot #4 +0.500 UL +LTb +LCb setrgbcolor +0.49 0.18 0.55 C +954 554 M +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 0 V +18 0 V +19 0 V +19 0 V +18 1 V +19 0 V +18 0 V +19 0 V +19 0 V +18 0 V +19 1 V +18 0 V +19 0 V +19 0 V +18 1 V +19 0 V +18 1 V +19 0 V +19 1 V +18 1 V +19 0 V +18 0 V +19 0 V +19 0 V +18 1 V +19 1 V +18 0 V +19 0 V +19 1 V +18 0 V +19 1 V +18 0 V +19 1 V +19 1 V +18 1 V +19 1 V +18 1 V +19 1 V +19 2 V +18 0 V +19 1 V +18 1 V +19 3 V +19 4 V +18 -3 V +19 2 V +18 0 V +19 3 V +19 0 V +18 5 V +19 0 V +18 0 V +19 3 V +19 12 V +18 -4 V +19 5 V +18 6 V +19 -9 V +19 0 V +18 2 V +19 2 V +18 2 V +19 2 V +19 3 V +18 1 V +19 5 V +18 2 V +19 0 V +19 2 V +18 6 V +19 2 V +18 3 V +19 4 V +19 2 V +18 2 V +19 5 V +18 3 V +19 2 V +19 3 V +18 5 V +19 0 V +18 5 V +19 6 V +19 2 V +18 5 V +19 3 V +18 6 V +19 2 V +19 4 V +18 5 V +19 5 V +18 3 V +19 4 V +19 5 V +18 4 V +19 6 V +18 8 V +19 3 V +19 1 V +18 14 V +19 -4 V +18 12 V +19 1 V +19 8 V +18 9 V +19 10 V +18 -4 V +19 6 V +19 5 V +18 6 V +19 13 V +18 6 V +19 0 V +19 2 V +18 17 V +19 5 V +18 13 V +19 1 V +19 9 V +18 4 V +19 11 V +18 2 V +19 12 V +19 10 V +18 5 V +19 6 V +18 9 V +19 19 V +19 -3 V +18 9 V +19 12 V +18 11 V +19 7 V +19 6 V +18 9 V +19 15 V +18 3 V +19 3 V +19 18 V +18 5 V +19 12 V +18 10 V +19 13 V +19 19 V +18 4 V +19 1 V +18 18 V +19 1 V +19 -6 V +18 -12 V +19 41 V +18 27 V +19 -38 V +19 54 V +18 6 V +19 74 V +18 -26 V +19 -46 V +19 5 V +18 10 V +19 15 V +18 14 V +19 65 V +19 -16 V +18 30 V +19 16 V +18 15 V +19 72 V +19 -26 V +18 24 V +19 -62 V +18 51 V +19 -6 V +19 -7 V +18 5 V +19 12 V +18 90 V +19 50 V +19 -38 V +18 -5 V +19 -17 V +18 100 V +19 -17 V +19 3 V +18 26 V +19 -9 V +18 90 V +19 -24 V +19 4 V +18 -19 V +19 89 V +18 -23 V +19 9 V +19 -15 V +18 -1 V +19 147 V +18 -31 V +19 24 V +19 -46 V +18 74 V +19 -6 V +18 111 V +19 -99 V +19 106 V +18 51 V +19 -41 V +18 38 V +19 157 V +19 -164 V +18 -5 V +19 41 V +18 -17 V +19 47 V +19 101 V +18 -49 V +19 103 V +18 -22 V +19 29 V +19 -66 V +18 222 V +19 -61 V +18 4 V +19 -2 V +19 87 V +18 -31 V +19 47 V +18 -2 V +19 18 V +19 22 V +18 54 V +19 109 V +18 -28 V +19 -71 V +19 18 V +18 77 V +19 26 V +18 -15 V +19 143 V +19 -45 V +18 -30 V +19 101 V +18 -132 V +19 105 V +stroke 5585 2799 M +19 -36 V +18 105 V +19 56 V +18 -48 V +19 -44 V +19 8 V +18 50 V +19 37 V +18 24 V +19 19 V +19 36 V +18 8 V +19 42 V +18 31 V +19 29 V +19 52 V +18 8 V +19 13 V +18 41 V +19 -4 V +19 50 V +18 49 V +19 25 V +18 29 V +19 -9 V +19 69 V +18 37 V +19 25 V +18 25 V +19 19 V +19 42 V +18 26 V +19 51 V +18 17 V +19 47 V +19 42 V +18 29 V +19 32 V +18 38 V +19 29 V +19 33 V +18 15 V +19 62 V +18 15 V +19 54 V +19 37 V +18 9 V +19 52 V +18 43 V +19 42 V +stroke +LTw +% End plot #4 +% Begin plot #5 +0.500 UL +LTb +LCb setrgbcolor +0.00 0.44 0.74 C +LTw +% End plot #5 +% Begin plot #6 +0.500 UL +LTb +LCb setrgbcolor +0.85 0.32 0.09 C +LTw +% End plot #6 +% Begin plot #7 +0.500 UL +LTb +LCb setrgbcolor +0.93 0.69 0.12 C +LTw +% End plot #7 +% Begin plot #8 +0.500 UL +LTb +LCb setrgbcolor +0.49 0.18 0.55 C +LTw +% End plot #8 +LCw setrgbcolor +1.000 1067 3718 5475 880 BoxColFill +0.500 UL +LTb +LCb setrgbcolor +0.00 0.00 0.00 C +1067 3718 N +0 880 V +5475 0 V +0 -880 V +-5475 0 V +Z stroke +% Begin plot #9 +0.500 UL +LTb +LCb setrgbcolor +0.00 0.44 0.74 C +LTw +% End plot #9 +% Begin plot #10 +0.500 UL +LTb +LCb setrgbcolor +0.85 0.32 0.09 C +LTw +% End plot #10 +% Begin plot #11 +0.500 UL +LTb +LCb setrgbcolor +0.93 0.69 0.12 C +LTw +% End plot #11 +% Begin plot #12 +0.500 UL +LTb +LCb setrgbcolor +0.49 0.18 0.55 C +LTw +% End plot #12 +% Begin plot #13 +0.500 UL +LTb +LCb setrgbcolor +0.00 0.44 0.74 C +LCb setrgbcolor +0.500 UL +LTb +0.00 0.44 0.74 C +1199 4488 M +591 0 V +stroke +LTw +% End plot #13 +% Begin plot #14 +0.500 UL +LTb +LCb setrgbcolor +0.85 0.32 0.09 C +LCb setrgbcolor +0.500 UL +LTb +0.85 0.32 0.09 C +1199 4268 M +591 0 V +stroke +LTw +% End plot #14 +% Begin plot #15 +0.500 UL +LTb +LCb setrgbcolor +0.93 0.69 0.12 C +LCb setrgbcolor +0.500 UL +LTb +0.93 0.69 0.12 C +1199 4048 M +591 0 V +stroke +LTw +% End plot #15 +% Begin plot #16 +0.500 UL +LTb +LCb setrgbcolor +0.49 0.18 0.55 C +LCb setrgbcolor +0.500 UL +LTb +0.49 0.18 0.55 C +1199 3828 M +591 0 V +stroke +LTw +% End plot #16 +2.000 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.500 UL +LTb +0.00 0.00 0.00 C +935 4661 N +935 554 L +5580 0 V +0 4107 V +-5580 0 V +Z stroke +1.000 UP +0.500 UL +LTb +LCb setrgbcolor +[] 0 setdash +0.00 0.00 0.00 C +LCb setrgbcolor +LTb +stroke +grestore +end +showpage +%%Trailer diff --git a/matricies/plot.png b/matricies/plot.png new file mode 100644 index 0000000..e865f13 Binary files /dev/null and b/matricies/plot.png differ diff --git a/matricies/plot.tex b/matricies/plot.tex new file mode 100644 index 0000000..2307283 --- /dev/null +++ b/matricies/plot.tex @@ -0,0 +1,135 @@ +% GNUPLOT: LaTeX picture with Postscript +\begingroup + \makeatletter + \providecommand\color[2][]{% + \GenericError{(gnuplot) \space\space\space\@spaces}{% + Package color not loaded in conjunction with + terminal option `colourtext'% + }{See the gnuplot documentation for explanation.% + }{Either use 'blacktext' in gnuplot or load the package + color.sty in LaTeX.}% + \renewcommand\color[2][]{}% + }% + \providecommand\includegraphics[2][]{% + \GenericError{(gnuplot) \space\space\space\@spaces}{% + Package graphicx or graphics not loaded% + }{See the gnuplot documentation for explanation.% + }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% + \renewcommand\includegraphics[2][]{}% + }% + \providecommand\rotatebox[2]{#2}% + \@ifundefined{ifGPcolor}{% + \newif\ifGPcolor + \GPcolortrue + }{}% + \@ifundefined{ifGPblacktext}{% + \newif\ifGPblacktext + \GPblacktexttrue + }{}% + % define a \g@addto@macro without @ in the name: + \let\gplgaddtomacro\g@addto@macro + % define empty templates for all commands taking text: + \gdef\gplbacktext{}% + \gdef\gplfronttext{}% + \makeatother + \ifGPblacktext + % no textcolor at all + \def\colorrgb#1{}% + \def\colorgray#1{}% + \else + % gray or color? + \ifGPcolor + \def\colorrgb#1{\color[rgb]{#1}}% + \def\colorgray#1{\color[gray]{#1}}% + \expandafter\def\csname LTw\endcsname{\color{white}}% + \expandafter\def\csname LTb\endcsname{\color{black}}% + \expandafter\def\csname LTa\endcsname{\color{black}}% + \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% + \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% + \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% + \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% + \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% + \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% + \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% + \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% + \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% + \else + % gray + \def\colorrgb#1{\color{black}}% + \def\colorgray#1{\color[gray]{#1}}% + \expandafter\def\csname LTw\endcsname{\color{white}}% + \expandafter\def\csname LTb\endcsname{\color{black}}% + \expandafter\def\csname LTa\endcsname{\color{black}}% + \expandafter\def\csname LT0\endcsname{\color{black}}% + \expandafter\def\csname LT1\endcsname{\color{black}}% + \expandafter\def\csname LT2\endcsname{\color{black}}% + \expandafter\def\csname LT3\endcsname{\color{black}}% + \expandafter\def\csname LT4\endcsname{\color{black}}% + \expandafter\def\csname LT5\endcsname{\color{black}}% + \expandafter\def\csname LT6\endcsname{\color{black}}% + \expandafter\def\csname LT7\endcsname{\color{black}}% + \expandafter\def\csname LT8\endcsname{\color{black}}% + \fi + \fi + \setlength{\unitlength}{0.0500bp}% + \ifx\gptboxheight\undefined% + \newlength{\gptboxheight}% + \newlength{\gptboxwidth}% + \newsavebox{\gptboxtext}% + \fi% + \setlength{\fboxrule}{0.5pt}% + \setlength{\fboxsep}{1pt}% + \definecolor{tbcol}{rgb}{1,1,1}% +\begin{picture}(7200.00,5040.00)% + \gplgaddtomacro\gplbacktext{% + \colorrgb{0.15,0.15,0.15}%% + \put(803,554){\makebox(0,0)[r]{\strut{}0}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,1141){\makebox(0,0)[r]{\strut{}0.05}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,1727){\makebox(0,0)[r]{\strut{}0.1}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,2314){\makebox(0,0)[r]{\strut{}0.15}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,2901){\makebox(0,0)[r]{\strut{}0.2}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,3488){\makebox(0,0)[r]{\strut{}0.25}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,4074){\makebox(0,0)[r]{\strut{}0.3}}% + \colorrgb{0.15,0.15,0.15}%% + \put(803,4661){\makebox(0,0)[r]{\strut{}0.35}}% + \colorrgb{0.15,0.15,0.15}%% + \put(935,334){\makebox(0,0){\strut{}0}}% + \colorrgb{0.15,0.15,0.15}%% + \put(1865,334){\makebox(0,0){\strut{}50}}% + \colorrgb{0.15,0.15,0.15}%% + \put(2795,334){\makebox(0,0){\strut{}100}}% + \colorrgb{0.15,0.15,0.15}%% + \put(3725,334){\makebox(0,0){\strut{}150}}% + \colorrgb{0.15,0.15,0.15}%% + \put(4655,334){\makebox(0,0){\strut{}200}}% + \colorrgb{0.15,0.15,0.15}%% + \put(5585,334){\makebox(0,0){\strut{}250}}% + \colorrgb{0.15,0.15,0.15}%% + \put(6515,334){\makebox(0,0){\strut{}300}}% + }% + \gplgaddtomacro\gplfronttext{% + \csname LTb\endcsname%% + \put(66,2607){\rotatebox{-270}{\makebox(0,0){\strut{}Temps d'exécution (s)}}}% + \put(3725,4){\makebox(0,0){\strut{}Taille des matrices}}% + \csname LTb\endcsname%% + \put(1922,4488){\makebox(0,0)[l]{\strut{}Echelonnage non réduit}}% + \csname LTb\endcsname%% + \put(1922,4268){\makebox(0,0)[l]{\strut{}Echelonnage réduit}}% + \csname LTb\endcsname%% + \put(1922,4048){\makebox(0,0)[l]{\strut{}Echelonnage non réduit normalisé}}% + \csname LTb\endcsname%% + \put(1922,3828){\makebox(0,0)[l]{\strut{}Echelonnage réduit normalisé}}% + \csname LTb\endcsname%% + \put(3725,4991){\makebox(0,0){/:Bold Echelonnage de matrices}}% + }% + \gplbacktext + \put(0,0){\includegraphics[width={360.00bp},height={252.00bp}]{plot}}% + \gplfronttext + \end{picture}% +\endgroup diff --git a/src/Gauss.cpp b/src/Gauss.cpp index 1bdebee..ea8f9a3 100644 --- a/src/Gauss.cpp +++ b/src/Gauss.cpp @@ -16,6 +16,10 @@ static void SwapLines(Matrix& mat, std::size_t line1, std::size_t line2) { static void DivideLine(Matrix& mat, std::size_t line, Matrix::Element number) { std::transform(std::execution::par_unseq, mat.GetLineIterator(line), mat.GetLineIterator(line + 1), mat.GetLineIterator(line), [number](Matrix::Element e) { return e /= number; }); + + /*for (std::size_t i = 0; i < mat.GetColumnCount(); i++) { + mat.at(line, i) /= number; + }*/ } static int FirstNotNullElementIndexOnColumn(Matrix& mat, std::size_t column, std::size_t startLine = 0) { @@ -38,7 +42,7 @@ static void SimplifyLine(Matrix& mat, std::size_t line, std::size_t pivot_line, }); } -static void GaussJordanReduced(Matrix& a_Matrix, bool a_Normalise) { +static void GaussJordanReducedNorma(Matrix& a_Matrix) { int indice_ligne_pivot = -1; for (std::size_t j = 0; j < a_Matrix.GetColumnCount(); j++) { @@ -56,9 +60,7 @@ static void GaussJordanReduced(Matrix& a_Matrix, bool a_Normalise) { Matrix::Element pivot = a_Matrix.at(indice_ligne_pivot, j); - if (a_Normalise) { - DivideLine(a_Matrix, indice_ligne_pivot, pivot); - } + DivideLine(a_Matrix, indice_ligne_pivot, pivot); auto range = std::views::iota(static_cast(0), a_Matrix.GetRawCount()); @@ -71,7 +73,7 @@ static void GaussJordanReduced(Matrix& a_Matrix, bool a_Normalise) { } } -static void GaussJordanTriangular(Matrix& a_Matrix, bool a_Normalise) { +static void GaussJordanReduced(Matrix& a_Matrix) { int indice_ligne_pivot = -1; for (std::size_t j = 0; j < a_Matrix.GetColumnCount(); j++) { @@ -89,25 +91,85 @@ static void GaussJordanTriangular(Matrix& a_Matrix, bool a_Normalise) { Matrix::Element pivot = a_Matrix.at(indice_ligne_pivot, j); - if (a_Normalise) { - DivideLine(a_Matrix, indice_ligne_pivot, pivot); + auto range = std::views::iota(static_cast(0), a_Matrix.GetRawCount()); + + // On simplifie les autres lignes + std::for_each(std::execution::par_unseq, range.begin(), range.end(), [&a_Matrix, j, indice_ligne_pivot](std::size_t i) { + if (i != static_cast(indice_ligne_pivot)) { + SimplifyLine(a_Matrix, i, indice_ligne_pivot, j); + } + }); + } +} + +static void GaussJordanTriangular(Matrix& a_Matrix) { + int indice_ligne_pivot = -1; + + for (std::size_t j = 0; j < a_Matrix.GetColumnCount(); j++) { + + int indice_ligne_pivot_trouve = FirstNotNullElementIndexOnColumn(a_Matrix, j, indice_ligne_pivot + 1); + + if (indice_ligne_pivot_trouve < 0) // colonne de 0 + continue; // on regarde la prochaine colonne + + indice_ligne_pivot++; + + if (indice_ligne_pivot_trouve != indice_ligne_pivot) { + SwapLines(a_Matrix, indice_ligne_pivot_trouve, indice_ligne_pivot); } + Matrix::Element pivot = a_Matrix.at(indice_ligne_pivot, j); + auto range = std::views::iota(static_cast(indice_ligne_pivot + 1), a_Matrix.GetRawCount()); // On simplifie les autres lignes après la ligne du pivot std::for_each(std::execution::par_unseq, range.begin(), range.end(), - [&a_Matrix, indice_ligne_pivot, j](std::size_t i) { - SimplifyLine(a_Matrix, i, indice_ligne_pivot, j); - }); + [&a_Matrix, indice_ligne_pivot, j](std::size_t i) { SimplifyLine(a_Matrix, i, indice_ligne_pivot, j); }); + } +} + +static void GaussJordanTriangularNorma(Matrix& a_Matrix) { + int indice_ligne_pivot = -1; + + for (std::size_t j = 0; j < a_Matrix.GetColumnCount(); j++) { + + int indice_ligne_pivot_trouve = FirstNotNullElementIndexOnColumn(a_Matrix, j, indice_ligne_pivot + 1); + + if (indice_ligne_pivot_trouve < 0) // colonne de 0 + continue; // on regarde la prochaine colonne + + indice_ligne_pivot++; + + if (indice_ligne_pivot_trouve != indice_ligne_pivot) { + SwapLines(a_Matrix, indice_ligne_pivot_trouve, indice_ligne_pivot); + } + + Matrix::Element pivot = a_Matrix.at(indice_ligne_pivot, j); + + DivideLine(a_Matrix, indice_ligne_pivot, pivot); + + auto range = std::views::iota(static_cast(indice_ligne_pivot + 1), a_Matrix.GetRawCount()); + + // On simplifie les autres lignes après la ligne du pivot + std::for_each(std::execution::par_unseq, range.begin(), range.end(), + [&a_Matrix, indice_ligne_pivot, j](std::size_t i) { SimplifyLine(a_Matrix, i, indice_ligne_pivot, j); }); } } void GaussJordan(Matrix& a_Matrix, bool a_Reduite, bool a_Normalise) { - if (a_Reduite) - GaussJordanReduced(a_Matrix, a_Normalise); - else - GaussJordanTriangular(a_Matrix, a_Normalise); + if (a_Reduite) { + if (a_Normalise) { + GaussJordanReducedNorma(a_Matrix); + } else { + GaussJordanReduced(a_Matrix); + } + } else { + if (a_Normalise) { + GaussJordanTriangularNorma(a_Matrix); + } else { + GaussJordanTriangular(a_Matrix); + } + } } } // namespace Gauss \ No newline at end of file diff --git a/test/test_jordan.cpp b/test/test_jordan.cpp index 5ebd205..125ea8c 100644 --- a/test/test_jordan.cpp +++ b/test/test_jordan.cpp @@ -2,6 +2,12 @@ #include "Matrix.h" #include "test_assert.h" +#include +#include + +static constexpr int MATRIX_MAX_SIZE = 300; +static constexpr int EXECUTION_COUNT = 1; + struct Test { Matrix mat; Matrix res; @@ -30,6 +36,22 @@ static const std::vector TEST_MATRICES = { }}} }; +static unsigned int GetRandomInt() { + return rand() % MATRIX_MAX_SIZE + 1; +} + +static Matrix GetRandomMatrix(std::size_t a_Raw, std::size_t a_Column) { + Matrix matrix {a_Raw, a_Column}; + + for (std::size_t i = 0; i < matrix.GetRawCount(); i++) { + for (std::size_t j = 0; j < matrix.GetColumnCount(); j++) { + matrix.at(i, j) = GetRandomInt(); + } + } + + return matrix; +} + void test() { for (Test test : TEST_MATRICES) { Gauss::GaussJordan(test.mat, true, true); @@ -37,7 +59,26 @@ void test() { } } +void gaussTest() { + auto start = std::chrono::system_clock::now(); + + for (int i = 0; i < EXECUTION_COUNT; i++) { + Matrix mat = GetRandomMatrix(500, 500); + Gauss::GaussJordan(mat, false, false); + } + + auto end = std::chrono::system_clock::now(); + std::chrono::duration elapsed_seconds = end - start; + std::cout << "\tgauss jordan elapsed time : " << elapsed_seconds.count() << "s" << std::endl; +} + +void speedTest() { + gaussTest(); + // gaussColumnTest(); +} + int main(int argc, char** argv) { test(); + speedTest(); return 0; } diff --git a/test/test_plot.cpp b/test/test_plot.cpp new file mode 100644 index 0000000..a8496c8 --- /dev/null +++ b/test/test_plot.cpp @@ -0,0 +1,109 @@ +#include +#include +#include +#include +#include +#include + +#include "Gauss.h" +#include "Matrix.h" +#include "Solver.h" + +static constexpr int EXECUTION_COUNT = 100; +static constexpr int MATRIX_MAX_SIZE = 300; + +static unsigned int GetRandomInt() { + return rand() % MATRIX_MAX_SIZE + 1; +} + +static Matrix GetRandomMatrix(std::size_t a_Raw, std::size_t a_Column) { + Matrix matrix {a_Raw, a_Column}; + + for (std::size_t i = 0; i < matrix.GetRawCount(); i++) { + for (std::size_t j = 0; j < matrix.GetColumnCount(); j++) { + matrix.at(i, j) = GetRandomInt(); + } + } + + return matrix; +} + +std::vector GaussJordan(const std::vector& x) { + std::vector y; + + std::for_each(x.begin(), x.end(), [&y](double size) { + auto start = std::chrono::system_clock::now(); + + for (int j = 0; j < EXECUTION_COUNT; j++) { + Matrix mat = GetRandomMatrix(size, size); + Gauss::GaussJordan(mat, false, false); + } + + auto end = std::chrono::system_clock::now(); + std::chrono::duration elapsed_seconds = end - start; + std::cout << "S " << size << "\n"; + y.push_back(elapsed_seconds.count() / static_cast(EXECUTION_COUNT)); + }); + + return y; +} + + +std::vector GaussJordanReduite(const std::vector& x) { + std::vector y; + + std::for_each(x.begin(), x.end(), [&y](double size) { + auto start = std::chrono::system_clock::now(); + + for (int j = 0; j < EXECUTION_COUNT; j++) { + Matrix mat = GetRandomMatrix(size, size); + Gauss::GaussJordan(mat, true, false); + } + + auto end = std::chrono::system_clock::now(); + std::chrono::duration elapsed_seconds = end - start; + std::cout << "R " << size << "\n"; + y.push_back(elapsed_seconds.count() / static_cast(EXECUTION_COUNT)); + }); + + return y; +} + +int main() { + srand(time(0)); + + int start = 1; + + std::vector x = matplot::linspace(start, MATRIX_MAX_SIZE, MATRIX_MAX_SIZE - start + 1); + //std::vector x = {5000}; + std::vector y, y1, y2, y3; + + // y2.resize(x.size()); + + { + auto result1 = std::async(std::launch::async, &GaussJordan, x); + auto result2 = std::async(std::launch::async, &GaussJordanReduite, x); + y = result1.get(); + y1 = result2.get(); + } + + + std::cout << "Fini !\n"; + + + // std::transform(x.begin(), x.end(), y2.begin(), [](double x) { return 1.0 / (100.0 * 100.0) * 0.6 * x * x; }); + + matplot::title("Echelonnage de matrices"); + matplot::xlabel("Taille des matrices"); + matplot::ylabel("Temps d'exécution (s)"); + + matplot::hold(matplot::on); + matplot::plot(x, y); + matplot::plot(x, y1); + + auto l = matplot::legend({"Echelonnage non réduit", "Echelonnage réduit", "Echelonnage non réduit normalisé", "Echelonnage réduit normalisé"}); + l->location(matplot::legend::general_alignment::topleft); + + matplot::show(); + return 0; +} \ No newline at end of file diff --git a/test/test_random_kernel.cpp b/test/test_random_kernel.cpp index 009b80d..77fe0f9 100644 --- a/test/test_random_kernel.cpp +++ b/test/test_random_kernel.cpp @@ -16,6 +16,16 @@ static int GetRandomInt() { return rand() % 11 - 5; } +#define print_time(i) \ + end = std::chrono::system_clock::now(); \ + elapsed_seconds = end - start; \ + std::cout << "elapsed time " << i << " : " << elapsed_seconds.count() << "s" << std::endl; \ + start = std::chrono::system_clock::now() + +static unsigned int GetRandomSize() { + return rand() % MATRIX_MAX_SIZE + 1; +} + static Matrix GetRandomMatrix(std::size_t a_Raw, std::size_t a_Column) { Matrix matrix {a_Raw, a_Column}; @@ -29,34 +39,57 @@ static Matrix GetRandomMatrix(std::size_t a_Raw, std::size_t a_Column) { } static bool Test() { - Matrix matrix = GetRandomMatrix(rand() % MATRIX_MAX_SIZE + 1, rand() % MATRIX_MAX_SIZE + 1); + auto start = std::chrono::system_clock::now(); + auto begin = start; + auto end = start; + std::chrono::duration elapsed_seconds = end - start; - for (std::size_t i = 0; i < matrix.GetRawCount(); i++) { - for (std::size_t j = 0; j < matrix.GetColumnCount(); j++) { - matrix.at(i, j) = GetRandomInt(); - } - } + std::cout << "Begin\n"; + + Matrix matrix = GetRandomMatrix(GetRandomSize(), GetRandomSize()); + + print_time(1); Matrix copy = matrix; Vect kernel = solver.Kernel(std::move(copy)); + print_time(2); + Matrix nullVector {matrix.GetRawCount(), 1}; nullVector.Fill(0.0); for (std::size_t i = 0; i < kernel.GetCardinal(); i++) { - test_assert(matrix * kernel.GetVector(i) == nullVector); + Matrix result = matrix * kernel.GetVector(i); + if(!(result == nullVector)) { + test_assert(false); + } } + print_time(3); + for (std::size_t i = 0; i < KERNEL_CHECKS; i++) { Matrix vector = GetRandomMatrix(kernel.GetDimension(), 1); test_assert(kernel.IsElementOf(vector) == (matrix * vector == nullVector)); } - Vect kernel2 = solver.Kernel(kernel.GetLinearSystem()); + print_time(4); + + Matrix linearSystem = kernel.GetLinearSystem(); + + print_time(5); + + Vect kernel2 = solver.Kernel(std::move(linearSystem)); test_assert(kernel == kernel2); + + print_time(6); + + elapsed_seconds = end - begin; + std::cout << "final elapsed time: " << elapsed_seconds.count() << "s" << std::endl; + + std::cout << "End\n"; return true; } @@ -69,6 +102,7 @@ int main() { for (int i = 0; i < EXECUTION_COUNT; i++) { auto handle = std::async(std::launch::async, &Test); results.push_back(std::move(handle)); + // Test(); } for (auto& result : results) { diff --git a/xmake.lua b/xmake.lua index b1f574c..e685d7c 100644 --- a/xmake.lua +++ b/xmake.lua @@ -7,10 +7,14 @@ set_languages("c++20") set_warnings("all") add_includedirs("include") +add_requires("matplotplusplus") + -- Solver Library target("Pivot") set_kind("static") add_files("src/*.cpp") + add_cxxflags("-ffast-math") + set_optimize("fastest") remove_files("src/main.cpp") @@ -49,6 +53,7 @@ for _, file in ipairs(os.files("test/test_*.cpp")) do set_default(false) add_deps("Pivot") + add_packages("matplotplusplus") add_tests("compile_and_run") end