550 likes | 680 Views
表インターフェースのための 属性付きグラフとアルゴリズム Attribute Graphs and Their Algorithms for Table Interface. ○ 本橋友江 ( 早稲田大学 ) 土田賢省 ( 東洋大学 ) 夜久竹夫 ( 日本大学 ) WAAP 110 May.11 th , 2002. 1. Introduction. Position and Scope Data Processing Number Character Strings Picture : Tables, Charts, Graphs,
E N D
表インターフェースのための 属性付きグラフとアルゴリズムAttribute Graphs and Their Algorithms for Table Interface ○本橋友江(早稲田大学) 土田賢省 (東洋大学) 夜久竹夫 (日本大学) WAAP 110 May.11th, 2002
1. Introduction Position and Scope • Data Processing • Number • Character Strings • Picture : Tables, Charts, Graphs, Pictures • Scope • Tables in Spread Sheet or Word • Editing, Drawing, Calculation
Background • Effectiveness of Table Processing depends on RepresentationMethods of Table. • Known RepresentationMethods • Quad-Tree Representation For Search Algorithm • Rectangular Dual Graph Representation For Plant Layout
Problems In present table processing systems, • Editing operation often cause unexpected results. • We do not know which Representation Methods is applied. • Quad-tree Rep. and Rectangular Dual Graph Rep. are not for table editing and drawing.
Example(unexpected results) 2を指定 列挿入
Our History • Tree structured diagrams • Attributed marked trees • Combinatorial drawing algorithms • Modular forms • Attributed marked trees
Our Purpose • To propose Graph Representation Methods for tables in consideration of editing and drawing. • To investigate mathematical properties of the graphs in the representation methods. • To introduce typical algorithms on graphs and evaluate their complexity.
Our Results • A Graph representation method is proposed. • Properties of the graph is shown • |nodes|in the graph = |cells| in the table. • The degrees of nodes ≦ 8. • Algorithms for Wall move and Column Insertion are introduced, and runs in linear time.
Representation Method of tables • Quad-Tree Representation (for search) NE SE SW NW
Rectangular Dual Graph Representation (for プラントレイアウト) N 2 1 4 E 3 W 6 5 Horizontal edge Vertical edge S
2. Tabular Diagrams Definitions. • An (n, m)-table T is a set {(i, j) | 1≦i ≦n, 1 ≦ j ≦ m} (2,3)-table T (1,2) (1,3) (1,1) (2,1) (2,2) (2,3)
Definitions.For an (n,m)-table T, • A partialtableS is a subset of T s.t. S = {(i, j) | k ≦ i ≦ l, s ≦ j ≦ t}, 1 ≦ k ≦ l ≦n, 1 ≦ s ≦ t ≦m • A partition P {S1,S2,…,SN} is the set of partial tables s.t. S1∪S2∪…∪SN=T, Si∩Sj=φ partition P2 over T {(1,2)} {(1,3)} {(1,1), (2,1)} cell {(2,2), (2,3)}
Definitions.For an (n, m)-table T, • Row grid gr:{0, 1, 2, ..., n} →R 増 • Column grid gc • Grid g is a pair g=(gr, gc) • A Tabular Diagram D= (T, P, g). Tabular diagram D2=(T,P2,g2) 0 2 3 6 0 1 2
Definitions.For a cell c={(i, j) | k ≦ i ≦ l, s ≦ j ≦ t}, • north wall nw(c)=gr(k-1) • south wall,east wall, west wall 3 6 0 2 0 nw(c)=1 sw(c)=2 ew(c)=6ww(c)=2 1 c 2
Condition*. For a tabular diagram D=(T,P,G), • T is a (n,m)-table, where n,m≧3. • P has perimeter cells withwidth=0 or height=0 3 6 6 0 0 2 0 * * * * * 0 * * 1 * * 2 * * * * * 2 Perimeter cells
3 6 0 2 0 1 2 D2=(T,P2,g2) Examples. 3 6 6 0 0 2 0 * * * * * 0 * * 1 * * 2 * * * * * 2 D2*=(T*,P2*,g2*) satisfyingCondition* We consider tabular diagrams satisfying Condition*.
3. Graph Representation of Tables Operations on Editing Tables Wall moving Insertion/deletion/unification of Row/column/cell Requirements computational complexity Suitable correspondence
Definitions. • An attribute graph is a 6-tuple G=(V,E,L,λ,A,α), where • (V,E) : multi edge graph • L : label set for edges • λ : E→L is the label function • A is the set of attribute • α : V→A is the attribute map
Graph representation of tables A Tabular Diagram D=(T,P,g) is represented as an attribute graph GD=(VD,ED,L,λD,A,αD) • VDis identified by a partition P • node⇔cell. • We denote a node vc for the cell c,
L={enw,esw,eew,eww}, • Equal north wall, equal south wall, … • A = R4, • αD : VD →R4 are defined for vcby αD(vc)= (nw(c),sw(c),ew(c),ww(c)).
EDand λD : ED→L are defined by the Rules, Rule NIf cells c and d have the equal north wall, i.e. nw(c)=nw(d), and there is not such a cell between them, then an edge [vc, vd] is in ED,
λD [vc,vd] = enw. (equal north wall) The edge [vc,vd] is called a north wall edge. Rule S Rule E Rule W も同様 North wall edge South Wall Edge East Wall Edge West Wall Edge
a a va Examples. • An attribute graph is called a tessellation graph, if it represents a tabular diagram. vd d d c c vc
Properties Let GD be tessellation graph for a tabular diagram D of an (n,m)-table. Proposition 3.1 • Number of nodes in GD = number of cells in D
Proposition 3.2 • 2|ED| = 6(2n-4) + 6(2m-4) + 8k + 16. Where k is the number of non perimeter cells. • The degree of node in GD is at most 8.
MOVEEASTWALL Output GE=(VE,EE,L,λE,A,αE) 4.Algorithms Moved Wall δ c c E D Input GD=(VD,ED,L,λD,A,αD) Vc: a node δ≧0 : movement value
隣の列を West wall edge をたどりながら WestWall 変更 Node vc から East wall edge を上にたどる East wall edge をたどりながら East Wall 変更
Inserted Column • INSERTCOLUMN * * c * * * * E D Input GD, Vc : a node Output GE
* * * * * * 新しい列以東 Wall Move East を行う West wall edge をたどりながら、 1node ずつ追加 Edgeの更新 Node vc から West wall edge を上にたどる
For a tabular diagram D of (n,m)-table, Theorem4.1 • Algorithm MOVEEASTWALL runs in O(n) time.
Theorem 4.2 • Algorithm INSERTCOLUMN runs in O(nm) time. Remark • Algorithm INSERTCOLUMN visits only nodes which needs to change attributes.
5. Conclusion summary • An attribute Graph rep. method is proposed. • Properties of the graph is shown • |nodes|in the graph = |cells| in the table. • The degrees of nodes ≦ 8. • Algorithms for Wall move and Column Insertion runs in linear time.
Future Works • XML Viewer for tessellation graph. • Other Algorithms for Editing Commands • Practical Processing Systems • Graph Grammars for generate tessellation graphs • Conditions of tessellation graph
East wall and west wall coordinates are same of x and y West wall coordinates are same of x and y East wall coordinates are same of x and y
Representation of table by tessellation graphs (continued) • Peripheral cells and corresponding nodes • Cell a is represented by node • Ceiling of the cell a is represented by node z • Virtual cells x and y has no valid heights • Ceiling of the cell z is covered by cells x and y
a x y example z
General rules x y Cells x and y are of same ceiling coordinates x y Cells x and y are of same floor coordinates Cells x and y are of same ceiling and floor coordinates x y
a • Tables and tessellation graphs(3) • A large inner cell and corresponding nodes • The cell a is represented by the node x. x
y x North wall and south wall coordinates are same of x and y North wall coordinates are same of x and y south wall coordinates are same of x and y
East wall and west wall coordinates are same of x and y East wall coordinates are same of x and y West wall coordinates are same of x and y
4. CONCLUSION • Future Works • Other Methods • Relation to Mathematical Theory • Graph Grammars
2. Known Results 図表 • 昔から重要な視覚的な情報媒介 • コンピュータの分野でも欠かせない情報の伝達手段、思考ツール 表:様々な分野で、数多く考案・開発 • 相関表 生活行為相関表、リーグ戦表、九九表 • 行列表 生命表、曜日表、履修科目一覧表、万年暦 • 三角・多角表 要因分析表、P型相関表(五角形) • 配列 魔方陣、掛け算表(インド)、碁盤、ダイヤモンド・ゲーム ( 「図の体系」 出原他、日科技連より)
2. Known Results 表計算ソフト • 利用目的 • データ処理としての計算 • 表形式の分かり易い資料作成 • 多数開発 • データ処理として、EXCELやLotus • 資料作成として、Wordの表作成機能 • Gridy、Noel、SpreadCE、GS-Calc v5.0、・・・
1. Introduction 対象:資料作成のための表作成機能 主流:Word の表作成機能 問題点 表計算ソフトでは、編集結果の 予測がつかないことが起こる • 対象と操作に対応するデータ構造とその変換結果が明示されない • 利用者が思考錯誤して推測している
1. Introduction 本研究の目標 • 表に必要なデータをまとめ、形式的に定義 • 表データに、属性付きグラフの構造を持たせる手法の提案 • 表の編集操作のアルゴリズムをいくつか作成し、計算時間を評価
1. Introduction 本研究の目的 • 編集・描画を考慮した、表のデータ構造を提案 • 表を属性付きグラフを用いてあらわす手法の提案 • 表の編集操作のアルゴリズムをいくつか作成し、計算時間を評価
Example 1. The following figure denotes a support partition {{(1,1), (2,1)}, {(1, 2)}, {(1, 3)}, {(2, 2), (2, 3)}} over (2, 3)-support.
Applications of Tables • 計算幾何学、プラントレイアウト、 • 回路設計、結晶群と離散構造、 • ソフトウェア工学(仕様書、表エディタ)