JP2908524B2 - Wood structure display - Google Patents

Wood structure display

Info

Publication number
JP2908524B2
JP2908524B2 JP2149365A JP14936590A JP2908524B2 JP 2908524 B2 JP2908524 B2 JP 2908524B2 JP 2149365 A JP2149365 A JP 2149365A JP 14936590 A JP14936590 A JP 14936590A JP 2908524 B2 JP2908524 B2 JP 2908524B2
Authority
JP
Japan
Prior art keywords
node
nodes
tree structure
area
child
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2149365A
Other languages
Japanese (ja)
Other versions
JPH0442373A (en
Inventor
秀行 久保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2149365A priority Critical patent/JP2908524B2/en
Publication of JPH0442373A publication Critical patent/JPH0442373A/en
Application granted granted Critical
Publication of JP2908524B2 publication Critical patent/JP2908524B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Digital Computer Display Output (AREA)
  • Stored Programmes (AREA)

Description

【発明の詳細な説明】 [概要] 木構造のノードを表示画面に表示する木構造表示装置
に関し、 表示スペースを効率よく用いてバランスのよい木構造
の表示を行うことを目的とし、 木構造を構成するあるノードの子ノードである複数の
ノードに対してノードの種類に応じて割り当てられてい
る重みの比に基づいて、前記複数のノードの各々に対し
て画面上で割り当てる領域の幅を算出し、割り当てられ
た領域の中心を各ノードの座標とする座標算出部と、該
座標算出部が算出したノードの座標情報を保持するノー
ド管理テーブルと、ノード及びノード間の親子関係を表
す図形の形状を保持する図形ライブラリと、前記座標算
出部が算出したノードの座標に基づいて、表示画面上に
ノードを表す図形を描画する描画部を具備して構成す
る。
DETAILED DESCRIPTION OF THE INVENTION [Summary] The present invention relates to a tree structure display device for displaying a tree structure node on a display screen, and to display a well-balanced tree structure using display space efficiently. Calculating a width of an area to be allocated on the screen for each of the plurality of nodes, based on a ratio of weights allocated to the plurality of nodes which are child nodes of the constituent node according to the type of the node; A coordinate calculation unit that sets the center of the allocated area to the coordinates of each node; a node management table that stores the coordinate information of the nodes calculated by the coordinate calculation unit; A graphic library for holding a shape and a drawing unit for drawing a graphic representing a node on a display screen based on the coordinates of the node calculated by the coordinate calculation unit are provided.

[産業上の利用分野] 本発明は木構造のノードを表示画面に表示する木構造
表示装置に関し、更に詳しくはデータの管理構造として
用いられる木構造を表示する木構造表示装置に関する。
The present invention relates to a tree structure display device that displays a tree structure node on a display screen, and more particularly to a tree structure display device that displays a tree structure used as a data management structure.

アルゴリズムの設計時やプログラム開発時において、
データを管理するデータ構造として木構造が非常によく
利用される。木構造を扱うプログラムでは、入力データ
に基づいて木構造中に保持されるデータの挿入や、削除
等を行うことによって、木構造の構成を動的に変化させ
ながらデータの管理を行っている。
When designing algorithms or developing programs,
A tree structure is very often used as a data structure for managing data. In a program that handles a tree structure, data management is performed while dynamically changing the configuration of the tree structure by inserting or deleting data held in the tree structure based on input data.

このため、木構造を扱うプログラムが正しく動作して
いるかテストするためには、プログラムのトレースやダ
ンプをとることによって、木構造を操作する個々のステ
ートメントが正しく動作してするか確認しなければなら
ず、デバックが困難であった。従って、木構造を扱うプ
ログラムのデバックを容易にするためには、プログラム
の動作に応じて変化する木構造を図形を用いて視覚的に
表現することによって、プログラマのプログラム開発作
業を支援する必要がある。
Therefore, in order to test whether a program that handles a tree structure is working properly, it is necessary to confirm that each statement that operates the tree structure is working correctly by taking a trace or dump of the program. And it was difficult to debug. Therefore, in order to facilitate the debugging of a program that handles a tree structure, it is necessary to support the program development work of the programmer by visually expressing the tree structure that changes according to the operation of the program using graphics. is there.

[従来の技術] 木構造とは、データを階層的に管理するデータ構造で
ある。第15図は木構造の構成例を示す図である。木構造
は、ルートノード1,中間ノード2及びリーフノード3と
呼ばれるノードより構成されている。ルートノード1
は、木構造中の最上位に位置するノードであり、リーフ
ノード3は木構造の末端(最下位)に位置するノードで
ある。それ以外のノードは全て中間ノードである。従っ
て、木構造を表示するためには、木構造を構成する各ノ
ードを適切に配置する必要がある。
[Related Art] A tree structure is a data structure that manages data hierarchically. FIG. 15 is a diagram showing a configuration example of a tree structure. The tree structure is composed of nodes called root node 1, intermediate node 2 and leaf node 3. Root node 1
Is a node located at the highest level in the tree structure, and the leaf node 3 is a node positioned at the end (lowest level) of the tree structure. All other nodes are intermediate nodes. Therefore, in order to display the tree structure, it is necessary to appropriately arrange each node constituting the tree structure.

動的に変化する木構造を表示する場合、従来は木構造
を構成する各ノードをトップダウン方式を用いて配置を
行っていた。トップダウン方式では、各ノードは属性と
して高さHと幅Wをもち、ノードの幅Wを子ノードの総
数で割り、親ノードの幅Wを等分割することによって、
子ノードの高さHと幅W′を決定している(高さHは一
定)。第16図はトップダウン方式の説明図である。
Conventionally, when a dynamically changing tree structure is displayed, each node constituting the tree structure is arranged using a top-down method. In the top-down method, each node has a height H and a width W as attributes, divides the width W of the node by the total number of child nodes, and divides the width W of the parent node equally.
The height H and the width W 'of the child node are determined (the height H is constant). FIG. 16 is an explanatory diagram of the top-down method.

[発明が解決しようとする課題] トップダウン方式を用いて木構造を表示すると、親ノ
ードの幅Wを子ノードの数に応じて等分割して子ノード
に割り当てるため、ある特定の親ノードの下に子ノード
が多数作成されると、子ノードの持つ幅が狭くなり、結
果として子ノード同志が重なり合って非常に見づらい表
示になるという問題があった。第17図は領域の等分割に
よる配置例を示す図である。ある特定の親ノード4の下
に子ノードが多数作成されると、子ノードの持つ幅が狭
くなり、結果として子ノード同志が重なり合って非常に
見づらい表示になっている。
[Problem to be Solved by the Invention] When a tree structure is displayed using a top-down method, the width W of a parent node is equally divided according to the number of child nodes and assigned to child nodes. When a large number of child nodes are created below, the width of the child nodes is reduced, and as a result, there is a problem that the child nodes are overlapped with each other to make the display very difficult to see. FIG. 17 is a diagram showing an example of arrangement by equal division of regions. When a large number of child nodes are created under a certain parent node 4, the widths of the child nodes are reduced, and as a result, the child nodes overlap each other, and the display is very difficult to see.

また、リーフノードとなる子ノードに対しても、他の
中間リードとなる子ノードと同じ幅を割り当てるため、
リーフノードの下の領域が無駄になり、木構造のバラン
スが悪くなり、見づらい表示になるという問題があっ
た。第18図は領域の等分割による配置例を示す図であ
る。リーフノードとなる子ノード5,6に対しても他の子
ノードと同じ幅の領域が割り当てられるため、図の斜線
領域が無駄になっている。
In addition, to assign the same width to the child node as the leaf node, the same width as the child node as the other intermediate lead,
There is a problem that the area below the leaf node is wasted, the balance of the tree structure is deteriorated, and the display becomes difficult to see. FIG. 18 is a diagram showing an example of arrangement by equally dividing a region. Since the child nodes 5 and 6 that are the leaf nodes are assigned the same width as the other child nodes, the hatched areas in the figure are wasted.

このように、従来方式では動的に変化する木構造を表
示する場合、木構造を構成する各ノードの配置が適切で
ないため、ノード間の重なりや表示画面上に無駄なスペ
ースが生じ、結果として木構造の表示が見づらくなると
いう問題が生じていた。
As described above, in the conventional method, when a dynamically changing tree structure is displayed, since the nodes constituting the tree structure are not properly arranged, overlapping between the nodes and useless space on the display screen occur, and as a result, There has been a problem that the display of the tree structure is difficult to see.

本発明はこのような課題に鑑みてなされたものであっ
て、表示スペースを効率よく用いてバランスのよい木構
造の表示を行うことができる木構造表示装置を提供する
ことを目的としている。
The present invention has been made in view of such a problem, and an object of the present invention is to provide a tree structure display device capable of efficiently displaying a tree structure using a display space efficiently.

[課題を解決するための手段] 第1図は本発明の原理ブロック図である。図におい
て、10は入力コマンドに基づいて、木構造を構成するノ
ードの種類に応じて割り付けられる重みに基づいてノー
ドの表示画面上の座標を算出する座標算出部、11は該座
標算出部10が算出したノードの座標情報を保持するノー
ド管理テーブル、12はノード及びノード間の親子関係を
表す図形の形状を保持する図形ライブラリ、13は前記座
標算出部10が算出したノードの座標に基づいて、表示画
面上にノードを表す図形を描画する描画部、14は表示部
である。
[Means for Solving the Problems] FIG. 1 is a principle block diagram of the present invention. In the figure, reference numeral 10 denotes a coordinate calculation unit that calculates coordinates of a node on a display screen based on a weight assigned according to a type of a node constituting a tree structure based on an input command, and 11 denotes a coordinate calculation unit. A node management table that holds the calculated coordinate information of the node, 12 is a graphic library that holds the shape of the graphic representing the parent and child relationship between the node and the node, and 13 is based on the coordinates of the node calculated by the coordinate calculation unit 10, A drawing unit 14 draws a graphic representing a node on the display screen, and 14 is a display unit.

[作用] 座標算出部10は、第2図に示すようにノードの領域W
Biを、 WBi=(子ノードの重みwBi)× (親ノードの領域W)× 1/(親ノードの重みwA) (1) により求める。例えば、親ノードの重みが1+nで、子
ノードの重みがそれぞれ1とnであった場合には、親ノ
ードの幅Wを1/(1+n)とn/(1+n)にそれぞれ分
割する。ここで、子ノードWB1の重みを1と小さくとっ
ているのは、このノードはリーフノードとなっているた
めである。従って、子ノードの重みに応じて親の幅Wが
適切に分割され、表示スペースを効率よく用いてバラン
スのよい木構造の表示を行うことができる木構造表示装
置を提供することができる。
[Operation] The coordinate calculation unit 10 determines the region W of the node as shown in FIG.
Bi is determined by W Bi = (child node weight w Bi ) × (parent node area W) × 1 / (parent node weight w A ) (1) For example, when the weight of the parent node is 1 + n and the weights of the child nodes are 1 and n, respectively, the width W of the parent node is divided into 1 / (1 + n) and n / (1 + n). Here, the taking small as 1 the weight of the child nodes W B1, the node is because that is the leaf node. Therefore, it is possible to provide a tree structure display device in which the width W of the parent is appropriately divided according to the weight of the child node, and the display space can be efficiently used to display a well-balanced tree structure.

[実施例] 以下、図面を参照して本発明の実施例を詳細に説明す
る。
[Example] Hereinafter, an example of the present invention will be described in detail with reference to the drawings.

(1)ノードの属性 木構造を構成する各ノードは、属性として以下で述べ
る値を保持するものとする。
(1) Attributes of Nodes Each node constituting the tree structure holds a value described below as an attribute.

領域 各ノードは、領域として高さHと幅Wをもつ。ノード
は領域の中心(W/2,H)に配置される。
Region Each node has a height H and a width W as a region. The node is located at the center (W / 2, H) of the area.

重み ノードの種類に応じて、各ノードに割り当てられる領
域の相対値を重みと呼ぶ。ノードの種類がリーフノード
の場合は、子ノードを持たないため重みを1とし、ノー
ドの種類がルートノード又は中間ノードの場合には子ノ
ードを持つため、重みとしてn(n≧1)を与える。こ
れによりルートノード及び中間ノードは、リーフノード
のn倍の領域を持つことができる。
Weight The relative value of the area assigned to each node according to the type of node is called weight. If the node type is a leaf node, it has no child nodes, so the weight is set to 1. If the node type is a root node or an intermediate node, it has a child node, so n (n ≧ 1) is given as the weight. . Thus, the root node and the intermediate node can have an area n times as large as the leaf node.

(2)重みを用いたノードの配置法 動的に変化する木構造を効率よく表示画面上に表示す
るために、各ノードの持つ重みを用いてノードの配置を
行う。あるノードAの下に新たにi個の子ノードBi(i
≧1)が作成されると、以下の手順で行う子ノードの領
域を算出し配置を行う。
(2) Method of arranging nodes using weights In order to efficiently display a dynamically changing tree structure on a display screen, nodes are arranged using weights of each node. Under a certain node A, i child nodes Bi (i
When ≧ 1) is created, the area of the child node is calculated and arranged according to the following procedure.

全ての子ノードBiの持つ重みの総和を親ノードのAの
持つ重みwAとする。
The sum of weights of the all child nodes Bi and weight w A with the A parent node.

親ノードAの重みwAと各子ノードの持つ重みwBiの比
より、親ノードの領域の幅Wを分割して、子ノードの領
域の幅WBiとする(高さは一定)。子ノードの領域の算
出法については、第2図に示したとおりである。
Than the ratio of the weight w Bi having a weight w A and each child node of the parent node A, by dividing the width W of the region of the parent node, and the width W Bi area of child nodes (height constant). The method of calculating the child node area is as shown in FIG.

各ノードの重みは、ノードの種類に応じて割り付けら
れる。これにより、中間ノードは子ノードを持たないリ
ーフノードのn倍の領域を持つことになり、表示画面上
のスペースを効率よく利用することができる。
The weight of each node is assigned according to the type of the node. As a result, the intermediate node has an area n times as large as the leaf node having no child node, and the space on the display screen can be efficiently used.

第3図は重みを用いたノード配置法の説明図である。
表示画面の横方向の幅は2000とする。ルートノードであ
るノードは初期値として2000を持ち、ルートノード
は幅の中心に配置される。次に、ルートノードの子ノ
ードとして中間ノード,が作成されると、親ノード
であるノードの重みは子ノード,の重みの総和の
2nに等しくなる。従って、子ノード,の領域は
(1)式より定まる。
FIG. 3 is an explanatory diagram of a node arrangement method using weights.
The width of the display screen in the horizontal direction is 2000. The root node has an initial value of 2000, and the root node is located at the center of the width. Next, when an intermediate node is created as a child node of the root node, the weight of the parent node is the sum of the weights of the child nodes.
Equals 2n. Therefore, the area of the child node is determined by equation (1).

図の例では、ノードの幅が1000,ノードの幅が100
0となり、各子ノードの持つ領域の中心に配置される
(3図(a))。次に、ノードの下にリーフノードが
2つ,中間ノードが1つ生成されると、ノードの持つ
重みはn+2となり、領域の計算を行うと、ノード,
,はそれぞれ 1000/(n+2), 1000/(n+2), 1000n/(n+2) となり、親ノードの持つ領域を1:1:nに分割した領域と
なる(第3図(b))。
In the example shown, the node width is 1000 and the node width is 100
It becomes 0 and is arranged at the center of the area of each child node (FIG. 3A). Next, when two leaf nodes and one intermediate node are generated below the node, the weight of the node becomes n + 2.
, Are 1000 / (n + 2), 1000 / (n + 2), and 1000n / (n + 2), respectively, and are areas obtained by dividing the area of the parent node into 1: 1: n (FIG. 3 (b)).

ノードからはリーフノードが1個,中間ノードが1
個生成されたとすると、同様の操作により第3図(c)
に示すような配置となる。
One leaf node and one intermediate node from the node
Assuming that a number has been generated, FIG.
The arrangement is as shown in FIG.

第4図は重み付け法による領域分割のフローチャート
である。親ノードをA、子ノードをBiとし、ノードの持
つ重みと幅を定義する(S1)。次に、子ノードBiがリー
フノードであるかどうかチェックする(S2)。リーフノ
ードであった場合には、重みを1とし(S3)、中間ノー
ドであった場合には重みをnとする(S4)。次に、
(1)式に基づいてノードBiの領域の幅を算出し(S
5)、表示画面におけるノードBiの座標を座標算出部10
で算出する(S6)。表示座標の算出が終わったら、i=
i+1と更新して(S7)、次のノードの処理に入る(S
2)。
FIG. 4 is a flowchart of the area division by the weighting method. The parent node is A, the child node is Bi, and the weight and width of the node are defined (S1). Next, it is checked whether the child node Bi is a leaf node (S2). If it is a leaf node, the weight is set to 1 (S3), and if it is an intermediate node, the weight is set to n (S4). next,
The width of the area of the node Bi is calculated based on the equation (1) (S
5) The coordinates of the node Bi on the display screen are calculated by the coordinate calculation unit 10.
(S6). When the display coordinates have been calculated, i =
i + 1 is updated (S7), and processing of the next node is started (S7).
2).

(3)領域回収方式 (2)で説明した重み付けによる配置方法に基づい
て、子ノードの領域を算出した後で、子ノードを持たな
いリーフノードに割り当てた領域を回収すると、更に効
率のよい表示配置を行うことができる。第5図は、領域
回収方式を実現する配置の構成ブロック図である。第1
図と同一のものは、同一の符号を付して示す。図におい
て、15は木構造を構成するノードに割り当てられた表示
画面上の領域の中で、木構造の末端となるリーフノード
に割り当てられた領域を回収する領域回収部である。
(3) Area collection method If the area allocated to the leaf node having no child node is collected after calculating the area of the child node based on the weighting arrangement method described in (2), more efficient display is performed. An arrangement can be made. FIG. 5 is a configuration block diagram of an arrangement for realizing the area collection method. First
The same components as those in the drawings are denoted by the same reference numerals. In the figure, reference numeral 15 denotes an area collection unit that collects an area assigned to a leaf node at the end of the tree structure from an area on the display screen assigned to nodes forming the tree structure.

例えば、子ノードの領域を算出した後で、リーフノー
ドの重みを一時的に0として、再度各子ノードの重みの
総和を算出し、(1)式を用いて領域の再計算を行うの
である。これにより、子ノードの持つ中間ノードのみで
親ノードの持つ領域を分割することになり、結果として
リーフノードに割り当てた領域を回収することができ
る。
For example, after calculating the area of the child node, the weight of the leaf node is temporarily set to 0, the total sum of the weights of the child nodes is calculated again, and the area is recalculated by using the expression (1). . As a result, the area of the parent node is divided only by the intermediate node of the child node, and as a result, the area allocated to the leaf node can be collected.

第6図は領域回収方式の説明図である。同図(a)に
示す表示において、リーフノードであるノード,の
重みを0にする。中間ノードの重みはnであるので、
重みの再計算により、親ノードの持つ重みはnとな
り、(1)式で再計算を行うと、ノード,,の領
域はそれぞれ0,0,1000となる。これにより、リーフノー
ドに割り当てられた領域が回収され、ノードが親ノー
ドの領域をそのまま引き継ぐことになる。
FIG. 6 is an explanatory diagram of the area collection method. In the display shown in FIG. 9A, the weight of a node that is a leaf node is set to 0. Since the weight of the intermediate node is n,
By the recalculation of the weight, the weight of the parent node becomes n, and when the recalculation is performed by the equation (1), the areas of the nodes and become 0, 0 and 1000, respectively. As a result, the area allocated to the leaf node is collected, and the node takes over the area of the parent node as it is.

次に、ノードの下に同様に子ノードが作成される
と、ノード,,の持つ領域は、ノードの持つ領
域1000を1:1:nに分割した領域に配置される(第6図
(b)参照)。ここで、ノード,はリーフノードで
あるものとする。第3図(c)において、中間ノード
の下にリーフノードが2個、中間ノードが1個作成され
る場合には、領域回収を行わないと第7図(a)のよう
になるが、領域回収を行うと同図(b)に示すようにな
り、領域回収によって表示画面上でのリーフノードの下
の領域を有効に利用することができ、更に効率よく木構
造を表示することができる。
Next, when a child node is similarly created under the node, the area of the node, is arranged in an area obtained by dividing the area 1000 of the node into 1: 1: n (FIG. 6 (b )reference). Here, the node is assumed to be a leaf node. In FIG. 3 (c), if two leaf nodes and one intermediate node are created below the intermediate node, the area will be as shown in FIG. 7 (a) unless the area is collected. When the collection is performed, the result is as shown in FIG. 11B. The area collection allows the area below the leaf node on the display screen to be effectively used, and the tree structure can be displayed more efficiently.

第8図は領域回収方式のフローチャートである。ノー
ドがリーフノードであるかどうかチェックし(S1)、そ
うであった場合には重みを0にする(S2)。そして、リ
ーフノードであった場合には、新たなノードの重み付け
に基づいてノードBiの領域の再計算を行う(S3)。この
時の計算式は(1)式をそのまま用いる。再計算が終了
したら、i=i+1と1だけ更新して(S4)次のノード
の処理を行う。
FIG. 8 is a flowchart of the area collection method. It is checked whether the node is a leaf node (S1), and if so, the weight is set to 0 (S2). If it is a leaf node, the area of the node Bi is recalculated based on the weight of the new node (S3). At this time, the equation (1) is used as it is. When the recalculation is completed, i = i + 1 and 1 are updated (S4), and the processing of the next node is performed.

(4)再配置方式 ある中間ノードの下に次々に複数の子ノードが作成さ
れることによって、木構造が動的に変化するため、中間
ノードに割り当てた領域内に子ノードを表示できなくな
ることがある。第9図は子ノード同志が重なり合った例
を示す図である。そこで、子リード間の領域がある一定
の閾値以下になったら、木構造全体の重みを再計算し、
領域を分割し直す再配置を行うことにより、重なり合い
を除去することができる。
(4) Rearrangement method When a plurality of child nodes are created one after another under a certain intermediate node, the tree structure changes dynamically, so that the child node cannot be displayed in the area allocated to the intermediate node. There is. FIG. 9 is a diagram showing an example in which child nodes overlap each other. Therefore, when the area between child leads falls below a certain threshold, the weight of the entire tree structure is recalculated,
By performing rearrangement by re-dividing the region, the overlap can be removed.

第10図は、再配置方式を実現する装置の構成ブロック
図である。第5図と同一のものは、同一の符号を付して
示す。図において、16は木構造を構成するノードを表示
する際に、表示画面上でノード同志が重なるか否かを検
出する検出部、17は該検出部16の検出結果よりノードに
割り付ける重みをノードの種類と数に応じて再計算し、
ノードの再配置を行う再配置部である。
FIG. 10 is a configuration block diagram of an apparatus for realizing the rearrangement method. The same components as those in FIG. 5 are denoted by the same reference numerals. In the figure, reference numeral 16 denotes a detection unit for detecting whether or not nodes overlap each other on a display screen when displaying the nodes constituting the tree structure. Reference numeral 17 denotes a weight assigned to the node based on the detection result of the detection unit 16. Recalculate according to the type and number of
This is a rearrangement unit that rearranges nodes.

重みの再計算は、リーフノードを1、中間ノードをn
とすると、木構造の末端(下)から順に子ノードの重み
の総和を親ノードの重みにすることにより、最終的にル
ートノードの重みを算出することができる。第9図を例
にとって説明する。図では、中間ノードの重みを3、リ
ーフノードの重みを1にすることによって、ルートノー
ドの重みが32になることを示している(ルートノードの
重みは、現時点で木構造の末端に位置するノードの重み
の総和になる)。
The recalculation of the weight is 1 for the leaf node and n for the intermediate node.
Then, the weight of the root node can be finally calculated by using the sum of the weights of the child nodes in order from the end (below) of the tree structure as the weight of the parent node. This will be described with reference to FIG. The figure shows that by setting the weight of the intermediate node to 3 and the weight of the leaf node to 1, the weight of the root node becomes 32 (the weight of the root node is located at the end of the tree structure at this time. The sum of the node weights).

再計算された重みに基づいて、再度各ノードの領域を
再配置部17で分割し直すことにより、ノード数及びノー
ドの種類に応じて木構造を表示することができる。ま
た、領域の再計算において、(2),(3)で示した方
式を併用することにより、更に効率よく木構造を表示す
ることができる。第9図に示した木構造を再配置する
と、第11図に示すような表示が得られる。
By rearranging the area of each node again by the rearrangement unit 17 based on the recalculated weight, a tree structure can be displayed according to the number of nodes and the type of node. Also, in the recalculation of the area, the tree structure can be displayed more efficiently by using the methods shown in (2) and (3) together. When the tree structure shown in FIG. 9 is rearranged, a display as shown in FIG. 11 is obtained.

第12図は再配置方式のフローチャートである。表示画
面におけるノードの座標が分かっているものとする。先
ず 兄弟のノードのX座標−ノードのX座標|≧min が成立するかどうかチェックする(S1)。ここで、min
は閾値である。
FIG. 12 is a flowchart of the rearrangement method. It is assumed that the coordinates of the node on the display screen are known. First, it is checked whether or not X-coordinate of sibling node−X-coordinate of node | ≧ min holds (S1). Where min
Is a threshold.

兄弟のノードのX座標−ノードのX座標|≧min が成立する時には、ノードは隣同志が離れていることに
なる。これに対し、上式が成立しない時はノードは隣同
志重なり合っていることになる。この場合には、そのノ
ードがリーフノードであるかどうかチェックし(S2)、
そうである場合には1の重み付けを行う(S3)。そのノ
ードが中間ノードである場合には、子ノードであるかど
うかチェックする(S4)。
When the X coordinate of the sibling node−the X coordinate of the node | ≧ min holds, the nodes are adjacent to each other. On the other hand, when the above expression does not hold, the nodes overlap each other. In this case, check whether the node is a leaf node (S2),
If so, 1 is weighted (S3). If the node is an intermediate node, it is checked whether it is a child node (S4).

そして、子ノードがない場合には、その重さを3にす
る(S5)。子ノードがある場合には、子ノードを呼び出
し(S6)、呼び出した子ノードの重みの総和を求めて親
の重みを計算する(S7)。しかる後、領域分割による各
ノードの配置を行う(S8)。ここで、第10図の構成要素
について詳細に説明する。先ず、入力コマンドについて
説明する。木構造表示装置に入力するコマンドとして、
次のようなものがある。
If there is no child node, the weight is set to 3 (S5). If there is a child node, the child node is called (S6), and the sum of the weights of the called child nodes is calculated to calculate the parent weight (S7). Thereafter, each node is arranged by area division (S8). Here, the components in FIG. 10 will be described in detail. First, the input command will be described. As a command to be input to the tree structure display device,
There are the following:

create(Root Node) ルートノードを作成し、表示画面上にルートノードを
表示する。
create (Root Node) Creates a root node and displays the root node on the display screen.

add(Parent Node,Children−List) 指定された親ノードの下に複数の子ノードを作成し、
表示する。
add (Parent Node, Children-List) Creates multiple child nodes under the specified parent node,
indicate.

recal(再配置実行命令) 現在、ノード管理テーブル11に登録されている各ノー
ドの属性に基づいて木構造の再配置を行う。
recal (relocation execution instruction) The tree structure is relocated based on the attributes of each node registered in the node management table 11 at present.

ノード管理テーブル11は、木構造を構成する各ノード
の重み(weight),領域の幅(width),表示画面上の
位置(position)及び親子関係を保持する。第13図はノ
ード管理テーブル11の構成例を示す図である。ノード
(Node),重み(weight),領域の幅(width),表示
画面上の位置(position)及び親子関係(Parent)が登
録されている。
The node management table 11 stores the weight of each node constituting the tree structure, the width of the area, the position on the display screen, and the parent-child relationship. FIG. 13 is a diagram showing a configuration example of the node management table 11. Node (Node), weight (weight), area width (width), position on the display screen (position), and parent-child relationship (Parent) are registered.

次に、座標算出部10では、入力コマンドを受け取る
と、子ノードの持つ重みから親ノードの重みを算出す
る。算出した重みとノード管理テーブル11内の子ノード
の領域の幅の値を参照することによって、子ノードの持
つ領域の幅を計算し、子ノードの画面上に表示する座標
を算出する。算出した座標position(X,Y)と領域の幅w
idth,再計算された親ノードの重みは、領域回収部15に
送られる。また、算出した子ノードの座標position(X,
Y)は、ノード管理テーブル11に格納される。座標算出
部10は、以下に示す入力コマンドに応じて木構造中のノ
ードの表示画面上の座標を算出する。
Next, upon receiving the input command, the coordinate calculation unit 10 calculates the weight of the parent node from the weight of the child node. By referring to the calculated weight and the value of the area width of the child node in the node management table 11, the width of the area of the child node is calculated, and the coordinates to be displayed on the screen of the child node are calculated. The calculated coordinates position (X, Y) and the width w of the area
The idth and the recalculated parent node weight are sent to the area collection unit 15. In addition, the calculated coordinate position (X,
Y) is stored in the node management table 11. The coordinate calculation unit 10 calculates the coordinates of the nodes in the tree structure on the display screen according to the following input commands.

create(Root Node) ルートノードRoot Nodeを作成し、表示画面上のルー
トノードの座標を算出し、算出した座標情報を領域回収
部15に送る。また、ノード管理テーブル11にルートノー
ドRoot Nodeと算出した座標情報を登録する。
create (Root Node) Creates a root node Root Node, calculates the coordinates of the root node on the display screen, and sends the calculated coordinate information to the area collection unit 15. Further, the root node Root Node and the calculated coordinate information are registered in the node management table 11.

add(Parent Node,Children−List) 指定された親ノードParent Nodeの下に複数の子ノー
ドを作成するために、各ノードの座標を算出する。
add (Parent Node, Children-List) In order to create a plurality of child nodes under the specified parent node Parent Node, the coordinates of each node are calculated.

recal(再配置実行命令) 現在、ノード管理テーブル11に登録されている各ノー
ドの属性に基づいて座標を算出し、木構造の再配置を行
う。
recal (relocation execution command) The coordinates are calculated based on the attributes of each node currently registered in the node management table 11, and the tree structure is rearranged.

領域回収部15では、座標算出部10から親ノードの重み
weight,子ノードの持つ領域の幅widthと座標position
(X,Y)を受け取ると、描画部13に対して座標position
(X,Y)を送る。また、同時に前述した領域回収方式に
より、リーフノードに割り当てた領域を回収し、再計算
した子ノードの領域の幅widthをノード管理テーブル11
に格納する。
In the area collection unit 15, the weight of the parent node is calculated from the coordinate calculation unit 10.
weight, the width of the area of the child node width and coordinate position
When (X, Y) is received, the coordinate position
Send (X, Y). At the same time, the area allocated to the leaf node is collected by the above-described area collection method, and the width of the recalculated child node area is set to the node management table 11
To be stored.

検出部16では領域回収部15から送られてきた子ノード
の座標position(X,Y)から、子ノード間の間隔が閾値
以下であるかを判定し、閾値以下の場合には再配置17に
再配置実行命令を送る。子ノード間の間隔が閾値以上の
場合には、子ノードの座標情報を描画部13に送る。
The detection unit 16 determines from the coordinates position (X, Y) of the child node sent from the area collection unit 15 whether or not the interval between the child nodes is equal to or less than the threshold. Send a relocation execution instruction. If the interval between the child nodes is equal to or greater than the threshold, the coordinate information of the child nodes is sent to the drawing unit 13.

再配置部17は、検出部16から再配置実行命令が送られ
てくると、ノード管理テーブル11から各ノードの属性を
参照し、前述した再配置方式により、木構造の各ノード
の重みの再計算を行う。再計算された値は、ノード管理
テーブル11に格納され、座標算出部10に対してフィード
バックがかかる。座標算出部10では、更新された各ノー
ドの重みを参照することによって、領域の幅width,座標
position(X,Y)を再計算し、ノード管理テーブル11に
格納する。
When the relocation execution command is sent from the detection unit 16, the relocation unit 17 refers to the attribute of each node from the node management table 11, and reconfigures the weight of each node of the tree structure by the above-described relocation method. Perform calculations. The recalculated value is stored in the node management table 11 and fed back to the coordinate calculation unit 10. The coordinate calculation unit 10 refers to the updated weight of each node to obtain the width of the area,
The position (X, Y) is recalculated and stored in the node management table 11.

図形ライブラリ12には、木構造を構成する各ノード及
びノード間の親子関係を表示画面上にどのような図形と
して表示するかの定義が格納されている。第14図は図形
ライブラリ12の構成例を示す図である。ノード図形は木
構造のノードを表し、接続線はノード間の親子関係を表
す。ユーザの指定により、ノードを表すノード図形やノ
ード間の親子関係を表す接続線の種類を変更することが
できる。
The graphic library 12 stores the definition of what kind of graphic is to be displayed on the display screen for each node constituting the tree structure and the parent-child relationship between the nodes. FIG. 14 is a diagram showing a configuration example of the graphic library 12. The node graphic represents a tree-structured node, and the connection line represents a parent-child relationship between the nodes. By the user's designation, the type of the node graphic representing the node and the type of the connection line representing the parent-child relationship between the nodes can be changed.

描画部13は、検出部16からノードの座標position(X,
Y)を受け取ると、図形ライブラリ12に定義されたノー
ドの形状及びノード間の親子関係を表す接続線情報に基
づいて、表示画面上の指定された座標にノード図形と接
続線を表示する。また、再配置により既に表示されてい
るノードの座標が変更されると、現在ノードが表示され
ている位置から変更された座標値にノードの位置を移動
させる。
The drawing unit 13 sends a coordinate position (X,
When Y) is received, the node graphic and the connection line are displayed at the designated coordinates on the display screen based on the shape of the node defined in the graphic library 12 and the connection line information indicating the parent-child relationship between the nodes. When the coordinates of the already displayed node are changed by the rearrangement, the position of the node is moved from the position where the current node is displayed to the changed coordinate value.

[発明の効果] 以上、詳細に説明したように、本発明によれば動的に
変化する木構造を、表示スペースを効率よく用いてバラ
ンスのよい表示を行うことができる。
[Effects of the Invention] As described in detail above, according to the present invention, a dynamically changing tree structure can be displayed in a well-balanced manner by efficiently using a display space.

【図面の簡単な説明】[Brief description of the drawings]

第1図は本発明の原理ブロック図、 第2図はノードの重みによる領域分割を示す図、 第3図は重みを用いたノードの配置法の説明図、 第4図は重み付け法による領域分割のフローチャート、 第5図は領域回収方式を実現する装置の構成ブロック
図、 第6図は領域回収方式の説明図、 第7図は領域回収方式による配置結果を示す図、 第8図は領域回収方式のフローチャート、 第9図はノードの重なり合いを示す図、 第10図は再配置方式を実現する装置の構成ブロック図、 第11図は再配置方式に基づく表示例を示す図、 第12図は再配置方式のフローチャート、 第13図はノード管理テーブルの構成例を示す図、 第14図は図形ライブラリの構成例を示す図、 第15図は木構造の構成例を示す図、 第16図はトップダウン方式の説明図、 第17図は領域の等分割による配置例を示す図、 第18図は領域の等分割による配置例を示す図である。 第1図,第5図,第10図において、 10は座標算出部、 11はノード管理テーブル、 12は図形ライブラリ、 13は描画部、 14は表示部、 15は領域回収部、 16は検出部、 17は再配置部である。
FIG. 1 is a block diagram showing the principle of the present invention, FIG. 2 is a diagram showing region division by weight of nodes, FIG. 3 is an explanatory diagram of an arrangement method of nodes using weights, and FIG. 4 is region division by weighting. FIG. 5 is a block diagram showing a configuration of an apparatus for realizing the area collecting method, FIG. 6 is an explanatory diagram of the area collecting method, FIG. 7 is a view showing an arrangement result by the area collecting method, and FIG. 9 is a diagram showing node overlap, FIG. 10 is a block diagram showing a configuration of an apparatus for realizing the relocation method, FIG. 11 is a diagram showing a display example based on the relocation method, and FIG. FIG. 13 is a diagram illustrating a configuration example of a node management table, FIG. 14 is a diagram illustrating a configuration example of a graphic library, FIG. 15 is a diagram illustrating a configuration example of a tree structure, and FIG. Illustration of top-down method, Fig. 17 is area Diagram illustrating an arrangement example by equally dividing, FIG. 18 is a diagram showing an arrangement example by equally divided regions. 1, 5 and 10, reference numeral 10 denotes a coordinate calculation unit, 11 denotes a node management table, 12 denotes a graphic library, 13 denotes a drawing unit, 14 denotes a display unit, 15 denotes an area collection unit, and 16 denotes a detection unit. Reference numeral 17 denotes a rearrangement unit.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平1−177123(JP,A) 特開 平1−228064(JP,A) 特開 平1−215155(JP,A) 特開 昭63−211068(JP,A) 特開 昭61−290571(JP,A) 特開 昭62−14265(JP,A) 特開 昭58−223863(JP,A) 特開 平1−134674(JP,A) 特開 昭61−271578(JP,A) 特開 昭3−147184(JP,A) (58)調査した分野(Int.Cl.6,DB名) G06F 17/50 G06F 9/06 JICST(JOIS)────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-1-177123 (JP, A) JP-A 1-228064 (JP, A) JP-A 1-215155 (JP, A) JP-A-63-1988 211068 (JP, A) JP-A-61-290571 (JP, A) JP-A-62-14265 (JP, A) JP-A-58-223863 (JP, A) JP-A-1-134674 (JP, A) JP-A-61-271578 (JP, A) JP-A-3-147184 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G06F 17/50 G06F 9/06 JICST (JOIS)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】木構造を構成するあるノードの子ノードで
ある複数のノードに対してノードの種類に応じて割り当
てられている重みの比に基づいて、前記複数のノードの
各々に対して画面上で割り当てる領域の幅を算出し、割
り当てられた領域の中心を各ノードの座標とする座標算
出部と、 該座標算出部が算出したノードの座標情報を保持するノ
ード管理テーブルと、 ノード及びノード間の親子関係を表す図形の形状を保持
する図形ライブラリと、 前記座標算出部が算出したノードの座標に基づいて、表
示画面上にノードを表す図形を描画する描画部を具備し
た木構造表示装置。
1. A screen for each of a plurality of nodes constituting a tree structure, based on a ratio of weights assigned to the plurality of nodes as child nodes of the node according to the type of the node. A coordinate calculating unit that calculates the width of the area to be allocated above, and sets the center of the allocated area as the coordinates of each node; a node management table that holds the coordinate information of the node calculated by the coordinate calculating unit; A tree structure display device comprising: a graphic library that holds a shape of a graphic representing a parent-child relationship between the two; and a drawing unit that draws a graphic representing a node on a display screen based on the coordinates of the node calculated by the coordinate calculation unit. .
【請求項2】前記複数のノードのうち、リーフノードに
対する重みとして0を割り当てて中間ノードに対して割
り当てられる領域の幅を決定することでリーフノードに
割り当てられた領域を回収する領域回収部を設けて、 表示画面上のリーフノードの下のスペースを有効に利用
するようにした請求項1記載の木構造表示装置。
2. An area collecting unit for collecting an area allocated to a leaf node by allocating 0 as a weight to a leaf node and determining a width of an area allocated to an intermediate node among the plurality of nodes. The tree structure display device according to claim 1, wherein a space below the leaf node on the display screen is effectively used.
【請求項3】木構造を構成するノードを表示する際に、
表示画面上でノード同志が重なるか否かを検出する検出
部と、 該検出部の検出結果によりノードに割り付ける重みをノ
ードの種類と数に応じて再計算し、ノードの再配置を行
う再配置部を設けて、再配置により木構造を構成するノ
ードの表示画面上での重なりを防ぐようにした請求項2
記載の木構造表示装置。
3. Displaying nodes constituting a tree structure,
A detection unit for detecting whether or not nodes overlap on a display screen; and a relocation for recalculating weights to be assigned to the nodes based on the detection result of the detection unit according to the type and number of the nodes, and relocating the nodes. 3. A unit is provided to prevent nodes constituting a tree structure from being overlapped on a display screen by rearrangement.
The described tree structure display device.
JP2149365A 1990-06-07 1990-06-07 Wood structure display Expired - Fee Related JP2908524B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2149365A JP2908524B2 (en) 1990-06-07 1990-06-07 Wood structure display

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2149365A JP2908524B2 (en) 1990-06-07 1990-06-07 Wood structure display

Publications (2)

Publication Number Publication Date
JPH0442373A JPH0442373A (en) 1992-02-12
JP2908524B2 true JP2908524B2 (en) 1999-06-21

Family

ID=15473550

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2149365A Expired - Fee Related JP2908524B2 (en) 1990-06-07 1990-06-07 Wood structure display

Country Status (1)

Country Link
JP (1) JP2908524B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100453511C (en) 2005-03-28 2009-01-21 揖斐电株式会社 Honeycomb structure and seal material

Also Published As

Publication number Publication date
JPH0442373A (en) 1992-02-12

Similar Documents

Publication Publication Date Title
JP3329855B2 (en) Method for centering nodes in layered displays
US5696693A (en) Method for placing logic functions and cells in a logic design using floor planning by analogy
US7027052B1 (en) Treemap display with minimum cell size
JP3747404B2 (en) Graphics image creating apparatus, method and program thereof
EP1393255A2 (en) Text overlay for multi-dimensional construction project models
EP1691277A1 (en) Context menu providing dependency relationships for objects of different type
US20150022528A1 (en) Program information display system, method of displaying program information and computer-readable program product
JP3351213B2 (en) Learning menu control method
JP2908524B2 (en) Wood structure display
US8024158B2 (en) Management system and management method of CAD data used for a structural analysis
US8572504B1 (en) Determining comprehensibility of a graphical model in a graphical modeling environment
US9430232B2 (en) Program information generation system, method of generating program information, computer-readable program product, and program information display system
JPH04195467A (en) Tree structure chart display system
JPH0683608A (en) Program analysis support device
JPH11296571A (en) Interference checking device and its program recording medium
CN114997813A (en) Flow chart generation method, device, equipment and storage medium
US7712054B2 (en) Populating a table in a business application
JP2817917B2 (en) Solid CAD system
KR20190143595A (en) Method and system for optimizing concurrent schedule
JP2009282723A (en) Object editing device and program
Cámara Nebreda et al. Visual C++ shared memory (OpenMP) programming
JP2902856B2 (en) Data entry editing device
JP4064870B2 (en) Information processing apparatus, command execution method, and command execution program
JPH09198441A (en) Estimation device and estimation method
JP2902006B2 (en) Information presentation device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080402

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090402

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees