版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、 MATGRAPH BY EXAMPLE 27 three one eight five two nine seven four six F IGURE 12. A drawing of a graph read into M ATGRAPH via the graph parser program. F IGURE 13. A picture of Q4 produced by exporting a graph from M ATGRAPH and then laid out using GraphViz. M ATGRAPH can save graphs in a format tha
2、t can be read by OmniGrafe. The M ATGRAPH command graffle(g,filename.graffle writes the graph to disk. Double clicking the created le launches OmniGrafe. Heres an example: cube(g,3 graffle(g,cube.graffle Using OmniGrafes layout tool, we can produce a nice embedding of the graph as shown in Figure 14
3、. 28 EDWARD SCHEINERMAN F IGURE 14. A picture of Q4 produced by exporting a graph from M ATGRAPH and then laid out using OmniGrafe. To a limited extent, it is possible to convert graphs prepared in OmniGrafe for import into M ATInside the matgraph/tools directory resides a program named graffle2sgf.
4、py. This is a Python language program so, in order to run it you must have Python installed on your computer. This program takes as input a graph saved by OmniGrafe and returns as output a matrix specifying the graph in Simple Graph Format (see 9.2. Suppose you have created a graph using OmniGrafe a
5、nd saved it on your hard disk in a le called mygraph.graffle. Issue the following command in the Unix shell: ./graffle2sgf.py mygraph This reads the graph saved by OmniGrafe and writes the relevant data into the le mygraph. Now, inside MATLAB, do the following: load mygraph sgf(g,mygraph g Graph wit
6、h 5 vertices and 6 edges (full The MATLAB command load mygraph reads the le mygraph and saves the matrix contained therein into a variable that is also named mygraph. The command sgf(g,mygraph overwrites g with the graph specied by the SGF matrix mygraph. The graffle2sgf.py tool is not completely re
7、liable. It works well on diagrams that contain only nodes and edges. If there are other extraneous lines or text in the diagram (which an OmniGrafe diagram certainly may have, then the program can get confused and give poor performance. Readers are invited to submit a better version. GRAPH . MORE , D EPARTMENT OF A PPLIED M ATHEMATI
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 體育場館大白施工合同
- 專利代理人聘用合同律師
- 航空航天企業(yè)研發(fā)經理聘用合同
- 實驗室施工合同模板
- 水利工程監(jiān)理服務協(xié)議
- 餐飲業(yè)財務人員招聘協(xié)議
- ??诙址考笔酆贤0?/a>
- 外語翻譯專家聘用協(xié)議
- 中醫(yī)學說教師聘用合同
- 大型工廠給排水系統(tǒng)施工合同
- 2024年人教版小學四年級英語(上冊)期末試卷附答案
- 第9課《創(chuàng)新增才干》第2框《積極投身創(chuàng)新實踐》【中職專用】中職思想政治《哲學與人生》(高教版2023基礎模塊)
- 食品經營安全管理制度目錄
- DB4406-T 23-2023 地理標志產品 倫教糕
- 2024-2030年中國工業(yè)遠程終端裝置(RTU)行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略分析報告
- 耕作學智慧樹知到期末考試答案章節(jié)答案2024年中國農業(yè)大學
- 餐廳實習協(xié)議書
- QCT1067.5-2023汽車電線束和電器設備用連接器第5部分:設備連接器(插座)的型式和尺寸
- 2024質量管理理解、評價和改進組織的質量文化指南
- 2024年度領導干部任前廉政法規(guī)知識測試題庫150題
- 2024年四川省涼山州中考適應性考試語文試題(含答案解析)
評論
0/150
提交評論