diff --git a/assets/index-d402aaca.js b/assets/index-c0a9d3ab.js similarity index 99% rename from assets/index-d402aaca.js rename to assets/index-c0a9d3ab.js index 55bd8d3..ae210b5 100644 --- a/assets/index-d402aaca.js +++ b/assets/index-c0a9d3ab.js @@ -82,7 +82,7 @@ But there is a better way, there is a perfect data structure to keep track of th To demonstrate this difference we prepared to graphs that compare the running time of our algorithms implemented with linked list and min heap as a fringe: -![dijkstra_graph](src/assets/img/dijkstra_graph.jpg) +![dijkstra_graph](img/dijkstra_graph.jpg) -![prim_graph](src/assets/img/prim_graph.jpg) +![prim_graph](img/prim_graph.jpg) `,Ok=({onClose:e})=>{const[n,t]=Se.useState("");return Se.useEffect(()=>t(Lk),[]),D.jsx("div",{className:ki.overlay,onClick:e,children:D.jsxs("div",{className:ki.PaperModal,children:[D.jsx("button",{className:ki.close,onClick:e,children:"Close"}),D.jsx("div",{children:D.jsx(zk,{components:{img:({alt:r,src:i,title:l})=>D.jsx("img",{alt:r,src:i,title:l,style:{width:"100%"}}),p:({node:r,...i})=>D.jsx("p",{...i,style:{fontSize:"1.2rem"}})},children:n})}),D.jsx("button",{className:ki.close,onClick:e,children:"Close"})]})})},Rk=()=>{const{nodes:e,edges:n,setNodes:t,setEdges:r}=Se.useContext(ds),{setShowErrorModal:i,showPaperModal:l,setShowPaperModal:o}=Se.useContext(hs),u=()=>{if(ba(e,n)){const c=ly(e,n);console.log(c),Va(c)}else i({show:!0,text:"All nodes must be connected."})},s=()=>{if(ba(e,n)){const c=oy(e,n);console.log(c),Va(c)}else i({show:!0,text:"All nodes must be connected."})},a=()=>{t([]),r([])};return D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:qa.Navbar,children:[D.jsx("button",{onClick:u,children:"Run prim's algorithm"}),D.jsx("button",{onClick:s,children:"Run dijkstra's algorithm"}),D.jsx("button",{id:qa.clearCanvas,onClick:a,children:"Clear canvas"}),D.jsx("button",{onClick:()=>o(!0),children:"Paper"})]}),l&&ps.createPortal(D.jsx(Ok,{onClose:()=>o(!1)}),document.body)]})},Ak="_title_kzhz6_1",Mk={title:Ak},Dk=()=>D.jsx("div",{className:Mk.title}),jk="_instructions_1xloc_1",Fk={instructions:jk},Bk=()=>D.jsx("div",{className:Fk.instructions});function Uk(){return D.jsx(ld,{children:D.jsxs(ed,{children:[D.jsx(Rk,{}),D.jsx(Zg,{}),D.jsx(Dk,{}),D.jsx(Bk,{})]})})}go.createRoot(document.getElementById("root")).render(D.jsx(Qc.StrictMode,{children:D.jsx(Uk,{})})); diff --git a/img/dijkstra_graph.jpg b/img/dijkstra_graph.jpg new file mode 100644 index 0000000..ceb6973 Binary files /dev/null and b/img/dijkstra_graph.jpg differ diff --git a/img/prim_graph.jpg b/img/prim_graph.jpg new file mode 100644 index 0000000..77dbaff Binary files /dev/null and b/img/prim_graph.jpg differ diff --git a/index.html b/index.html index 8bb268d..68f5e99 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Dijkstra Prim Visualizer - +