2011-02-01 8 views
3

私はDB関係の自動文書を準備しています。ツールはgraphvizです。私が持っている問題は、出力イメージ上のノードの配置は、opptimalではなく、多くの不必要なエッジの交差があるということです。 グラフの最適化を実行する方法はありますか?その結果、最小限のエッジが交差(交差)するでしょうか?不要なエッジの交差(交差)を削除するためにgraphvizでレイアウトを最適化する方法はありますか?

digraph structs { 
     node [shape=Mrecord]; 
     overlap="false"; 
     splines="true"; 
     layout=sfdp; 
     rankdir=LR; 

     ttype[label="::: ttype :::|<id>id|<table_name>table_name|<type_name>type_name|<synopsis>synopsis"]; 
     tevents[label="::: tevents :::|<id>id|<id_tcases>id_tcases|<id_ttype>id_ttype|<synopsis>synopsis|<expiredate>expiredate|<open>open"]; 
     toperationlog[label="::: toperationlog :::|<id>id|<executiondate>executiondate|<executiontime>executiontime|<query>query|<id_tusers>id_tusers"]; 
     tdocuments[label="::: tdocuments :::|<id>id|<id_tcases>id_tcases|<id_ttype>id_ttype|<path>path|<creationdate>creationdate"]; 
     tcustomers_cases[label="::: tcustomers_cases :::|<id_tcustomers>id_tcustomers|<id_tcases>id_tcases"]; 
     tcases[label="::: tcases :::|<id>id|<creationdate>creationdate|<incomingdate>incomingdate|<clousuredate>clousuredate|<synopsis>synopsis|<notes>notes|<id_ttype>id_ttype|<id_tusers>id_tusers"]; 
     tusers[label="::: tusers :::|<id>id|<username>username|<password>password|<firstname>firstname|<lastname>lastname|<role_id>role_id"]; 
     tcustomers[label="::: tcustomers :::|<id>id|<firstname>firstname|<lastname>lastname|<email>email|<phone>phone|<mobile>mobile|<address>address"]; 

     tevents:id_tcases -> tcases:id [arrowhead="none"]; 
     tevents:id_ttype -> ttype:id [arrowhead="none"]; 
     toperationlog:id_tusers -> tusers:id [arrowhead="none"]; 
     tdocuments:id_tcases -> tcases:id [arrowhead="none"]; 
     tdocuments:id_ttype -> ttype:id [arrowhead="none"]; 
     tcustomers_cases:id_tcustomers -> tcustomers:id [arrowhead="none"]; 
     tcustomers_cases:id_tcases -> tcases:id [arrowhead="none"]; 
     tcases:id_ttype -> ttype:id [arrowhead="none"]; 
     tcases:id_tusers -> tusers:id [arrowhead="none"]; 
    } 

答えて

3

trueにremincrossを設定すると、エッジ交差の数を減少させることにより、グラフの外観を改善するべきである、第二の時間を実行するために相互最小化を引き起こすであろう。

+0

これを行うアルゴリズムはありますか? – jokoon

関連する問題