JP3199166B2 - Network type data structure address assignment and access method - Google Patents

Network type data structure address assignment and access method

Info

Publication number
JP3199166B2
JP3199166B2 JP25099996A JP25099996A JP3199166B2 JP 3199166 B2 JP3199166 B2 JP 3199166B2 JP 25099996 A JP25099996 A JP 25099996A JP 25099996 A JP25099996 A JP 25099996A JP 3199166 B2 JP3199166 B2 JP 3199166B2
Authority
JP
Japan
Prior art keywords
data
data structure
array
network
address
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 - Lifetime
Application number
JP25099996A
Other languages
Japanese (ja)
Other versions
JPH1078911A (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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP25099996A priority Critical patent/JP3199166B2/en
Publication of JPH1078911A publication Critical patent/JPH1078911A/en
Application granted granted Critical
Publication of JP3199166B2 publication Critical patent/JP3199166B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータ分野
におけるオンラインヘルプ(On Line Help)
構成,日本語FEP(Front End Proces
sor)やIME(Input Method Edit
or),ディレクトリ構造(共有ディレクトリを含む)
の一元情報,ネットワーク構造網・プログラム構造網の
一元情報,ランダムウォークの一元情報,プロファイル
時の実行履歴,プログラムやドキュメントの版歴管理情
報や構成管理情報,リスト構造を応用する全てのプログ
ラム(LISPおよびProlog等のプログラム言語
への応用を含む),知識ベース,スケジューリングやワ
ークフロー,およびネットワーク型データベース(家系
図のような同等データ間に構造が存在するもの)等の
「親データを複数持ちうるデータ構造やリスト構造」の
代替として応用可能なネットワーク型データ構造のデー
タに関するファイルやメモリ等の記憶領域へのアドレス
の割り当てやアクセスを実現するためのネットワーク型
データ構造アドレス割当て・アクセス方式に関する。
お、ここで、本発明における「記憶領域へのアドレスの
割り当て」とは、当該記憶領域における実データ配列お
よび隣接関係配列(ネットワーク型データ構造のデータ
を表現するための両配列)の初期設定処理,一括結合処
理,および一括削除処理を意味する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to online help in the field of computers (On Line Help).
Composition, Japanese FEP (Front End Processes)
SOR) and IME (Input Method Edit)
or), directory structure (including shared directory)
Unified information, unified information of network structure network and program structure network, unified information of random walk, execution history at the time of profile, version management information and configuration management information of programs and documents, and all programs that apply list structure (LISP And data that can have multiple parent data, such as applications to programming languages such as Prolog), knowledge bases, scheduling and workflow, and network-type databases (structures that exist between equivalent data such as family tree). The present invention relates to a network type data structure address assignment / access method for realizing address assignment and access to a storage area such as a file or a memory relating to data of a network type data structure which can be applied as a substitute for the “structure or list structure”. What
Here, in the present invention, “address of storage area
“Assignment” refers to the actual data array and
And adjacency array (data of network type data structure)
Initialization processing of both arrays for expressing
Management and batch deletion processing.

【0002】[0002]

【従来の技術】本発明に関する従来の技術を示す文献と
しては、例えば、「情報数学セミナー,情報の構造
(上),データ構造とグラフアルゴリズム(浅野孝夫
著,日本評論社)」p122−p128がある。
2. Description of the Related Art Documents showing the prior art relating to the present invention include, for example, "Information Mathematics Seminar, Information Structure (above), Data Structure and Graph Algorithm (by Takao Asano, Nihon Hyoronsha)", p122-p128. is there.

【0003】以下、具体的に従来の技術について説明す
る。
[0003] Hereinafter, a conventional technique will be specifically described.

【0004】各種のデータ構造は、配列やリスト構造が
使われて表現されている。ここで、配列とは、固定長で
メモリ上で連続するデータ構造列をいう。また、リスト
構造とは、データとデータ間の隣接関係の情報(ポイン
タ)とを持つデータ構造をいう。例えば、配列は、深さ
が固定長の木構造データを実現するのに用いられる。一
方、リスト構造は、論理的に深さ制限のないm分木を中
心として環状データ構造や、ネットワーク(グラフの枝
や節点に重みまたは容量と呼ばれる量的な特性を付して
物理的な意味を与えたもの)のようなより複雑なデータ
構造を表現するのに用いられる。
[0004] Various data structures are expressed using an array or a list structure. Here, the array refers to a data structure sequence having a fixed length and continuous on a memory. Further, the list structure refers to a data structure having data and information (pointer) of the adjacent relationship between the data. For example, arrays are used to implement tree data with a fixed depth. On the other hand, the list structure is a circular data structure centered on an m-tree having no logically limited depth, or a network (physical meaning is given by attaching quantitative characteristics called weights or capacities to branches and nodes of a graph. ) To represent more complex data structures (e.g.

【0005】従来のデータ構造表現方式では、上述のよ
うに、ネットワーク型データ構造(ネットワークを表現
できるデータ構造)はリスト構造が使用されて実現され
ていた。
In the conventional data structure expression method, as described above, a network type data structure (a data structure capable of expressing a network) is realized using a list structure.

【0006】また、データベースに限っては、ネットワ
ーク型データ構造を実現するための言語としてNDLが
知られている。NDLは、NDLデータベース(ND
B)の定義と操作とを規定する言語である。これは、N
DBの論理的な記述を行うスキーマ定義言語と、NDB
のうちで利用者が使用可能な部分の論理的な記述を行う
サブスキーマ定義言語とから構成される(NDBのスキ
ーマ定義言語で定義された部分がスキーマであり、サブ
スキーマ定義言語で定義された部分がサブスキーマであ
る)。NDBでは、データ構成として、親子集合,再帰
親子集合,特異親子集合,一時親子集合等が存在し、ネ
ットワーク型データ構造の表現をこれらの形態に分類す
ることで実現している。この方式は、論理的で、ネット
ワーク型データ構造を実現してはいるが、それを利用し
たアルゴリズムの複雑さはさほど解消されておらず、そ
れ故、用途はデータベースに限られている。したがっ
て、以下の「発明が解決しようとする課題」では、この
方式については言及しない。
[0006] For a database only, NDL is known as a language for realizing a network-type data structure. NDL is an NDL database (ND
A language that defines the definition and operation of B). This is N
A schema definition language for logically describing a DB, and an NDB
And a sub-schema definition language that logically describes a part that can be used by the user (a part defined in the schema definition language of NDB is a schema, and is defined in the sub-schema definition language). Part is a subschema). In the NDB, a parent-child set, a recursive parent-child set, a singular parent-child set, a temporary parent-child set, and the like exist as data structures, and are realized by classifying the expression of the network type data structure into these forms. Although this scheme implements a logical, network-type data structure, the complexity of the algorithms that make use of it is not significantly reduced, and therefore its use is limited to databases. Therefore, the following “problem to be solved by the invention” does not refer to this method.

【0007】[0007]

【発明が解決しようとする課題】上述した従来の技術
(従来のデータ構造表現方式)には、以下に示すような
問題点があった。
The above-mentioned prior art (conventional data structure expression method) has the following problems.

【0008】第1の問題点は、「一般的なネットワーク
型データ構造の表現が複雑である」ということである。
また、それに伴って、「そのコーディング時の可読性
(ソース(ソースプログラム)の可読性)が悪くなる」
ということである。
The first problem is that the expression of a general network type data structure is complicated.
Along with that, "the readability at the time of coding (the readability of the source (source program)) deteriorates."
That's what it means.

【0009】このような問題点が存在する理由は、配列
の場合は関係データ型のように帰属関係は表現できるが
隣接関係は表現できないし、リスト構造の場合はあるデ
ータが複数の参照先データに連結している場合にその参
照先のアドレスのリストもリスト構造で表現せざるを得
ず、結果としてポインタのポインタでアドレスを取得し
参照先データを認識するからである。すなわち、ポイン
タを表す識別子は自由に決められるがその結果として、
それを複構造にして表現するため、ソースの可読性を著
しく害することとなるからである。なお、従来技術での
上記問題点の回避策としては、1つのデータ領域を可変
長として、データ以外に参照先のアドレスを続け、特定
コードを検出するとそのアドレスの列が終わるようなデ
ータ構造を採用する方式がある。
The reason for such a problem is that, in the case of an array, an affiliation relationship can be expressed like a relational data type, but an adjacency relationship cannot be expressed, and in the case of a list structure, certain data includes a plurality of reference data. This is because, in the case of linking to a list of addresses, the list of addresses of the reference destination must be represented by a list structure, and as a result, the address is acquired by the pointer of the pointer and the reference destination data is recognized. That is, the identifier representing the pointer can be freely determined, and as a result,
Because it is expressed in a multi-structure, the readability of the source is significantly impaired. As a countermeasure for the above-mentioned problem in the conventional technique, one data area is made to have a variable length, a data structure in which a reference address is continued in addition to data, and a row of the address ends when a specific code is detected. There is a method to adopt.

【0010】第2の問題点は、「ネットワーク型データ
構造の表現で記憶領域の浪費が余儀なくされる」という
ことである。
[0010] The second problem is that the expression of the network-type data structure necessitates waste of a storage area.

【0011】このような問題点が存在する理由を、分か
り易くするため、以下に集合の記号を使って説明する。
[0011] The reason why such a problem exists will be described below with reference to set symbols in order to make it easier to understand.

【0012】集合:Sに対して、Sの要素数を|S|と
する。また、データとデータ間の隣接関係とをグラフ:
Gの点と線との関係と捉え、データ(点)集合をVで表
し、データ間隣接関係(辺)集合をEとして表すことに
する(E⊆V×V)。
For the set S, the number of elements of S is | S |. Also graph the data and the adjacency between the data:
A set of data (points) is represented by V, and a set of adjacent relations (sides) between data is represented by E (E⊆V × V).

【0013】この時、グラフは、G=(V,E)と表さ
れる。
At this time, the graph is expressed as G = (V, E).

【0014】リスト構造の場合には、第1の問題点でも
触れたように1つのデータ間の関係を示すのに、2つの
ポインタ(ポインタ,およびポインタのポインタ)を使
っているので、その分の記憶領域を消費する(ポインタ
は|V|個で、ポインタのポインタは|E|個で、合計
|V|+|E|個のセルが必要)ためである(データ自
身を入れると2|V|+|E|個のセルが必要である。
ただし、この加法+は各データのサイズを考慮していな
いので厳密なものではない)。
In the case of the list structure, as mentioned in the first problem, two pointers (pointer and pointer pointer) are used to indicate the relationship between one piece of data. (The number of pointers is | V |, the number of pointer pointers is | E |, and a total of | V | + | E | cells is required). V | + | E | cells are required.
However, the addition + is not strict because the size of each data is not taken into account.)

【0015】また、1組のポインタのポインタでは単方
向しか認識できないので、双方向を認識するには、その
倍の記憶領域が必要となることも挙げられる。したがっ
て、第1の問題点の説明で言及した従来技術での第1の
問題点の回避策でも、単方向の場合にはセルは|V|+
|E|個で済むが、双方向の場合にはその分(|E|
個)だけ余計にデータ領域を取ることになる。
[0015] In addition, since a pointer of a set of pointers can recognize only one direction, a double storage area is required to recognize two directions. Therefore, even in the workaround for the first problem in the prior art referred to in the description of the first problem, the cell is | V | +
| E | pieces, but in the case of bidirectional (| E |
Data area.

【0016】本発明の目的は、上述の点に鑑み、ネット
ワークを表現する際に、単純で可読性に優れ、ソース記
述量でリスト構造を越えることがなく、かつ記憶量でリ
スト構造よりも小さくなるネットワーク型データ構造を
実現できるネットワーク型データ構造アドレス割当て・
アクセス方式を提供することにある。
In view of the above, it is an object of the present invention to express a network simply and with excellent readability, without exceeding the list structure in the amount of source description, and being smaller than the list structure in the amount of storage. Network type data structure address assignment that can realize network type data structure
To provide an access method.

【0017】これによって、ソース記述の生産性・保守
性を向上させることができ、記憶資源の消費を抑えてそ
の分だけ当該記憶資源の再利用が可能になる。
As a result, the productivity and maintainability of the source description can be improved, the consumption of storage resources can be suppressed, and the storage resources can be reused accordingly.

【0018】[0018]

【課題を解決するための手段】[Means for Solving the Problems]

【0019】(1) 本発明の理論的根拠 初めに、本発明のネットワーク型データ構造アドレス割
当て・アクセス方式によってネットワーク型データ構造
を実現(表現)する際の基本的な考え方について説明す
る。
(1) Theoretical Basis of the Present Invention First, the basic concept of implementing (expressing) a network-type data structure by the network-type data structure address assignment / access method of the present invention will be described.

【0020】まず、ネットワーク型データ構造をグラフ
(「ネットワーク」は「グラフ」に数値等の情報を含ん
だ概念である)として認識し、各データをグラフの点と
解釈し、データ間の隣接関係をグラフの辺と解釈する。
ここでは、グラフの辺は、データの参照元を開始点と
し、データの参照先を終了点とする有向辺とする。
First, a network-type data structure is recognized as a graph ("network" is a concept that includes information such as numerical values in "graph"), each data is interpreted as a point of the graph, and the adjacency between data is interpreted. Is interpreted as an edge of the graph.
Here, the side of the graph is a directed side having a data reference source as a start point and a data reference destination as an end point.

【0021】その上で、有向辺の情報を基に、データの
参照先および参照元を定義する。辺情報から、データの
参照元やデータの参照先等を一意に特定できれば、実デ
ータ以外にこの辺情報さえ持っていればデータアクセス
が可能となる。すなわち、従来の方式のように参照元の
データから始めるのではないので、参照元に関する情報
は記憶領域から省くことができる。同様のことが参照先
についてもいえ、実データの情報およびデータ間の隣接
関係の情報だけの記憶領域があれば実現できる。また、
本発明の方式は、データ間の隣接形態に依存していない
ので、ネットワークのような任意の構造のデータ構造を
設計することができる。
Then, a data reference destination and a reference source are defined based on the information on the directed side. If it is possible to uniquely specify the data reference source, the data reference destination, and the like from the side information, data access is possible if only this side information is present in addition to the actual data. That is, since the process does not start from the data of the reference source as in the conventional method, information on the reference source can be omitted from the storage area. The same can be said for the reference destination, but it can be realized if there is a storage area only for the information of the actual data and the information of the adjacency between the data. Also,
Since the method of the present invention does not depend on the form of adjacency between data, an arbitrary data structure such as a network can be designed.

【0022】次に、具体的に有向辺の定義方法やデータ
の参照元および参照先の特定方法を実現する。
Next, a method for defining a directed side and a method for specifying a data reference source and a reference destination are specifically realized.

【0023】実データの位置は相対アドレスで特定する
ものとする。これに対して、有向辺は、参照元データの
アドレスと参照先データのアドレスとから得られる対関
数の計算結果とする。ここで、対関数とは、次の定義を
充たす3つ1組の関数群(P,Q,R)をいう(式(1
a),(1b),および(1c)参照)。なお、以下の
説明で式(1a),(1b),および(1c)を統合的
に示す場合には、「式(1)」と表記する(他の式にお
いても同様)。
The position of actual data is specified by a relative address. On the other hand, the directed side is a calculation result of a paired function obtained from the address of the reference source data and the address of the reference destination data. Here, a pair function refers to a set of three functions (P, Q, R) satisfying the following definition (Equation (1)
a), (1b), and (1c)). In the following description, when Expressions (1a), (1b), and (1c) are collectively shown, they are expressed as “Expression (1)” (the same applies to other expressions).

【数1】 (Equation 1)

【0024】ここで、変数x,y,およびzに対して、
次の恒等関係が成立する(式(2a),(2b),およ
び(2c)参照)。
Here, for variables x, y and z,
The following identity relationship holds (see equations (2a), (2b), and (2c)).

【数2】 (Equation 2)

【0025】すなわち、z:x=1:多(1対多の対応
関係),およびz:y=1:多であるが、z:(x,
y)=1:1(1対1の対応関係)である。
That is, z: x = 1: many (one-to-many correspondence) and z: y = 1: many, but z: (x,
y) = 1: 1 (one-to-one correspondence).

【図1】FIG.

【0026】なお、対関数を表現するための関数および
変数を示す記号がP,Q,R,x,y,およびzに限ら
れるものでないことはいうまでもない。
It goes without saying that the symbols indicating functions and variables for expressing the paired function are not limited to P, Q, R, x, y and z.

【0027】以上により、次の定理(順序同型または単
調性を示す定理)を得る。
From the above, the following theorem (theorem showing order isomorphism or monotonicity) is obtained.

【0028】[定理] グラフG=(V,E)(V:点集合,E:辺集合),対
関数(P,Q,R)(式(1)に従う),整数の有限部
分集合M,N(|M|=|V|,|N|=|E|)とす
る。この時、点(Vの要素)を数値に1:1対応させる
全単射
[Theorem] Graph G = (V, E) (V: point set, E: edge set), pair function (P, Q, R) (according to equation (1)), finite subset M of integers, N (| M | = | V |, | N | = | E |). At this time, the bijection that makes the point (element of V) correspond to the numerical value 1: 1

【数3】 に対し、辺(Eの要素)を数値に1:1対応させるある
全単射
(Equation 3) Is a bijection that makes the edge (element of E) correspond to the numerical value 1: 1

【数4】 が存在して、次の関係を充たす。(Equation 4) Satisfies the following relationship:

【数5】 (Equation 5)

【0029】以降、この定理を用いて本発明の原理と実
現方式とについて述べる。
Hereinafter, the principle and implementation of the present invention will be described using this theorem.

【0030】一般に、辺は、始点Aおよび終点Bに対し
て(A,B)と表せる(図示的には、A→B)。ここ
で、このAおよびBを数値で一意に表し、x=Aおよび
y=Bと解釈して関数Rに代入し、z=C=R(A,
B)が得られると、式(2b)および(2c)より、C
はAに対してもBに対しても一意(A=P(C)および
B=Q(C))であり、Cを有向辺の情報、すなわち隣
接関係と一意に定義することができる。したがって、記
憶領域には、このCの情報だけ格納しておけばよいこと
になる。また、あらゆるグラフ(ネットワーク)は、点
とそれらを結ぶ辺とによって構成されるので、どのよう
な形態をしていても、辺の数だけでその構成を定義する
ことができる。このAおよびBを参照元および参照先の
各データのアドレスとすると、一意となるので、Cも一
意となる。しかも、AおよびB双方向で求めることが可
能である。
In general, a side can be expressed as (A, B) with respect to a start point A and an end point B (A → B in the figure). Here, A and B are uniquely represented by numerical values, interpreted as x = A and y = B and substituted into the function R, and z = C = R (A,
When B) is obtained, from equations (2b) and (2c), C
Is unique to both A and B (A = P (C) and B = Q (C)), and C can be uniquely defined as directed side information, that is, adjacent relation. Therefore, only the information of C needs to be stored in the storage area. Further, since every graph (network) is composed of points and edges connecting them, the configuration can be defined only by the number of edges in any form. If A and B are the addresses of the data of the reference source and the data of the reference destination, they are unique, and therefore C is also unique. In addition, it is possible to obtain the value in both A and B directions.

【0031】したがって、データの格納方法として、実
データを配列で定義し、データ間の隣接関係の全体をそ
の配列での相対(または絶対)アドレスを基に対関数で
求められたCの配列で表す。実データの全体をVで表
し、データ間の隣接関係の全体をEで表すと、実データ
の配列は|V|個のデータ領域を消費し、隣接関係の配
列は|E|個のデータ領域を消費する。
Therefore, as a method of storing data, real data is defined by an array, and the entire adjacency between data is expressed by a C array obtained by a pair function based on a relative (or absolute) address in the array. Represent. When the whole of the actual data is represented by V and the whole of the adjacency relation between the data is represented by E, the arrangement of the actual data consumes | V | data areas, and the arrangement of the adjacency relation is | E | Consume.

【0032】アルゴリズムとしては、場合に応じて次の
〜に示すように分類できる。
Algorithms can be classified as shown below in accordance with the case.

【0033】 全件検索(全ての実データの取出し) 全件検索の場合には、データ間隣接関係の配列は無視し
て実データを全件検索する。
Searching for All Items (Retrieval of All Actual Data) In the case of searching for all items, all of the actual data is searched for, ignoring the array of the adjacent relationship between data.

【0034】 一部検索 特定のデータからの全ての参照先の検索では、P(z)
およびQ(z)の逆関数は多価関数なので、全てのデー
タ間隣接関係から参照元が、その特定のデータとなる辺
情報(z)に対する式(1b)の解を探し、その解が参
照元と一致する場合には参照先を式(1c)で求める
(参照元の検索ではこの逆のアルゴリズムを用い、双方
向の場合には、式(1b)と式(1c)との扱いを適宜
変えればよい)。
Partial Search In a search for all reference destinations from specific data, P (z)
Since the inverse function of Q (z) and Q (z) is a multi-valued function, the reference source searches for the solution of the equation (1b) for the edge information (z) as the specific data from all the adjacencies between data, and the solution refers to the solution. In the case of matching with the source, the reference destination is obtained by Expression (1c). (The search of the reference source uses the reverse algorithm. In the case of bidirectional, the treatment of Expression (1b) and Expression (1c) is appropriately performed.) Just change it).

【0035】 一括結合 データ型が同種のネットワーク型データ構造の結合(A
PPEND)の場合には、
Batch Join Joining network-type data structures of the same data type (A
PPEND),

【数6】 と解釈する。したがって、一括結合では、単に隣接関係
の配列を結合すればよい(必要ならばG1 とG2 との間
の隣接関係も付け加える)。
(Equation 6) Interpret as Therefore, in the collective joining, it is sufficient to simply join the sequences of the adjacent relationship (if necessary, add the adjacent relationship between G 1 and G 2 ).

【0036】 一括削除 ネットワーク型データ構造からの一部(ネットワーク型
データ構造)の削除(DELETE)の場合には、
Batch Deletion In the case of deletion (DELETE) of a part (network type data structure) from the network type data structure,

【数7】 と解釈する。したがって、一括削除でも、単に隣接関係
の配列から該当部分G2の隣接関係を省けばよい(必要
ならば実データも削除する)。
(Equation 7) Interpret as Therefore, even in mass delete simply (also deleted actual data if necessary) to it saves the adjacency of the corresponding part G 2 from the sequence of adjacency.

【0037】なお、以上のアルゴリズムの分類の説明で
は、グラフをGi =(V(Gi ),E(Gi ))とした
(i:1または2,V(Gi ):グラフGi の点集合で
実質は実データ集合,E(Gi ):グラフGi の辺集合
で実質は隣接関係の集合)。上記のおよびで分かる
ように、ここでは、データはアドレスとしての存在であ
って、結合/削除時には実データの存否には無関係であ
る。
In the above description of the algorithm classification, the graph is set to G i = (V (G i ), E (G i )) (i: 1 or 2, V (G i ): graph G i Is a real data set, and E (G i ) is a set of edges of the graph G i and substantially a set of adjacency relations. As can be seen from the above and in the above, the data is present as an address and has nothing to do with the presence or absence of actual data at the time of combining / deleting.

【0038】対関数の種類は、1つではなく、関数Rの
定義域および値域が整数値であれば可算無限個にある。
本発明は、式(1)を充たすもの全てを対象としてお
り、その種類を規定するものではない(ただし、一般
に、アドレスは整数値なので、これを直接利用するため
整数値を関数Rの定義域とする)。
The number of pairs of functions is not one, but is infinitely countable if the domain and range of the function R are integer values.
The present invention is intended for all the cases satisfying the expression (1) and does not specify the type (however, in general, since the address is an integer value, an integer value is used to directly use this value. And).

【0039】1つの対関数が見つかると、それと同じ種
類の対関数が可算無限個存在する。それは、いくつかの
式変形によって、別の対関数が可算無限通りに変形可能
なためである。
When one pair function is found, there are countless infinite number of the same kind of pair functions. This is because another pair function can be transformed into countable infinity by some formula transformation.

【0040】(P,Q,R)を対関数として、次の式
(5)および式(6)に、その代表的な式変形例(式変
形1および式変形2)を示す。
Using (P, Q, R) as a pair function, the following formulas (5) and (6) show typical formula variants (formula variants 1 and 2).

【0041】[式変形1][Formula Modification 1]

【数8】 (Equation 8)

【0042】[式変形2][Equation 2]

【数9】 (Equation 9)

【0043】実際にこの方式で記憶領域を構成する際
に、1つ注意しなければならないことがある。
When actually configuring the storage area in this manner, there is a case where attention must be paid.

【0044】対関数は常に定義域を対(pair)とし
なければ関数Rの定義域を構成できないので、始点や終
点の情報は、対が存在していないことを認識できない。
これは、数学上は辺が存在していないので問題ないが、
アルゴリズム上は終わりを認識できないので問題とな
る。
Since the paired function cannot form the domain of the function R unless the domain is always paired, the information of the start point and the end point cannot recognize that the pair does not exist.
This is fine because there are no edges in mathematics,
The problem is that the end cannot be recognized by the algorithm.

【0045】この問題に対処するために、ある値:A
を、全ての点について対のない状態と定義し、その値A
が関数Rの値域からはずれるように工夫する。この工夫
を行う場合には、隣接関係の変域は式(7)のようにな
る。このように対関数を設定するためには、式(5)の
平行移動を応用すればよい。
To address this problem, a value: A
Is defined as an unpaired state for all points, and its value A
Is deviated from the range of the function R. In the case of performing this contrivance, the domain of the adjacent relationship is as shown in Expression (7). In order to set the pair function in this way, the parallel movement of Expression (5) may be applied.

【0046】[0046]

【数10】 (Equation 10)

【0047】Aは、あえて辺の情報として解釈すれば、
全ての点に隣接し、全ての点から隣接されている仮想的
な有向辺情報である。したがって、記憶領域の構成の手
順としては、適当な対関数を探し、Aの値を決め、式
(5)から式(7)を具体的に設定して設計できる。
If A is to be interpreted as side information,
It is virtual directed side information adjacent to all points and adjacent to all points. Therefore, as a procedure of the storage area configuration, an appropriate pair function is searched for, the value of A is determined, and the equations (5) to (7) can be specifically set and designed.

【0048】最後に、具体的な対関数の例を次の式
(8)および式(9)に示す。これらの2つの例におい
ては、共に、Aとなるべき値は0である。
Finally, specific examples of pair functions are shown in the following equations (8) and (9). In these two examples, the value to be A in both cases is 0.

【数11】 [Equation 11]

【数12】 (Equation 12)

【0049】ただし、式(8)および式(9)で、F
(z)は共に次の式(10)を充たす([X]は実数X
を超えない最大の整数を意味する)。
However, in equations (8) and (9), F
(Z) satisfies the following equation (10) ([X] is a real number X
Means the largest integer not exceeding).

【0050】 F(z)=[(1/2){1+(8z−7)1/2 }] (10)F (z) = [(1/2) {1+ (8z-7) 1/2 }] (10)

【0051】式(9)は、有名なカントール(Cant
or)の対関数を示す式である。
The equation (9) is expressed by the famous Cantor (Cant).
(or) is an expression showing a pair function.

【0052】(2) 本発明の構成 本発明のネットワーク型データ構造アドレス割当て・ア
クセス方式は、記憶領域におけるネットワーク型データ
構造のデータに関するアドレスの割り当てやアクセスを
実現するためのネットワーク型データ構造アドレス割当
て・アクセス方式において、実データ配列(ネットワー
クの点)と隣接関係配列(ネットワークの有向辺)とに
よってネットワーク型データ構造のデータを記憶する前
記記憶領域と、ネットワーク型データ構造のアドレス割
当て用の有向辺情報として使用され、変数x,y,およ
びzについてz=R(x,y),x=P(z),および
y=Q(z)を充たす関数P,Q,およびRからなる対
関数(P,Q,R)を示す対関数ルーチンと、前記対関
数ルーチンの対関数を用いて前記記憶領域におけるネッ
トワーク型データ構造のアドレスの割当てを行うアドレ
ス割当て手段と、前記対関数ルーチンの対関数を用いて
前記記憶領域におけるネットワーク型データ構造のデー
タへのアクセス(検索)を行うアクセス手段とを有す
る。
(2) Configuration of the present invention The network type data structure address assignment / access method of the present invention provides a network type data structure address assignment for realizing address assignment and access to data of a network type data structure in a storage area. In the access method, the storage area for storing the data of the network type data structure by the real data array (point of the network) and the adjacency relation array (directed side of the network), and a storage area for address assignment of the network type data structure. A pair consisting of functions P, Q, and R that is used as direction information and satisfies z = R (x, y), x = P (z), and y = Q (z) for variables x, y, and z A paired function routine indicating a function (P, Q, R) and the storage using a paired function of the paired function routine Address allocating means for allocating an address of a network-type data structure in an area, and access means for accessing (retrieving) data of the network-type data structure in the storage area using a pair function of the pair function routine. .

【0053】また、本発明のネットワーク型データ構造
アドレス割当て・アクセス方式では、記憶領域内の隣接
関係配列の終端記号を「対関数(P,Q,R)における
関数Rの値として取り得ない値」によって実現すること
が可能である。なお、本明細書では、「終端記号」は配
列の終端を意味する。
In the network type data structure address assignment / access method of the present invention, the terminal symbol of the adjacent relation array in the storage area is "a value that cannot be taken as the value of the function R in the pair function (P, Q, R)". It can be realized by: In this specification, the “terminal symbol” means the end of the array.

【0054】さらに、本発明のネットワーク型データ構
造アドレス割当て・アクセス方式では、対関数ルーチン
における対関数の例としてカントールの対関数を採用す
ることが可能である。
Further, in the network type data structure address assignment / access method of the present invention, Cantor's pair function can be adopted as an example of the pair function in the pair function routine.

【0055】[0055]

【発明の実施の形態】以下に、本発明の一般的な実施の
形態について、図面を参照しながら詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, general embodiments of the present invention will be described in detail with reference to the drawings.

【0056】図1(a)は、本発明のネットワーク型デ
ータ構造アドレス割当て・アクセス方式の実施の形態の
構成を示すブロック図である。
FIG. 1A is a block diagram showing the configuration of an embodiment of a network type data structure address assignment / access method according to the present invention.

【0057】このネットワーク型データ構造アドレス割
当て・アクセス方式は、実データ配列11および隣接関
係配列12を含む記憶領域10と、アドレス割当て手段
21およびアクセス手段22を含むデータ処理ルーチン
20と、対関数ルーチン30とを含んで構成されてい
る。なお、データ処理ルーチン20と対関数ルーチン3
0とによって、アプリケーション(アプリケーションプ
ログラム)が形成される。
The network type data structure address allocation / access method includes a storage area 10 including a real data array 11 and an adjacency array 12, a data processing routine 20 including an address allocation unit 21 and an access unit 22, a paired function routine. 30. The data processing routine 20 and the function routine 3
By 0, an application (application program) is formed.

【0058】図1(b)は、記憶領域10の構成を示す
図である。記憶領域10は、実データの集合Vの要素を
保持する実データ配列11と、ネットワーク型データ構
造の隣接関係の集合Eの要素を保持する隣接関係配列1
2とを含んで構成されている。なお、図1(b)に示す
実データ配列11および隣接関係配列12の内容は後述
する図7(a)および(b)の内容と対応している。こ
こで、実データ配列11および隣接関係配列12におけ
る相対アドレスの基底値は1であるものとする(通常は
0であるが、議論を容易に進めるためこのように設定す
る)。なお、相対アドレスの基底値を0に再設定するこ
とは、式(5)から容易である。
FIG. 1B is a diagram showing the configuration of the storage area 10. The storage area 10 includes a real data array 11 that holds elements of a set V of real data, and an adjacency relation array 1 that holds elements of a set E of adjacency of a network type data structure.
2 is included. The contents of the real data array 11 and the adjacency relationship array 12 shown in FIG. 1B correspond to the contents of FIGS. 7A and 7B described later. Here, it is assumed that the base value of the relative address in the real data array 11 and the adjacent relationship array 12 is 1 (usually 0, but this is set to facilitate discussion). Note that resetting the base value of the relative address to 0 is easy from equation (5).

【0059】記憶領域10は、アドレッシングが可能な
メモリやファイル等によって実現され、その種類を問わ
ない。実データ配列11は通常の配列で構わないが、隣
接関係配列12は、そのデータの終端を定義する上で特
有の工夫が必要となる。隣接関係は数値型データである
ので、特定の数値によって終端記号を実現する。例え
ば、上述の式(7)で定義される特定の値のA(関数R
の値として取り得ない値)を終端記号として使用して隣
接関係配列12のデータの終端を定義することができ
る。なお、実データ配列11の終端はNULL(空を示
す情報)によって定義されている。
The storage area 10 is realized by an addressable memory, file, or the like, and may be of any type. The actual data array 11 may be a normal array, but the adjacency relationship array 12 requires a special device in defining the end of the data. Since the adjacency is numerical data, the terminal symbol is realized by a specific numerical value. For example, A (function R) of a specific value defined by the above equation (7)
Can not be used as a terminal symbol, and the end of the data of the adjacent relation array 12 can be defined. The end of the real data array 11 is defined by NULL (information indicating empty).

【0060】図2(a)および(b)は、対関数ルーチ
ン30における対関数(P,Q,R)の具体例において
x,y,およびzの取り得る値を一覧表にして示す図で
ある。すなわち、横軸x=P(z)および縦軸y=Q
(z)に対するz=R(x,y)の値を表す図である。
このように、整数を定義域および値域とする対関数は、
値の並べ方を決めるだけで計算しないでも簡単に表で表
すことができる。
FIGS. 2A and 2B are tables showing possible values of x, y, and z in a specific example of the paired function (P, Q, R) in the paired function routine 30. is there. That is, the horizontal axis x = P (z) and the vertical axis y = Q
It is a figure showing the value of z = R (x, y) with respect to (z).
Thus, a paired function with integers as the domain and range is
You can easily represent a table without having to calculate it just by deciding how to arrange the values.

【0061】図2(a)に示す表は式(8)に基づいた
場合の一覧表であり、図2(b)に示す表は式(9)
(カントールの対関数)に基づいた場合の一覧表であ
る。
The table shown in FIG. 2A is a list based on the equation (8), and the table shown in FIG.
It is a list | wrist based on (Cantor's pair function).

【0062】なお、対関数は、図2(a)および(b)
に示すものに限られず、前述のように多数知られてお
り、それ毎に目的に適した固有のデータ体系を定義する
ことができる。
The paired functions are shown in FIGS. 2 (a) and 2 (b).
Not limited to the above, a large number is known as described above, and a unique data system suitable for the purpose can be defined for each of them.

【0063】式(8)に基づいてx=3,y=5に対す
るzの値を計算するとz=R(3,5)=9となる。図
2(a)の一覧表を見ると、x=3,y=5に対するz
の値は確かに9になっている(図2(a)における下線
が付されたx,y,およびzの値を参照のこと)。
When the value of z for x = 3, y = 5 is calculated based on equation (8), z = R (3,5) = 9. Looking at the list in FIG. 2A, it is found that z = 3 and y = 5.
Is 9 (see the underlined x, y, and z values in FIG. 2 (a)).

【0064】また、式(9)に基づいてx=3,y=5
に対するzの値を計算するとz=R(3,5)=24と
なる。図2(b)の一覧表を見ると、x=3,y=5に
対するzの値は確かに24になっている(図2(b)に
おける下線が付されたx,y,およびzの値を参照のこ
と)。
Further, based on the equation (9), x = 3, y = 5
Calculating the value of z with respect to gives z = R (3,5) = 24. Looking at the table of FIG. 2 (b), the value of z for x = 3, y = 5 is certainly 24 (the underlined x, y, and z of FIG. 2 (b)). See values).

【0065】逆に、z=7とすると、式(8)では、x
=P(7)=1,y=Q(7)=5を得る。これらの値
は、図2(a)の一覧表と対応させると、確かに一致し
ている(図2(a)における○で囲まれたx,y,およ
びzの値を参照のこと)。
Conversely, if z = 7, then in equation (8), x
= P (7) = 1, y = Q (7) = 5. If these values correspond to the list shown in FIG. 2A, they certainly match (see the values of x, y, and z surrounded by a circle in FIG. 2A).

【0066】また、z=7とすると、式(9)では、x
=P(7)=1,y=Q(7)=4を得る。これらの値
は、図2(b)の一覧表と対応させると、確かに一致し
ている(図2(b)における○で囲まれたx,y,およ
びzの値を参照のこと)。
If z = 7, then in equation (9), x
= P (7) = 1 and y = Q (7) = 4. If these values correspond to the list shown in FIG. 2B, they certainly match (see the values of x, y, and z surrounded by a circle in FIG. 2B).

【0067】図3〜図6は、データ処理ルーチン20の
処理アルゴリズムを場合分けして示した流れ図である。
これらの流れ図は、先に「課題を解決をするための手
段」で示した〜の4通りのアルゴリズムに対応して
いる。
FIGS. 3 to 6 are flowcharts showing the processing algorithm of the data processing routine 20 in different cases.
These flowcharts correspond to the four algorithms described above in the section "Means for Solving the Problem".

【0068】図3は、全件検索の場合の処理アルゴリズ
ムを示す流れ図である。この処理は、相対アドレス基底
値設定ステップ301と、実データ読込みステップ30
2と、実データ空判定ステップ303と、実データ取出
しステップ304と、相対アドレス増加ステップ305
とからなる。
FIG. 3 is a flowchart showing a processing algorithm in the case of all-item search. This processing includes a relative address base value setting step 301 and an actual data reading step 30.
2, an actual data empty determination step 303, an actual data extraction step 304, and a relative address increase step 305.
Consists of

【0069】図4は、一部検索の場合の処理アルゴリズ
ムを示す流れ図である。この処理は、相対アドレス基底
値設定ステップ401と、隣接関係読込みステップ40
2と、隣接関係A判定ステップ403と、x値設定ステ
ップ404と、x値参照元一致判定ステップ405と、
y値設定ステップ406と、実データ取出しステップ4
07と、相対アドレス増加ステップ408とからなる。
FIG. 4 is a flowchart showing a processing algorithm in the case of a partial search. This processing includes a relative address base value setting step 401 and an adjacent relation reading step 40.
2, an adjacency relationship A determination step 403, an x value setting step 404, an x value reference source match determination step 405,
y value setting step 406 and actual data extracting step 4
07 and a relative address increment step 408.

【0070】図5は、一括結合の場合の処理アルゴリズ
ムを示す流れ図である。この処理は、L設定ステップ5
01と、実データ追加ステップ502と、相対アドレス
基底値設定ステップ503と、G2隣接関係A判定ステ
ップ504と、z値設定ステップ505と、G1隣接関
係最後部追加ステップ506と、G1隣接関係最後部更
新ステップ507と、G1G2間隣接関係追加定義ステ
ップ508とからなる。
FIG. 5 is a flow chart showing a processing algorithm in the case of batch combination. This processing is performed in L setting step 5
01, actual data addition step 502, relative address base value setting step 503, G2 adjacency A determination step 504, z value setting step 505, G1 adjacency last addition step 506, and G1 adjacency last. An update step 507 and a G1G2 adjacency addition definition step 508 are included.

【0071】図6は、一括削除の場合の処理アルゴリズ
ムを示す流れ図である。この処理は、G2実データ削除
ステップ600と、相対アドレス基底値設定ステップ6
01と、G2隣接関係A判定ステップ602と、z値設
定ステップ603と、z′値設定ステップ604と、G
1隣接関係最後部A設定ステップ605と、zz′一致
判定ステップ606と、G1隣接関係置換ステップ60
7とからなる。
FIG. 6 is a flowchart showing a processing algorithm for batch deletion. This processing includes a G2 actual data deletion step 600 and a relative address base value setting step 6
01, G2 adjacency relation A determination step 602, z value setting step 603, z ′ value setting step 604, G
One adjacency last part A setting step 605, zz 'match determination step 606, and G1 adjacency replacement step 60
7

【0072】図7(a)および(b)は、本形態のネッ
トワーク型データ構造アドレス割当て・アクセス方式の
動作を説明するための図である。
FIGS. 7A and 7B are diagrams for explaining the operation of the network type data structure address assignment / access method according to the present embodiment.

【0073】次に、本形態のネットワーク型データ構造
アドレス割当て・アクセス方式の動作について説明す
る。
Next, the operation of the network type data structure address assignment / access method of this embodiment will be described.

【0074】第1に、アドレス割当て手段21による記
憶領域10の初期設定処理時の動作について説明する。
First, the operation during the initial setting processing of the storage area 10 by the address allocating means 21 will be described.

【0075】この場合には、アドレス割当て手段21
は、上述の「課題を解決するための手段」において説明
した理論的根拠に基づき、図1(b)に示すような実デ
ータ配列11および隣接関係配列12を記憶領域10に
設定する。
In this case, the address assigning means 21
Sets the real data array 11 and the adjacency relationship array 12 as shown in FIG. 1B in the storage area 10 based on the theoretical basis described in the above-mentioned “Means for Solving the Problem”.

【0076】例えば、図7(a)に示すような「点数|
V|=6,有向辺数|E|=7の有向グラフによって表
されるネットワーク型データ構造のデータ」を例として
挙げると、図1(b)に示すような内容の実データ配列
11および隣接関係配列12が設定される。初期化する
際に、実データ配列11の終端は空(NULL)によっ
て定義され、隣接関係配列12の終端は終端記号Aによ
って定義される。
For example, as shown in FIG.
V | = 6, the number of directed sides | E | = 7, a network-type data structure represented by a directed graph ", as an example, the actual data array 11 having the contents as shown in FIG. The relation array 12 is set. At the time of initialization, the end of the real data array 11 is defined by null (NULL), and the end of the adjacency array 12 is defined by the terminal symbol A.

【0077】なお、図1(b)中の隣接関係配列12に
格納される隣接関係を示す情報、例えば「α→β」は、
αからβへの隣接関係が存在することを示す情報であ
り、具体的には実データ配列11における実データαの
相対アドレスの「1」と実データβの相対アドレスの
「2」とをこの順序で示す情報が考えられる。
The information indicating the adjacent relationship stored in the adjacent relationship array 12 in FIG. 1B, for example, “α → β” is
This information indicates that there is an adjacency relationship between α and β. Specifically, the relative address “1” of the real data α and the relative address “2” of the real data β in the real data array 11 are Information shown in order is conceivable.

【0078】図7(b)には、Vに含まれる点γを隣接
関係の始点としている有向辺の終点の集合{ε,ζ}
と、点εを隣接関係の終点としている有向辺の始点の集
合{γ,δ}とについて、その式と部分グラフとを示し
た。上述のようにして設定された記憶領域10に対する
アクセスにおいては、このような集合の考え方が利用さ
れて探索が行われる(詳細な処理内容については後述す
る)。
FIG. 7 (b) shows a set {ε, {} of the end point of the directed side having the point γ included in V as the start point of the adjacent relation.
Expressions and subgraphs of the set {γ, δ} of the starting point of the directed side having the point ε as the end point of the adjacency are shown. In the access to the storage area 10 set as described above, a search is performed using the concept of such a set (detailed processing contents will be described later).

【0079】第2に、アクセス手段22による全件検索
処理時の動作について説明する。
Second, the operation at the time of the all-item search process by the access means 22 will be described.

【0080】この処理は、上述の「課題を解決するため
の手段」におけるのアルゴリズムに対応する。
This processing corresponds to the algorithm in the above-mentioned “means for solving the problem”.

【0081】この処理アルゴリズムは、全件の検索で実
データを全て検索しているだけのとるに足らない(tr
ivial)場合であり、隣接関係配列12を全く利用
しない。なお、この全件検索処理で取り出された検索結
果の実データは、データ処理ルーチン20のデータ処理
のステップで、表示や書き換えの処理の対象となる。
This processing algorithm is not enough to search all the actual data in all the searches (tr
ival) case, and does not use the adjacent relationship array 12 at all. It should be noted that the actual data of the search result extracted in the all-item search process is subjected to display and rewrite processing in the data processing step of the data processing routine 20.

【0082】全件検索処理時には、アクセス手段22
は、以下に示すような処理を行う(図3参照)。
At the time of all-item search processing, the access unit 22
Performs the following processing (see FIG. 3).

【0083】相対アドレス(i)に基底値(0や1。図
1(b)においては1)を設定する(ステップ30
1)。
A base value (0 or 1; 1 in FIG. 1B) is set in the relative address (i) (step 30).
1).

【0084】記憶領域10の実データ配列11のi番目
の実データ(実データ配列11の先頭領域の絶対アドレ
スと相対アドレスiとによって特定される実データ)を
読み(ステップ302)、当該実データが空(NUL
L)であるか否かを判定する(ステップ303)。
The i-th real data of the real data array 11 in the storage area 10 (the real data specified by the absolute address and the relative address i of the head area of the real data array 11) is read (step 302). Is empty (NUL
L) is determined (step 303).

【0085】ステップ303で「当該実データが空であ
る」と判定した場合には、実データを全て読み出したこ
とを認識し、処理を終了する。
If it is determined in step 303 that "the actual data is empty", it is recognized that all the actual data has been read, and the process is terminated.

【0086】ステップ303で「当該実データが空でな
い」と判定した場合には、当該実データを取り出し(ス
テップ304)、相対アドレス(i)の値に1を加算し
(ステップ305)、ステップ302に制御を戻す(i
の基底値が1の場合にはこの時点でループ回数はi回と
なっている)。
If it is determined in step 303 that the actual data is not empty, the actual data is taken out (step 304), and 1 is added to the value of the relative address (i) (step 305). (I)
If the base value of is 1, the number of loops is i at this time.)

【0087】なお、ステップ304で取り出された実デ
ータは、データ処理ルーチン20における所定のデータ
処理(データ参照やデータ更新等)の対象となる。
The actual data extracted in step 304 is subjected to predetermined data processing (data reference, data update, etc.) in the data processing routine 20.

【0088】第3に、アクセス手段22による一部検索
処理時の動作について説明する。
Third, the operation at the time of the partial search processing by the access means 22 will be described.

【0089】この処理は、上述の「課題を解決するため
の手段」におけるのアルゴリズムに対応する。
This processing corresponds to the algorithm in the above-mentioned “means for solving the problem”.

【0090】この処理アルゴリズムは、あるデータを参
照元として、またはあるデータを参照先として、隣接し
ているデータを検索するためのアルゴリズムである。こ
のアルゴリズムでは、与えられた隣接関係(z)から各
々x=P(z)およびy=Q(z)が計算され、このx
およびyが存在すれば、zが逆関数P-1(x)および逆
関数Q-1(y)の解の1つであると認識される(逆関数
の解は1つとは限らない)。このアルゴリズムを繰り返
すことで、直接は隣接していない点(データ)間でも、
数ステップで所望のデータにたどり着くことができる。
This processing algorithm is an algorithm for searching for adjacent data using certain data as a reference source or certain data as a reference destination. In this algorithm, x = P (z) and y = Q (z) are respectively calculated from a given adjacency (z), and this x
If y and y exist, it is recognized that z is one of the solutions of the inverse function P -1 (x) and the inverse function Q -1 (y) (the solution of the inverse function is not limited to one). By repeating this algorithm, even between points (data) that are not directly adjacent,
The desired data can be reached in a few steps.

【0091】一部検索処理時には、アクセス手段22
は、以下に示すような処理を行う(図4参照)。
At the time of the partial search processing, the access unit 22
Performs the following processing (see FIG. 4).

【0092】相対アドレス(i)に基底値を設定する
(ステップ401)。
The base value is set to the relative address (i) (step 401).

【0093】記憶領域10の隣接関係配列12のi番目
の隣接関係(隣接関係配列12の先頭領域の絶対アドレ
スと相対アドレスiとによって特定される隣接関係)を
読み(ステップ402)、当該隣接関係(i番目の隣接
関係)がA(終端記号)であるか否かを判定する(ステ
ップ403)。
The i-th adjacency of the adjacency array 12 of the storage area 10 (adjacency specified by the absolute address and the relative address i of the head area of the adjacency array 12) is read (step 402). It is determined whether (i-th adjacent relationship) is A (terminal symbol) (step 403).

【0094】ステップ403で「当該隣接関係がAであ
る」と判定した場合には、隣接関係がもう存在しないこ
とを認識し、処理を終了する。
If it is determined in step 403 that "the adjacent relationship is A", it is recognized that the adjacent relationship no longer exists, and the process is terminated.

【0095】ステップ403で「当該隣接関係がAでな
い」と判定した場合には、x=P(zi)とし(ステッ
プ404)、そのxが参照元と一致するか否かを判定す
る(ステップ405)。なお、ziは「i番目の隣接関
係」を示す。
If it is determined in step 403 that "the adjacent relationship is not A", x = P (zi) is set (step 404), and it is determined whether or not x matches the reference source (step 405). ). Note that zi indicates “i-th adjacent relationship”.

【0096】ステップ405で「xが参照元と一致す
る」と判定した場合には、y=Q(zi)を計算し(ス
テップ406)、相対アドレスがy番目の実データを実
データ配列11から取り出す(ステップ407)。
If it is determined in step 405 that "x matches the reference source", y = Q (zi) is calculated (step 406), and the real data having the yth relative address is stored in the real data array 11. Take it out (step 407).

【0097】ステップ405で「xが参照元と一致しな
い」と判定した場合またはステップ407の処理が終了
した場合には、隣接関係の相対アドレス(i)の値に1
を加算し(ステップ408)、ステップ402に制御を
戻す(iの基底値が1の場合にはこの時点でループ回数
はi回となっている)。
If it is determined in step 405 that “x does not match the reference source” or if the processing in step 407 is completed, the value of the relative address (i) of the adjacent relationship is set to 1
Is added (step 408), and control is returned to step 402 (if the base value of i is 1, the number of loops is i at this point).

【0098】第4に、アドレス割当て手段21による一
括結合処理時の動作について説明する。
Fourth, the operation of the address allocating means 21 at the time of the collective combining process will be described.

【0099】なお、この一括結合処理と次に説明する一
括削除処理とは、先にも言及したように、数学的には全
く同じ概念である。ただ、マシン(計算機)上での表現
の仕方が、アドレスという数学にはない概念のために、
両処理は異なったアルゴリズムとなっている(つまり配
列と集合の違いである)。別々のデータは別々のメモリ
に割り当てるが、1つのデータの変更/削除を行う場合
には、メモリ空間は1箇所しか使わない。つまり、結合
の場合には、メモリ空間が別々になって、それぞれ相対
アドレスが基底値から始まるが、削除の場合には、デー
タ構造が1つなのでアドレスは一連番号となっている。
したがって、両処理の処理手順は変わってしまう。
Note that the collective combining process and the collective deleting process described below have the same mathematical concept, as mentioned above. However, because the way of expression on the machine (computer) is not a mathematical concept of address,
Both processes have different algorithms (that is, the difference between arrays and sets). Different data is allocated to different memories, but when changing / deleting one data, only one memory space is used. In other words, in the case of connection, the memory space is separated, and the relative address starts from the base value. However, in the case of deletion, the address is a serial number since there is only one data structure.
Therefore, the processing procedure of both processes is changed.

【0100】さて、一括結合のアルゴリズムは、まず2
つのネットワーク型データ構造の実データを連結した後
に、連結した側(G2とする)のデータの相対アドレス
が変わることに鑑み、その隣接関係を計算し直し、連結
された側(G1とする)の隣接関係に追加していく。結
合した2つのデータの間にさらに隣接関係を定義する場
合には、その追加定義を最後に行う。
Now, the algorithm of the batch join is as follows.
After linking the real data of the two network-type data structures, in consideration of the fact that the relative address of the data on the linking side (G2) changes, the adjacent relationship is recalculated, and the data on the linking side (G1) is recalculated. Add to the adjacency. When an adjacency relationship is further defined between two combined data, the additional definition is performed last.

【0101】すなわち、アドレス割当て手段21は、以
下に示すような処理を行う(図5参照)。
That is, the address allocating means 21 performs the following processing (see FIG. 5).

【0102】LにG1の最後部の相対アドレスを設定し
(ステップ501)、G2の実データをG1の実データ
に追加し(ステップ502)、相対アドレス(i)に基
底値を設定する(ステップ503)。
The last relative address of G1 is set to L (step 501), the actual data of G2 is added to the actual data of G1 (step 502), and the base value is set to the relative address (i) (step 502). 503).

【0103】次に、G2のi番目の隣接関係がAである
か否かを判定する(ステップ504)。
Next, it is determined whether or not the i-th adjacent relationship of G2 is A (step 504).

【0104】ステップ504で「G2のi番目の隣接関
係がAでない」と判定した場合には、当該隣接関係の値
をzに設定し(ステップ505)、R(P(z)+L,
Q(z)+L)をG1の隣接関係の最後部に追加し(ス
テップ506)、G1の隣接関係の最後部を更新し(ス
テップ507)、ステップ504に制御を戻す(iの基
底値が1の場合にはこの時点でループ回数はi回となっ
ている)。なお、ステップ507でG1の隣接関係の最
後部を更新しても、Lの値は不変とする。
If it is determined in step 504 that the “i-th adjacent relationship of G2 is not A”, the value of the adjacent relationship is set to z (step 505), and R (P (z) + L,
Q (z) + L) is added to the last part of the adjacency of G1 (step 506), the last part of the adjacency of G1 is updated (step 507), and control is returned to step 504 (the base value of i is 1). In this case, the number of loops is i at this point.) Even if the last part of the adjacent relationship of G1 is updated in step 507, the value of L remains unchanged.

【0105】ステップ504で「G2のi番目の隣接関
係がAである」と判定した場合には、G1とG2との間
の隣接関係を追加定義し(ステップ508)、処理を終
了する。
If it is determined in step 504 that the “i-th adjacent relationship of G2 is A”, the adjacent relationship between G1 and G2 is additionally defined (step 508), and the process is terminated.

【0106】第5に、アドレス割当て手段21による一
括削除処理時の動作について説明する。
Fifth, the operation at the time of the batch deletion process by the address allocating means 21 will be described.

【0107】一括削除のアルゴリズムでは、まず、削除
する側(G2とする)の実データが削除される側(G1
とする)の実データから削除される(図6ステップ60
0参照)。しかし、基本的に隣接関係を削除すれば、そ
の隣接関係でのアクセスはできなくなるので、ステップ
600の削除処理は絶対に必要なプロセスというわけで
はない。実データを削除せずに残しておいた方が後で再
利用が可能になるという点では当該削除処理はない方が
よいともいえるが、何度も結合削除を行う状況では実デ
ータを残しておくと実データの終端判定(図3ステップ
303参照)に失敗するので、当該削除処理はあった方
が適切である。また、場合によって、削除したい隣接関
係だけが分かっている時には、実データを簡単に削除す
ることはできない(必要なら、削除される隣接関係か
ら、完全に切り離されるデータを判定しなければならな
い。このアルゴリズムは図6中にはない)。この点から
も、このステップ600の削除処理はなくてもよい処理
(任意的な処理)といえる(この処理を「ステップ60
1」ではなく「ステップ600」で表しているのは、上
述の観点に基づいている)。
In the batch deletion algorithm, first, the actual data to be deleted (G2) is deleted (G1).
(Step 60 in FIG. 6)
0). However, basically, if the adjacent relationship is deleted, access using the adjacent relationship becomes impossible, so that the deletion process of step 600 is not an absolutely necessary process. It can be said that it is better not to perform the deletion process in that it is better to leave the actual data without deleting it, so that it can be reused later. In this case, the end determination of the actual data (see step 303 in FIG. 3) fails. Therefore, it is more appropriate to perform the deletion process. Also, in some cases, when only the adjacency to be deleted is known, the actual data cannot be easily deleted (if necessary, it is necessary to determine data that is completely separated from the adjacency to be deleted. The algorithm is not in FIG. 6). From this point as well, it can be said that the deletion processing in step 600 is not necessary (optional processing) (this processing is referred to as “step 60”).
The fact that “Step 600” is used instead of “1” is based on the above-mentioned viewpoint).

【0108】当該一括削除のアルゴリズムでは、任意的
な処理である上記の実データの削除処理の後に、隣接関
係が削除され、隣接関係が1つ減る度に隣接関係の最後
部のデータを1つ減らす処理が行われる。
In the batch deletion algorithm, the adjacency relationship is deleted after the above-mentioned actual data deletion process, which is an optional process, and one data at the end of the adjacency is deleted every time the adjacency relationship is reduced by one. Reduction processing is performed.

【0109】すなわち、ネットワーク型データ構造アド
レス割当て手段21は、以下に示すような処理を行う
(図6参照)。
That is, the network type data structure address assigning means 21 performs the following processing (see FIG. 6).

【0110】上述のように任意的な処理として、G2の
実データをG1の実データから削除する(ステップ60
0)。
As described above, as an optional process, the actual data of G2 is deleted from the actual data of G1 (step 60).
0).

【0111】相対アドレス(i)に基底値を設定する
(ステップ601)。
The base value is set to the relative address (i) (step 601).

【0112】次に、G2のi番目の隣接関係がAである
か否かを判定する(ステップ602)。
Next, it is determined whether or not the i-th adjacent relationship of G2 is A (step 602).

【0113】ステップ602で「G2のi番目の隣接関
係がAでない」と判定した場合には、当該隣接関係の値
をzに設定し(ステップ603)、G1の隣接関係の最
後部の値をz′に設定し(ステップ604)、G1の隣
接関係の最後部にAを設定し(ステップ605)、zと
z′とが一致するか否かを判定する(ステップ60
6)。
If it is determined in step 602 that "the i-th adjacent relation of G2 is not A", the value of the adjacent relation is set to z (step 603), and the value of the last part of the adjacent relation of G1 is changed to z. z 'is set (step 604), A is set at the end of the adjacency of G1 (step 605), and it is determined whether z and z' match (step 60).
6).

【0114】ステップ606で「zとz′とが一致しな
い」と判定した場合には、G1の隣接関係のzのセル
(隣接関係配列12の配列要素)をz′で置換し(ステ
ップ607)、ステップ602に制御を戻す(iの基底
値が1の場合にはこの時点でループ回数はi回となって
いる)。
If it is determined in step 606 that "z and z 'do not match", the cell of z having an adjacent relationship of G1 (the array element of the adjacent relationship array 12) is replaced with z' (step 607). Then, control is returned to step 602 (when the base value of i is 1, the number of loops is i at this point).

【0115】ステップ606で「zとz′とが一致す
る」と判定した場合またはステップ607の処理が終了
した場合には、ステップ602に制御を戻す(iの基底
値が1の場合にはこの時点でループ回数はi回となって
いる)。
When it is determined in step 606 that “z and z ′ match” or when the processing of step 607 is completed, the control is returned to step 602 (if the base value of i is 1, this control is performed). At this point, the number of loops is i).

【0116】ステップ602で「G2のi番目の隣接関
係がAである」と判定した場合には、処理を終了する。
If it is determined in step 602 that "the i-th adjacent relationship of G2 is A", the process is terminated.

【0117】[0117]

【実施例】以下に、本発明のネットワーク型データ構造
アドレス割当て・アクセス方式の具体的な実施例につい
て説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A specific embodiment of the network type data structure address assignment / access method of the present invention will be described below.

【0118】(1) 第1の実施例 図8(a)および(b)は、家系図を示すネットワーク
型データ構造のデータを従来技術(リスト構造による方
式)と本発明(対関数を利用する方式)とで記述したコ
ーディングの具体例(C言語による記述例)を示す図で
ある。
(1) First Embodiment FIGS. 8 (a) and 8 (b) show data of a network type data structure showing a family tree using a conventional technique (a method based on a list structure) and the present invention (using a pair function). FIG. 7 is a diagram showing a specific example of coding described in (method) (example of description in C language).

【0119】この図の例は、「データ量を最適化するだ
けでなく、記述量を抑え、可読性をよくすることができ
る」という本発明の効果を示すためのものである。
The example of this figure is intended to show the effect of the present invention that not only the amount of data can be optimized, but also the amount of description can be suppressed and readability can be improved.

【0120】なお、ここでは対関数を(P,Q,R)で
はなく、(fro,to,link)として表現した。
すなわち、次の式(11)が成立する。
Here, the pair function is expressed not as (P, Q, R) but as (fro, to, link).
That is, the following equation (11) holds.

【数13】 (Equation 13)

【0121】図8で記述される家系図では、各個人を対
等な存在として表現し、親子関係という構造を表現する
必要がある。この家系図は、次のおよびに示す2つ
の要件を充たしていなければならない。 第1要件:ある個人から見て、(生みの)親は常に
2人であり、子供は0人以上である。 第2要件:兄弟間で子供は0人である。
In the family tree described in FIG. 8, it is necessary to express each individual as being equal and to express a structure called parent-child relationship. This family tree must meet the following two requirements: First requirement: From the viewpoint of an individual, there are always two (born) parents and zero or more children. Second requirement: There are no children among siblings.

【0122】逆に、これらの要件は、ネットワーク構成
上の知識として利用することができる。この家系図の構
造,およびこの家系図によってある人物bの任意のいと
こ1人を探すプログラムを、リスト構造による方式と本
発明の方式とのそれぞれに基づいてC言語で記述したソ
ースが、図8(a)および(b)に示すコーディング例
である。
On the contrary, these requirements can be used as knowledge on the network configuration. FIG. 8 shows a source describing the structure of this family tree and a program for searching for an arbitrary cousin of a certain person b based on the family tree based on the list structure method and the present invention method. It is a coding example shown to (a) and (b).

【0123】従来の方式(図8(a))では、2種類の
リスト構造を用いて家系図のデータ構造が実現されてい
る。リスト構造は、親に対する条件と子供に対する条件
とが上記要件より変わってくるので2種類に分けられて
いる。
In the conventional system (FIG. 8A), the data structure of the family tree is realized using two types of list structures. The list structure is divided into two types because the condition for the parent and the condition for the child are different from the above requirements.

【0124】これに対して、本発明の方式(図8
(b))では親に対する条件も、子供に対する条件も同
じようにとらえることができる。したがって、データ構
造も1つに統一できる。
On the other hand, the method of the present invention (FIG. 8)
In (b)), the condition for the parent and the condition for the child can be grasped in the same way. Therefore, the data structure can be unified into one.

【0125】なお、図8(a)および(b)では、処理
の流れを明確にするため、子供の数が0人である場合は
考慮していない。
In FIGS. 8A and 8B, the case where the number of children is 0 is not considered in order to clarify the processing flow.

【0126】図8(a)と図8(b)とを比較してみる
と、記述量上は、共に5箇所のアクセスで求めるデータ
を得ている。このように実質的な探索ステップが変わる
わけではないので、記述量はリスト構造による方式と対
関数を利用する方式とで基本的に変わることはない。
When comparing FIG. 8A and FIG. 8B, in terms of the amount of description, data obtained by accessing five locations is obtained. As described above, since the substantial search step does not change, the amount of description does not basically change between the method using the list structure and the method using the pair function.

【0127】しかし、図8(a)では、プログラムの構
造が単に1つ1つ指定されたポインタをたどっているだ
けであり探索の処理内容は非常に分かりにくいが、図8
(b)では、アクセス方式が「link」と「toおよ
びfro」との2種類からなるため探索形態が意味的
(方向性)であり、しかもプログラムの構造もその意味
に即したより自然な形となっている。さらに、親も子も
同じような考え方で探索できるので個別のルーチンを用
意する必要がない。つまり、図8(b)のソース可読性
が高いことが分かる。
However, in FIG. 8A, the structure of the program merely follows the designated pointer one by one, and the content of the search processing is very difficult to understand.
In (b), the search method is semantic (directivity) because the access method is composed of two types of “link” and “to and fro”, and the structure of the program is more natural according to the meaning. It has become. Furthermore, since the parent and the child can search in the same way, there is no need to prepare a separate routine. That is, it can be seen that the source readability of FIG. 8B is high.

【0128】なお、ここでは記憶量が同じになるように
した。つまり図8(a)では、INFO1は|V|個で
あり、INFO2は|E|個になっているが、これは上
記の2つの条件(第1要件および第2要件)を知識とし
て構造に取り組んだため可能になったのであり、一般に
はINFO1からの自身への直接の参照(oya1,o
ya2によるリスト構造)がなくなり、INFO2への
参照に統一されるので、参照を重複して管理することに
なり、結果的に記憶量は|V|+2|E|だけ必要とな
る。また、図8(a)の方式では、任意ではなく、全て
のいとこを探索することになるとデータ名でアクセスし
ていることもあり、煩雑なプログラム構造になることが
予想される。ちなみに、図8(b)では、MAXSIZ
Eを定義しているが、これは単にループ処理を分かり易
くするためであって、集合Vおよび集合Eの総量を制限
することに何の意味もない。
Note that the storage amounts are set to be the same here. In other words, in FIG. 8A, INFO1 is | V |, and INFO2 is | E |. This is because the above two conditions (the first requirement and the second requirement) are used as knowledge in the structure. This has been made possible by addressing the problem, and in general, a direct reference from INFO1 to itself (oya1, o
The list structure by ya2) is eliminated, and the reference to INFO2 is unified. Therefore, the reference is managed redundantly, and as a result, the storage amount is only | V | +2 | E |. In the method shown in FIG. 8A, the search is not arbitrary, and if all cousins are searched, the access may be made using data names, which may lead to a complicated program structure. Incidentally, in FIG. 8B, MAXSIZ
Although E is defined, it is merely to make the loop processing easier to understand, and there is no meaning in limiting the total amount of the set V and the set E.

【0129】(2) 第2の実施例 図9は、データ処理ルーチン20の一部のルーチンをC
言語を用いて記述した例を示す図である(このようなル
ーチンは、性格上、組み込みルーチンとして扱われるべ
きであるが、既存の言語には組み込まれていないのでこ
こに記述する)。
(2) Second Embodiment FIG. 9 shows a part of the data processing routine 20 as a C routine.
FIG. 4 is a diagram showing an example described using a language (such a routine should be treated as a built-in routine due to its characteristics, but is described here because it is not built into an existing language).

【0130】このルーチンは、平方根整数部計算ルーチ
ンと、対関数を利用した一括結合処理ルーチン(図5参
照)とを記述している。
This routine describes a square root integer part calculation routine and a batch combination processing routine using a pair function (see FIG. 5).

【0131】なお、ここでも、対関数は、(fro,t
o,link)で表現されている。
Note that, again, the pair function is (fro, t
o, link).

【0132】(3) 第3の実施例 図10および図11は、ジョブスケジューリングを示す
ネットワーク型データ構造のデータを処理対象とする本
発明のネットワーク型データ構造アドレス割当て・アク
セス方式の実施例を説明するための図である。
(3) Third Embodiment FIGS. 10 and 11 illustrate an embodiment of a network type data structure address assignment / access method according to the present invention for processing data of a network type data structure indicating job scheduling. FIG.

【0133】図10は、A=0として式(8)および式
(9)を基にして構成した記憶領域10の一例を示す図
である。ここでも、図1(b)と同様に、相対アドレス
の基底値は1とする。
FIG. 10 is a diagram showing an example of the storage area 10 configured based on the equations (8) and (9) with A = 0. Here, as in FIG. 1B, the base value of the relative address is 1.

【0134】データの例としてジョブのスケジュール管
理(スケジューリングを示すデータ)を考えてみると、
1台のマシンで複数のアプリケーションを起動条件指定
で連続・並列実行する場合には、対象となるアプリケー
ションと、その起動条件の種類(時刻や別アプリケーシ
ョンの終了等)とを一元管理しなければならない。
Consider job schedule management (data indicating scheduling) as an example of data.
When a plurality of applications are executed continuously or in parallel by specifying a start condition on one machine, the target application and the type of the start condition (time, termination of another application, etc.) must be centrally managed. .

【0135】その際、アプリケーションを点で表し、起
動時刻を点の位置で表し、アプリケーション間(点の
間)の→の始点側に位置するアプリケーションが終了し
たことを表すとすれば、ジョブのスケジュール記述(ジ
ョブフロー)は図11に示すようなネットワーク型デー
タ構造のデータとなる。
At this time, if the application is represented by a point, the start time is represented by the position of the point, and the application located on the start point side of → between applications (between the points) is terminated, the job schedule The description (job flow) is data having a network type data structure as shown in FIG.

【0136】ここで、登録されているジョブ(Job)
を順に1,2,…,5と番号を付け、配列の基底値番号
から順にジョブ名を割り当てていく。この配列を実デー
タとし、→を見たとおりに隣接関係として解釈すれば、
図11に示すジョブフローは、7つの辺(式(7)に関
して定義した仮想的な辺を省く)と、2つの開始点・2
つの終了点(図11では各々「startからの仮想的
な辺」または「endへの仮想的な辺」として図示され
ている。スケジュール上でわかりやすく図示している
が、本来は、start,endの区別はない)を含む
5つの点(Nを整数としてJobNはN番目の仮想的な
点)とから構成されている。
Here, the registered job (Job)
Are sequentially numbered 1, 2,..., 5, and job names are assigned in order from the base value number of the array. If we interpret this array as real data and interpret it as an adjacency relationship as seen from →,
The job flow illustrated in FIG. 11 includes seven sides (omitting the virtual side defined with respect to Expression (7)) and two starting points.
11 are shown as “virtual edge from start” or “virtual edge to end” in FIG. 11. Although they are illustrated clearly on the schedule, originally, start, end (Where N is an integer, and JobN is the Nth virtual point).

【0137】図11において、ジョブは5つあり、直列
的な接続は存在しない。図10に示す記憶領域10の構
成は、本発明の方式によるとこのようなデータ構造を簡
単かつコンパクトに表現できることを示している。
In FIG. 11, there are five jobs, and there is no serial connection. The configuration of the storage area 10 shown in FIG. 10 shows that such a data structure can be expressed simply and compactly according to the method of the present invention.

【0138】これらのスケジュールに従って各Job
(ジョブ)を動かすためには、このような情報をデータ
として管理できねばならないが、この情報は直列ではな
いのでネットワーク型データ構造として表現されねばな
らない。この処理の流れを追うには厳密には、例えばJ
ob3が起動するのには、Job1とJob2とが「共
に(and)終了しているか」や「どちらかが(or)
終了しているか」といった隣接関係の意味を厳格に定義
しなければならないが、どちらにしても、親になる処理
が複数存在していることを認めることができる。
According to these schedules, each Job
In order to run (job), such information must be managed as data, but since this information is not serial, it must be represented as a network-type data structure. Strictly speaking, for example, J
In order for ob3 to be activated, Job1 and Job2 may be “whether (and) finished” or “either (or)
The meaning of the adjacency relationship such as "Is it finished?" Must be strictly defined, but in any case, it can be recognized that there are a plurality of parent processes.

【0139】(4) 実施例として例示はしないが、本
発明の応用例としてより一般的なのは、Windows
ヘルプや日本語FEPのように親データが複数存在する
ようなデータ構造である。実世界での情報を一元データ
として表そうとすると、複数の親(隣接関係の参照元)
を持つデータ構造とせざるを得ない場合が多々存在す
る。その意味からも、本発明の応用範囲は広いといえ
る。
(4) Although not illustrated as an embodiment, a more general application of the present invention is Windows.
It has a data structure in which a plurality of parent data exist, such as Help and Japanese FEP. When trying to represent information in the real world as unified data, multiple parents (reference sources of adjacent relationships)
There are many cases in which a data structure must be used. From this point of view, it can be said that the application range of the present invention is wide.

【0140】[0140]

【発明の効果】以上説明したように、本発明のネットワ
ーク型データ構造アドレス割当て・アクセス方式による
と、以下に示すような効果が生じる。
As described above, according to the network type data structure address assignment / access method of the present invention, the following effects are produced.

【0141】第1の効果は、ネットワーク型データ構造
を表現するために複雑なリスト構造等を利用しなくて
も、ネットワーク型データ構造への汎用的なアクセス方
法を実現し利用できることである。
The first effect is that a general-purpose access method to a network-type data structure can be realized and used without using a complicated list structure or the like for expressing the network-type data structure.

【0142】このような効果が生じる理由は、記憶領域
の相対アドレスを求める方式として対関数をモデル化し
たことによる。
The reason why such an effect occurs is that a pair function is modeled as a method for obtaining a relative address of a storage area.

【0143】第2の効果は、本発明の方式を利用してネ
ットワーク型データ構造を実現した場合には、そのデー
タ構造を表す最小限の情報だけで当該データ構造が利用
可能となることである。具体的には、記憶領域は、実デ
ータの個数とデータ間の隣接関係の個数との和、すなわ
ち、おおよそ|V|+|E|個(実データと隣接関係と
は一般にデータ型が異なるので、この式は厳密ではな
い)のデータを格納するための記憶容量だけで実現可能
となる(記憶領域に無駄がなくなる)。
A second effect is that when a network-type data structure is realized by using the method of the present invention, the data structure can be used with only minimum information representing the data structure. . Specifically, the storage area is the sum of the number of actual data and the number of adjacency relations between data, that is, approximately | V | + | E | (since the data type is generally different from the actual data and the adjacency relation, , This formula is not exact) can be realized only by the storage capacity for storing the data (the storage area is not wasted).

【0144】このような効果が生じる理由は、本発明の
方式を用いることによって、グラフ(ネットワーク)の
点を表す実データと辺を表す隣接関係との記憶領域だけ
で、ネットワーク型データ構造を定義できるからであ
る。なお、これ以下の情報量では、ネットワークを表現
(構成)することはできない。
The reason why such an effect occurs is that, by using the method of the present invention, a network-type data structure is defined only by a storage area of real data representing points of a graph (network) and adjacent relations representing edges. Because you can. It should be noted that a network cannot be expressed (configured) with an information amount smaller than this.

【0145】第3の効果は、単方向のネットワーク構造
情報だけで、双方向に相当する情報を得ることができる
ことである。
The third effect is that bidirectional information can be obtained only with unidirectional network structure information.

【0146】このような効果が生じる理由は、対関数
(P,Q,R)を構成する関数Pと関数Qとが双対であ
り、1つの有向辺の情報から同時に始点・終点の情報を
求めることができるので、事実上、逆方向の有向辺が存
在しているとみなすことができるからである。
The reason why such an effect occurs is that the function P and the function Q constituting the pair function (P, Q, R) are dual, and the information on the start point and the end point can be simultaneously obtained from the information on one directed side. Because it can be obtained, it can be considered that a directed edge in the opposite direction exists in effect.

【0147】第4の効果は、リスト構造と同等の記述量
で、可読性が増すということである。
The fourth effect is that the readability increases with the same amount of description as the list structure.

【0148】このような効果が生じる理由は、同じノー
ドへの探索のための記述量がリスト構造による方式での
記述量と等しく、リスト構造の単純なポインタアクセス
に対して方向性を意識した探索ができ、またそれに伴っ
てアルゴリズムも分かり易くなるからである。
The reason why such an effect occurs is that the amount of description for searching the same node is equal to the amount of description in the method using the list structure, and the search is performed in consideration of the directionality for simple pointer access in the list structure. And the algorithm becomes easier to understand.

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

【図1】(a)は本発明のネットワーク型データ構造ア
ドレス割当て・アクセス方式の実施の形態の構成を示す
ブロック図であり、(b)は(a)中の記憶領域の構成
を示す図である。
FIG. 1A is a block diagram illustrating a configuration of an embodiment of a network type data structure address assignment / access method according to the present invention, and FIG. 1B is a diagram illustrating a configuration of a storage area in FIG. is there.

【図2】対関数(P,Q,R)の具体例を示す図であ
る。
FIG. 2 is a diagram showing a specific example of a pair function (P, Q, R).

【図3】図1中のアクセス手段による全件検索処理を示
す流れ図である。
FIG. 3 is a flowchart showing an all-item search process by an access unit in FIG. 1;

【図4】図1中のアクセス手段による一部検索処理を示
す流れ図である。
FIG. 4 is a flowchart showing a partial search process by an access unit in FIG. 1;

【図5】図1中のアドレス割当て手段による一括結合処
理を示す流れ図である。
FIG. 5 is a flowchart showing a batch combining process by an address allocating unit in FIG. 1;

【図6】図1中のアドレス割当て手段による一括削除処
理を示す流れ図である。
FIG. 6 is a flowchart showing batch deletion processing by an address assignment unit in FIG. 1;

【図7】(a)はネットワーク型データ構造の実例を示
す図であり、(b)は(a)のネットワーク型データ構
造に対する探索例を示す図である。
FIG. 7A is a diagram showing an example of a network-type data structure, and FIG. 7B is a diagram showing an example of a search for the network-type data structure of FIG.

【図8】本発明の実施例を説明するための図であり、対
関数を用いたネットワーク型データ構造のコーディング
例(C言語での記述例)をリスト構造によるコーディン
グ例(C言語での記述例)と比較して説明するための図
である。
FIG. 8 is a diagram for explaining an embodiment of the present invention; a coding example of a network-type data structure using a pair function (an example of description in C language) and a coding example of a list structure (description in C language); It is a figure for explaining in comparison with an example).

【図9】本発明の実施例を説明するための図であり、対
関数を利用したデータ処理ルーチンの一部のルーチンを
C言語で記述した例を示す図である。
FIG. 9 is a diagram for explaining the embodiment of the present invention, and shows an example in which a part of a data processing routine using a pair function is described in C language.

【図10】本発明の実施例を説明するための図であり、
ネットワーク型データ構造のデータがジョブスケジュー
リングを示す情報である場合の図1(a)に示す記憶領
域の内容の一例を示す図である。
FIG. 10 is a diagram for explaining an embodiment of the present invention;
FIG. 2 is a diagram illustrating an example of the contents of a storage area illustrated in FIG. 1A when data having a network-type data structure is information indicating job scheduling.

【図11】本発明の実施例を説明するための図であり、
図10に示す記憶領域内のデータのネットワーク型デー
タ構造として実際に表現したいジョブフローを示す図で
ある。
FIG. 11 is a diagram for explaining an embodiment of the present invention;
FIG. 11 is a diagram illustrating a job flow actually desired to be expressed as a network-type data structure of data in the storage area illustrated in FIG. 10.

【符号の説明】[Explanation of symbols]

10 記憶領域 11 実データ配列 12 隣接関係配列 20 データ処理ルーチン 21 アドレス割当て手段 22 アクセス手段 30 対関数ルーチン Reference Signs List 10 storage area 11 actual data array 12 adjacency array 20 data processing routine 21 address allocation means 22 access means 30 paired function routine

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 12/02,17/30 JICSTファイル(JOIS)──────────────────────────────────────────────────続 き Continuation of front page (58) Surveyed field (Int.Cl. 7 , DB name) G06F 12 / 02,17 / 30 JICST file (JOIS)

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 記憶領域におけるネットワーク型データ
構造のデータに関するアドレスの割り当てやアクセスを
実現するためのネットワーク型データ構造アドレス割当
て・アクセス方式において、 実データ配列と隣接関係配列とによってネットワーク型
データ構造のデータを記憶する前記記憶領域と、 ネットワーク型データ構造のアドレス割当て用の有向辺
情報として使用され、変数x,y,およびzについてz
=R(x,y),x=P(z),およびy=Q(z)を
充たす関数P,Q,およびRからなる対関数(P,Q,
R)を示す対関数ルーチンと、 前記対関数ルーチンの対関数を用いて、「前記記憶領域
内の実データ配列中の「隣接関係を表す有向辺の始点に
該当するデータが格納された要素」のアドレスをxと
し、実データ配列中の「当該隣接関係を表す有向辺の終
点に該当するデータが格納された要素」のアドレスをy
とした場合に、隣接関係配列中のいずれかの要素にz=
R(x,y)を格納する」というアルゴリズムで、前記
記憶領域におけるネットワーク型データ構造のアドレス
の割当てを行うアドレス割当て手段と、 前記対関数ルーチンの対関数を用いて、「与えられた隣
接関係を示す前記記憶領域内の隣接関係配列中に格納さ
れているzから各々x=P(z)およびy=Q(z)を
計算し、このxおよびyが存在すれば、zが逆関数P -1
(x)および逆関数Q -1 (y)の解の1つであると認識
する」というアルゴリズムを利用して、前記記憶領域に
おけるネットワーク型データ構造のデータへのアクセス
を行うアクセス手段とを有することを特徴とするネット
ワーク型データ構造アドレス割当て・アクセス方式。
In a network type data structure address assignment / access method for realizing address assignment and access to data of a network type data structure in a storage area, a network type data structure is defined by an actual data array and an adjacent relationship array. Said storage area for storing data; and z is used as directed edge information for address assignment of a network-type data structure.
= R (x, y), x = P (z), and y = Q (z), a pair function (P, Q,
A pair function routine shown a R), using a pair function of said pair function routine, "the storage area
In the actual data array in
X is the address of the "element storing the relevant data"
In the actual data array, the "end of the directed side representing the
The address of the "element storing the data corresponding to the point" to y
, And any element in the adjacency array has z =
R (x, y) in the algorithm that stores "a, an address allocation means for allocating the address of the network-type data structure in the storage area, by using a pair function of said pair function routine," given next
Stored in the adjacent relationship array in the storage area indicating the contact relationship.
X = P (z) and y = Q (z) from z
Calculate, if these x and y exist, z is the inverse function P -1
(X) and one of the solutions of the inverse function Q -1 (y)
Access means for accessing data of a network-type data structure in the storage area using an algorithm of "do" .
【請求項2】 記憶領域内の隣接関係配列の終端記号を
「対関数(P,Q,R)における関数Rの値として取り
得ない値」によって実現することを特徴とする請求項1
記載のネットワーク型データ構造アドレス割当て・アク
セス方式。
2. The method according to claim 1, wherein the terminal symbol of the adjacent relation array in the storage area is realized by “a value that cannot be taken as the value of the function R in the pair function (P, Q, R)”.
Network type data structure address assignment and access method as described.
【請求項3】 対関数ルーチンにおける対関数としてカ
ントールの対関数を採用することを特徴とする請求項1
または請求項2記載のネットワーク型データ構造アドレ
ス割当て・アクセス方式。
3. The method according to claim 1, wherein a Cantor pair function is adopted as a pair function in the pair function routine.
3. A network type data structure address assignment / access method according to claim 2.
JP25099996A 1996-09-02 1996-09-02 Network type data structure address assignment and access method Expired - Lifetime JP3199166B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25099996A JP3199166B2 (en) 1996-09-02 1996-09-02 Network type data structure address assignment and access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25099996A JP3199166B2 (en) 1996-09-02 1996-09-02 Network type data structure address assignment and access method

Publications (2)

Publication Number Publication Date
JPH1078911A JPH1078911A (en) 1998-03-24
JP3199166B2 true JP3199166B2 (en) 2001-08-13

Family

ID=17216150

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25099996A Expired - Lifetime JP3199166B2 (en) 1996-09-02 1996-09-02 Network type data structure address assignment and access method

Country Status (1)

Country Link
JP (1) JP3199166B2 (en)

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
入口浩一、外3名,"グラフ構造に対する効率的記憶検索法",電子情報通信学会論文誌D−▲I▼,1996年8月,第79−D−▲I▼巻,第8号,p.502−510

Also Published As

Publication number Publication date
JPH1078911A (en) 1998-03-24

Similar Documents

Publication Publication Date Title
Snoeyink Point location
Rodriguez et al. Constructions from dots and lines
Brass Advanced data structures
EP2924594B1 (en) Data encoding and corresponding data structure in a column-store database
US6321230B1 (en) Binary tree with override nodes for representing a time-varying function in an enterprise model
US8037039B2 (en) Runtime class database operation
US11557088B2 (en) Generating space models from map files
CN112667860A (en) Sub-graph matching method, device, equipment and storage medium
Nabti et al. Querying massive graph data: A compress and search approach
CN105930390A (en) Relation-type database expansion method and relation-type database expansion system
CN115329504B (en) BOM construction method based on complex product structure
Agarwal et al. Map reduce: a survey paper on recent expansion
Jalili et al. Next generation indexing for genomic intervals
Gu et al. Parallel Longest Increasing Subsequence and van Emde Boas Trees
JP3199166B2 (en) Network type data structure address assignment and access method
Roith et al. Supporting the building design process with graph-based methods using centrally coordinated federated databases
KR20220099745A (en) A spatial decomposition-based tree indexing and query processing methods and apparatus for geospatial blockchain data retrieval
Kumar et al. Enhanced k-means clustering algorithm using red black tree and min-heap
Stojmenovic Listing combinatorial objects in parallel
Roy et al. IoHMT: a probabilistic event-sensitive music analytics framework for low resource internet of humanitarian musical things
JP5512817B2 (en) Information processing apparatus, information processing method, program, and medium
CN114780528B (en) Data entity identification method, device, computer equipment and storage medium
CN116226686B (en) Table similarity analysis method, apparatus, device and storage medium
US8849866B2 (en) Method and computer program product for creating ordered data structure
AU2023201414B2 (en) Systems and methods for performing data processing operations using variable level parallelism

Legal Events

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

Free format text: PAYMENT UNTIL: 20080615

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090615

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100615

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100615

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110615

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20110615

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20120615

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20130615

Year of fee payment: 12

EXPY Cancellation because of completion of term