JP2013164693A - Calculation apparatus, calculation program, and calculation method - Google Patents

Calculation apparatus, calculation program, and calculation method Download PDF

Info

Publication number
JP2013164693A
JP2013164693A JP2012026686A JP2012026686A JP2013164693A JP 2013164693 A JP2013164693 A JP 2013164693A JP 2012026686 A JP2012026686 A JP 2012026686A JP 2012026686 A JP2012026686 A JP 2012026686A JP 2013164693 A JP2013164693 A JP 2013164693A
Authority
JP
Japan
Prior art keywords
nodes
distance
calculated
calculation
eigenvalues
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.)
Granted
Application number
JP2012026686A
Other languages
Japanese (ja)
Other versions
JP5831274B2 (en
Inventor
Hiroharu Maruhashi
弘治 丸橋
Nobuhiro Yugami
伸弘 湯上
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 JP2012026686A priority Critical patent/JP5831274B2/en
Publication of JP2013164693A publication Critical patent/JP2013164693A/en
Application granted granted Critical
Publication of JP5831274B2 publication Critical patent/JP5831274B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To inhibit a reduction in an accuracy of a distance calculation result.SOLUTION: A calculation apparatus 10 has a selection section 15b, a first calculation section 15c, a second calculation section 15d, and a third calculation section 15e. The selection section 15b selects a plurality of groups each having a plurality of nodes among a plurality of nodes, on the basis of adjacency matrix data. The first calculation section 15c calculates an average distance between nodes for each of the plurality of selected groups. The second calculation section 15d calculates a distance between each of the groups and each of the plurality of nodes, on the basis of the average distance between nodes calculated for each group and the adjacency matrix data. The third calculation section 15e calculates a distance between the two nodes between which the distance is to be calculated, on the basis of the calculated distance.

Description

本発明は、算出装置、算出プログラムおよび算出方法に関する。   The present invention relates to a calculation device, a calculation program, and a calculation method.

従来、多数のノードのそれぞれを示す情報と、ノード間を結ぶエッジを示す情報とを含むグラフデータにおいて、ノード間の距離を算出する装置がある。なお、グラフデータにおけるノードは、例えば、Facebook(登録商標)における「人物」に対応する。この場合には、ノード間の距離の値が小さいほど、2つのノードが示す「人物」同士は、友人関係において密接な関係にあるといえる。また、グラフデータの一例としては、隣接行列のデータが挙げられる。隣接行列とは、エッジを介して直接接続されているノード間に対応する成分(要素)の値が、2つのノードが接続されていることを示す値であり、接続されていないノード間に対応する成分の値が、2つのノードが接続されていないことを示す値である行列を指す。「2つのノードが接続されていることを示す値」の一例としては、「1」が挙げられる。また、「2つのノードが接続されていないことを示す値」の一例としては、「0」が挙げられる。また、ここでいうノード間の距離とは、2つのノードを結ぶ経路、すなわち、2つのノードを結ぶエッジとノードのパターンが複数存在する場合には、エッジの数が最短となるパターンにおけるエッジの数を示す。   Conventionally, there is an apparatus for calculating a distance between nodes in graph data including information indicating each of a large number of nodes and information indicating an edge connecting the nodes. Note that the node in the graph data corresponds to, for example, “person” in Facebook (registered trademark). In this case, the smaller the distance between the nodes, the closer the “persons” indicated by the two nodes are in a friend relationship. An example of the graph data is adjacency matrix data. The adjacency matrix is a value indicating that two nodes are connected, and the value of the component (element) corresponding to the nodes directly connected via the edge corresponds to the unconnected nodes. Indicates a matrix whose value is a value indicating that the two nodes are not connected. An example of “a value indicating that two nodes are connected” is “1”. An example of “a value indicating that two nodes are not connected” is “0”. In addition, the distance between the nodes here is a path connecting two nodes, that is, when there are a plurality of edges and node patterns connecting the two nodes, the distance between the edges in the pattern having the shortest number of edges. Indicates a number.

ここで、単純に、距離を計算する対象の2つのノード間で取り得る全ての経路を導出し、導出した全ての経路から、エッジの数が最短となる場合の経路を特定することで、ノード間の距離を算出する方法が考えられる。しかしながら、この方法では、グラフデータにおける経路の数が増加するにつれて、計算量が多くなってしまう。   Here, by simply deriving all possible paths between the two nodes whose distances are to be calculated, and identifying the path when the number of edges is the shortest from all the derived paths, the node A method of calculating the distance between them is conceivable. However, in this method, the amount of calculation increases as the number of paths in the graph data increases.

そこで、全てのノード間の距離を予め算出し、算出した距離を記憶装置に記憶しておき、距離を計算する対象の2つのノードが指定された場合に、2つのノード間に対応する距離を記憶装置から取得することで、ノード間の距離を算出する方法も考えられる。この方法では、予め全てのノード間の距離を記憶装置に記憶しておくので、計算量を抑制することができる。しかしながら、この方法では、予め全てのノード間の距離を算出する処理に多くの時間がかかり、記憶しておくノードの組み合わせの数も膨大なものとなるため、実現が困難である。   Therefore, the distance between all the nodes is calculated in advance, the calculated distance is stored in the storage device, and when the two nodes to be calculated are designated, the distance corresponding to the two nodes is calculated. A method of calculating the distance between nodes by acquiring from a storage device is also conceivable. In this method, since the distances between all the nodes are stored in advance in the storage device, the amount of calculation can be suppressed. However, with this method, it takes a lot of time to calculate the distances between all the nodes in advance, and the number of combinations of nodes to be stored becomes enormous, which is difficult to realize.

そこで、上記の従来の装置は、例えば、多数のノードのうち、他のノードと比べて、より多くのエッジに接続された所定のノードを「ランドマークノード」として選択し、全てのノード間の距離ではなく、ランドマークノードと他のノードとの距離を予め算出する。そして、上記の従来の装置は、算出したランドマークノードと他のノードとの距離を記憶装置に記憶する。続いて、上記の従来の装置は、距離を計算する対象の2つのノードが指定された場合に、記憶装置から2つのノードのそれぞれとランドマークとの距離の和をランドマークごとに算出する。そして、上記の従来の装置は、ランドマークごとに算出した距離の和のうち、最小の和の値を、指定された2つのノード間の距離として算出する。   Therefore, for example, the above-described conventional apparatus selects a predetermined node connected to more edges as a “landmark node” from among a large number of nodes, and connects between all nodes. Instead of the distance, the distance between the landmark node and another node is calculated in advance. The conventional apparatus stores the calculated distance between the landmark node and another node in the storage device. Subsequently, when the two nodes whose distances are to be calculated are specified, the conventional apparatus calculates the sum of the distances between the two nodes and the landmarks from the storage device for each landmark. Then, the above-described conventional apparatus calculates the minimum sum value among the distance sums calculated for each landmark as the distance between two designated nodes.

図20A〜20cは、従来の装置による距離の算出方法の一例を示す図である。図20Aには、グラフデータ80が示すノードと、各ノードを接続するエッジとが示されている。図20Aの例では、ランドマークノードとしてノード83,84が選択された場合が示されている。なお、図20Aの例では図示されていないが、ここでは、ノード83,84以外のノードについてもランドマークノードとして選択されたものとする。また、図20Aの例では、ノード83との距離が「2」であり、ノード84との距離が「2」であるノード81、および、ノード83との距離が「2」であり、ノード84との距離が「3」であるノード82が示されている。図20Bは、選択された各ランドマークノードと、各ノードとの距離を示す図である。図20Bの例は、ランドマークノード83とノード81との距離が「2」であることを示す。また、図20Bの例は、ランドマークノード83とノード82との距離が「2」であることを示す。また、図20Bの例は、ランドマークノード84とノード81との距離が「2」であることを示す。また、図20Bの例は、ランドマークノード84とノード82との距離が「3」であることを示す。   20A to 20c are diagrams illustrating an example of a distance calculation method using a conventional device. FIG. 20A shows nodes indicated by the graph data 80 and edges connecting the nodes. In the example of FIG. 20A, a case where nodes 83 and 84 are selected as landmark nodes is shown. Although not shown in the example of FIG. 20A, it is assumed here that nodes other than the nodes 83 and 84 are also selected as landmark nodes. In the example of FIG. 20A, the distance from the node 83 is “2”, the distance from the node 84 is “2”, and the distance from the node 83 is “2”. A node 82 having a distance of “3” is shown. FIG. 20B is a diagram showing the distance between each selected landmark node and each node. The example in FIG. 20B indicates that the distance between the landmark node 83 and the node 81 is “2”. 20B indicates that the distance between the landmark node 83 and the node 82 is “2”. The example of FIG. 20B indicates that the distance between the landmark node 84 and the node 81 is “2”. The example of FIG. 20B indicates that the distance between the landmark node 84 and the node 82 is “3”.

図20Cは、各ランドマークと、距離を計算する対象として指定された2つのノードのそれぞれとの距離の和の一例を示す。ここでは、距離を計算する対象の2つのノードとして、ノード81,82が指定された場合について説明する。図20Cの例では、ノード81とランドマークノード83との距離と、ノード82とランドマークノード83との距離との和が「4」である場合が示されている。また、図20Cの例では、ノード81とランドマークノード84との距離と、ノード82とランドマークノード84との距離との和が「5」である場合が示されている。従来の装置は、図20Cの例の場合では、ノード81とノード82との距離として、「4」を算出する。   FIG. 20C shows an example of the sum of the distances between each landmark and each of the two nodes designated as targets for calculating the distance. Here, a case will be described in which nodes 81 and 82 are designated as the two nodes whose distances are to be calculated. In the example of FIG. 20C, the case where the sum of the distance between the node 81 and the landmark node 83 and the distance between the node 82 and the landmark node 83 is “4” is shown. 20C shows a case where the sum of the distance between the node 81 and the landmark node 84 and the distance between the node 82 and the landmark node 84 is “5”. In the case of the example of FIG. 20C, the conventional apparatus calculates “4” as the distance between the node 81 and the node 82.

M. Potamias et al.、「Fast Shortest Path Distance Estimation in Large Networks」、CIKM’09、2009年M. Potamias et al., “Fast Shortest Path Distance Estimation in Large Networks”, CIKM’09, 2009

しかしながら、上記の従来の装置では、距離の算出結果の精度が低くなる場合があるという問題がある。   However, the above-described conventional apparatus has a problem that the accuracy of the distance calculation result may be lowered.

例を挙げて説明する。図21A〜21C、図22A〜22C、図23は、従来の装置の問題点の一例を説明するための図である。図21Aの例は、グラフデータ85において、ランドマークノードとして選択されたノード86に、ノード87およびノード88がエッジを介して接続された場合を示す。また、図21Aの例では、ノード87とノード88とが直接エッジを介して接続されていない。また、図21Aの例では、ノード87に、エッジを介してノード89が接続されている。   An example will be described. FIGS. 21A to 21C, FIGS. 22A to 22C, and FIG. 23 are diagrams for explaining an example of a problem of a conventional device. The example of FIG. 21A shows a case where a node 87 and a node 88 are connected to a node 86 selected as a landmark node in the graph data 85 via an edge. In the example of FIG. 21A, the node 87 and the node 88 are not directly connected via an edge. In the example of FIG. 21A, a node 89 is connected to the node 87 via an edge.

図21Bは、図21Aの場合における各ノード間の実際の距離を示す図である。図21Bの例は、ノード87とノード88との距離が、「2」である場合を示す。また、図21Bの例は、ノード87とノード86との距離が、「1」である場合を示す。また、図21Bの例は、ノード87とノード89との距離が、「1」である場合を示す。また、図21Bの例は、ノード88とノード86との距離が、「1」である場合を示す。また、図21Bの例は、ノード88とノード89との距離が、「3」である場合を示す。また、図21Bの例は、ノード86とノード89との距離が、「2」である場合を示す。   FIG. 21B is a diagram showing an actual distance between nodes in the case of FIG. 21A. The example of FIG. 21B shows a case where the distance between the node 87 and the node 88 is “2”. The example of FIG. 21B shows a case where the distance between the node 87 and the node 86 is “1”. The example of FIG. 21B shows a case where the distance between the node 87 and the node 89 is “1”. The example of FIG. 21B shows a case where the distance between the node 88 and the node 86 is “1”. The example of FIG. 21B shows a case where the distance between the node 88 and the node 89 is “3”. The example of FIG. 21B shows a case where the distance between the node 86 and the node 89 is “2”.

図21Cは、図21Aの場合において、従来の装置によって算出された各ノード間の距離を示す図である。図21Cの例に示すように、従来の装置は、ノード87とノード88との距離「2」を算出する。また、図21Cの例に示すように、従来の装置は、ノード87とノード86との距離「1」を算出する。また、図21Cの例に示すように、従来の装置は、ノード87とノード89との距離「3」を算出する。また、図21Cの例に示すように、従来の装置は、ノード88とノード86との距離「1」を算出する。また、図21Cの例に示すように、従来の装置は、ノード88とノード89との距離「3」を算出する。また、図21Cの例に示すように、従来の装置は、ノード86とノード89との距離「2」を算出する。   FIG. 21C is a diagram illustrating the distance between the nodes calculated by the conventional device in the case of FIG. 21A. As illustrated in the example of FIG. 21C, the conventional apparatus calculates the distance “2” between the node 87 and the node 88. Further, as shown in the example of FIG. 21C, the conventional apparatus calculates the distance “1” between the node 87 and the node 86. Further, as illustrated in the example of FIG. 21C, the conventional apparatus calculates the distance “3” between the node 87 and the node 89. Further, as illustrated in the example of FIG. 21C, the conventional apparatus calculates the distance “1” between the node 88 and the node 86. Further, as illustrated in the example of FIG. 21C, the conventional apparatus calculates the distance “3” between the node 88 and the node 89. Further, as illustrated in the example of FIG. 21C, the conventional apparatus calculates the distance “2” between the node 86 and the node 89.

すなわち、図21Aの例では、ノード87,89間の距離についての算出結果は、実際の距離と異なり、ノード87,89間以外のノード間の距離の算出結果は、実際の距離と同一となる。このように、ほとんどのノード間について、算出結果が、実施の距離と同一となる理由は、ランドマークノード86に接続されたノード87,88同士が直接エッジを介して接続されていないからである。なお、ノード87,89間の距離の算出結果が、実際の距離と異なる理由としては、次のような理由が挙げられる。すなわち、ノード87,89同士が直接エッジを介して接続されているにも関わらず、従来の装置では、ランドマーク86と、ノード87,89のそれぞれとの距離の和がノード87,89間の距離として算出されてしまうという理由が挙げられる。   That is, in the example of FIG. 21A, the calculation result regarding the distance between the nodes 87 and 89 is different from the actual distance, and the calculation result of the distance between the nodes other than between the nodes 87 and 89 is the same as the actual distance. . As described above, the reason why the calculation result is the same as the implementation distance between most nodes is that the nodes 87 and 88 connected to the landmark node 86 are not directly connected via the edge. . The reason why the calculation result of the distance between the nodes 87 and 89 is different from the actual distance is as follows. That is, although the nodes 87 and 89 are directly connected to each other via the edge, in the conventional apparatus, the sum of the distances between the landmark 86 and the nodes 87 and 89 is the same between the nodes 87 and 89. The reason is that it is calculated as a distance.

図22Aの例は、グラフデータ90において、ランドマークノードとして選択されたノード91に、ノード92およびノード93がエッジを介して接続された場合を示す。また、図22Aの例では、ノード92とノード93とが直接エッジを介して接続されている。また、図22Aの例では、ノード92に、エッジを介してノード94が接続されている。   The example of FIG. 22A shows a case where a node 92 and a node 93 are connected to a node 91 selected as a landmark node in the graph data 90 via an edge. In the example of FIG. 22A, the node 92 and the node 93 are directly connected via an edge. In the example of FIG. 22A, a node 94 is connected to the node 92 via an edge.

図22Bは、図22Aの場合における各ノード間の実際の距離を示す図である。図22Bの例は、ノード92とノード93との距離が、「1」である場合を示す。また、図22Bの例は、ノード92とノード91との距離が、「1」である場合を示す。また、図22Bの例は、ノード92とノード94との距離が、「1」である場合を示す。また、図22Bの例は、ノード93とノード91との距離が、「1」である場合を示す。また、図22Bの例は、ノード93とノード94との距離が、「2」である場合を示す。また、図22Bの例は、ノード91とノード94との距離が、「2」である場合を示す。   FIG. 22B is a diagram illustrating an actual distance between nodes in the case of FIG. 22A. The example of FIG. 22B shows a case where the distance between the node 92 and the node 93 is “1”. The example of FIG. 22B shows a case where the distance between the node 92 and the node 91 is “1”. The example of FIG. 22B shows a case where the distance between the node 92 and the node 94 is “1”. Further, the example of FIG. 22B shows a case where the distance between the node 93 and the node 91 is “1”. The example of FIG. 22B shows a case where the distance between the node 93 and the node 94 is “2”. The example of FIG. 22B shows a case where the distance between the node 91 and the node 94 is “2”.

図22Cは、図22Aの場合において、従来の装置によって算出された各ノード間の距離を示す図である。図22Cの例に示すように、従来の装置は、ノード92とノード93との距離「2」を算出する。また、図22Cの例に示すように、従来の装置は、ノード92とノード91との距離「1」を算出する。また、図22Cの例に示すように、従来の装置は、ノード92とノード94との距離「3」を算出する。また、図22Cの例に示すように、従来の装置は、ノード93とノード91との距離「1」を算出する。また、図22Cの例に示すように、従来の装置は、ノード93とノード94との距離「3」を算出する。また、図22Cの例に示すように、従来の装置は、ノード91とノード94との距離「2」を算出する。   FIG. 22C is a diagram illustrating the distance between the nodes calculated by the conventional apparatus in the case of FIG. 22A. As illustrated in the example of FIG. 22C, the conventional device calculates the distance “2” between the node 92 and the node 93. Further, as illustrated in the example of FIG. 22C, the conventional apparatus calculates the distance “1” between the node 92 and the node 91. Further, as illustrated in the example of FIG. 22C, the conventional apparatus calculates the distance “3” between the node 92 and the node 94. Further, as illustrated in the example of FIG. 22C, the conventional apparatus calculates the distance “1” between the node 93 and the node 91. Further, as shown in the example of FIG. 22C, the conventional apparatus calculates the distance “3” between the node 93 and the node 94. Further, as illustrated in the example of FIG. 22C, the conventional apparatus calculates the distance “2” between the node 91 and the node 94.

すなわち、図22Aの例では、ノード92,93間、ノード92,94間、ノード93,94間の距離の算出結果が、実際の距離と異なる。このように、図21Aの例の場合に比べて図22Aの例の場合のほうが、従来の装置によって算出された距離が、実際の距離と異なる可能性が高くなる。この理由の一つについて説明する。図22Aの例では、ランドマークノード91に接続されたノード92,93同士は、直接エッジを介して接続されている。そのため、ノード92,93間、ノード92,94間、ノード93,94間の実際の距離は、ランドマークノード91を経由しない経路が示す距離となる。しかしながら、図22Aの例において、従来の装置は、ランドマークノード91と、各ノードとの距離の和、すなわち、ランドマークノード91を経由する経路が示す距離を各ノード間の距離として算出してしまう。このように、従来の装置では、ランドマークノードに接続されたノード同士が直接エッジを介して接続される場合には、算出される距離が、実際の距離と異なる可能性が高くなる。   That is, in the example of FIG. 22A, the calculation results of the distances between the nodes 92 and 93, between the nodes 92 and 94, and between the nodes 93 and 94 are different from the actual distance. In this way, the distance calculated by the conventional apparatus is more likely to be different from the actual distance in the example in FIG. 22A compared to the example in FIG. 21A. One reason for this will be described. In the example of FIG. 22A, the nodes 92 and 93 connected to the landmark node 91 are directly connected via an edge. Therefore, the actual distance between the nodes 92 and 93, between the nodes 92 and 94, and between the nodes 93 and 94 is a distance indicated by a route that does not pass through the landmark node 91. However, in the example of FIG. 22A, the conventional apparatus calculates the sum of the distance between the landmark node 91 and each node, that is, the distance indicated by the route passing through the landmark node 91 as the distance between the nodes. End up. As described above, in the conventional apparatus, when nodes connected to the landmark node are directly connected via an edge, there is a high possibility that the calculated distance is different from the actual distance.

例えば、図23に示すように、ランドマークノードに接続されたノード同士が接続され、グラフ直径が小さい場合には、従来の装置により算出される距離が実際の距離と異なる可能性が高い。図23の例では、従来の装置により算出される距離の正答率(正解数/ノードの全てのペアの数)は、約0.51(630/1225)であり、半分程度にしかならない。なお、グラフ直径とは、グラフデータが示すグラフにおける全てのノード間の距離のうち、最大の距離を指す。また、図23の例では、ノードが、「N」と表記され、ランドマークノードが「LM」と表記されている。   For example, as shown in FIG. 23, when nodes connected to the landmark node are connected and the graph diameter is small, there is a high possibility that the distance calculated by the conventional apparatus is different from the actual distance. In the example of FIG. 23, the correct answer rate (number of correct answers / number of all pairs of nodes) calculated by a conventional apparatus is about 0.51 (630/1225), which is only about half. The graph diameter refers to the maximum distance among the distances between all nodes in the graph indicated by the graph data. In the example of FIG. 23, the node is represented as “N”, and the landmark node is represented as “LM”.

開示の技術は、上記に鑑みてなされたものであって、距離の算出結果の精度の低下を抑制することができる算出装置、算出プログラムおよび算出方法を提供することを目的とする。   The disclosed technique has been made in view of the above, and an object thereof is to provide a calculation device, a calculation program, and a calculation method that can suppress a decrease in accuracy of a distance calculation result.

本願の開示する算出装置は、選択部と、第一の算出部と、第二の算出部と、第三の算出部とを有する。選択部は、複数のノードを有するグラフにおけるノード間の接続状態を示す情報に基づいて、複数のノードの中から、それぞれ複数のノードを有する複数のグループを選択する。第一の算出部は、選択部により選択された複数のグループのそれぞれについて、グループ内のノード間の平均距離を算出する。第二の算出部は、第一の算出部によりグループごとに算出されたグループ内のノード間の平均距離、および、ノード間の接続状態を示す情報に基づいて、グループのそれぞれと、複数のノードのそれぞれとの距離を算出する。第三の算出部は、第二の算出部により算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する。   The calculation device disclosed in the present application includes a selection unit, a first calculation unit, a second calculation unit, and a third calculation unit. The selection unit selects a plurality of groups each having a plurality of nodes from the plurality of nodes based on information indicating a connection state between the nodes in the graph having the plurality of nodes. The first calculation unit calculates an average distance between nodes in the group for each of the plurality of groups selected by the selection unit. Based on the average distance between the nodes in the group calculated for each group by the first calculation unit, and information indicating the connection state between the nodes, the second calculation unit Calculate the distance to each of. The third calculation unit calculates the distance between the two nodes whose distances are to be calculated based on the distance calculated by the second calculation unit.

また、本願の開示する算出装置は、選択部と、第一の算出部と、第二の算出部とを有する。選択部は、複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出する。そして、選択部は、算出した複数の固有値および複数の固有ベクトルに基づいて、それぞれ複数のノードを有する複数のグループを選択する。第一の算出部は、固有値および固有ベクトルに基づいて、複数のグループのそれぞれと、複数のノードのそれぞれとの距離を算出する。第二の算出部は、第一の算出部により算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する。   Moreover, the calculation device disclosed in the present application includes a selection unit, a first calculation unit, and a second calculation unit. The selection unit calculates each of a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from a matrix indicating a connection state between nodes in a graph having a plurality of nodes. Then, the selection unit selects a plurality of groups each having a plurality of nodes based on the plurality of calculated eigenvalues and the plurality of eigenvectors. The first calculation unit calculates a distance between each of the plurality of groups and each of the plurality of nodes based on the eigenvalue and the eigenvector. The second calculation unit calculates a distance between two nodes whose distances are to be calculated based on the distance calculated by the first calculation unit.

また、本願の開示する算出装置は、第一の算出部と、第二の算出部とを有する。第一の算出部は、複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出する。第二の算出部は、複数の固有ベクトルごとに、距離の算出対象の2つのノードのそれぞれに対応する固有ベクトルの2つの成分の積と固有ベクトルに対応する固有値のk乗の値との積を算出する。そして、第二の算出部は、複数の固有ベクトルごとに算出した積の和を算出する。続いて、第二の算出部は、算出した和が、行列においてノード間が接続していることを示す値から所定値を減算した値を超える最小の前記kの値を、前記2つのノード間の距離として算出する。   Moreover, the calculation device disclosed in the present application includes a first calculation unit and a second calculation unit. The first calculation unit calculates each of a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from a matrix indicating a connection state between nodes in a graph having a plurality of nodes. The second calculation unit calculates, for each of a plurality of eigenvectors, a product of the product of the two components of the eigenvector corresponding to each of the two nodes whose distances are to be calculated and the value of the eigenvalue corresponding to the eigenvector to the k-th power. . The second calculation unit calculates the sum of the products calculated for each of the plurality of eigenvectors. Subsequently, the second calculation unit calculates a minimum value of the k between the two nodes that exceeds a value obtained by subtracting a predetermined value from a value indicating that the nodes are connected in the matrix. Is calculated as a distance.

本願の開示する算出装置の一つの態様によれば、距離の算出結果の精度の低下を抑制することができる。   According to one aspect of the calculation device disclosed in the present application, it is possible to suppress a decrease in the accuracy of the distance calculation result.

図1は、実施例1に係る算出装置の機能構成の一例を示す図である。FIG. 1 is a diagram illustrating an example of a functional configuration of the calculation apparatus according to the first embodiment. 図2は、隣接行列データのデータ構成の一例を示す図である。FIG. 2 is a diagram illustrating an example of a data configuration of adjacency matrix data. 図3は、距離情報のデータ構成の一例を示す図である。FIG. 3 is a diagram illustrating an example of a data configuration of distance information. 図4は、実施例1に係る算出装置が実行する処理の一例を説明するための図である。FIG. 4 is a diagram for explaining an example of processing executed by the calculation apparatus according to the first embodiment. 図5は、実施例1に係る算出装置が実行する処理の一例を説明するための図である。FIG. 5 is a diagram for explaining an example of processing executed by the calculation apparatus according to the first embodiment. 図6は、実施例1に係る算出装置が実行する処理の一例を説明するための図である。FIG. 6 is a schematic diagram illustrating an example of a process executed by the calculation apparatus according to the first embodiment. 図7は、実施例1に係る距離情報算出処理の手順を示すフローチャートである。FIG. 7 is a flowchart illustrating a procedure of distance information calculation processing according to the first embodiment. 図8は、実施例1に係る算出処理の手順を示すフローチャートである。FIG. 8 is a flowchart illustrating the procedure of the calculation process according to the first embodiment. 図9は、実施例2に係る算出装置の機能構成の一例を示す図である。FIG. 9 is a diagram illustrating an example of a functional configuration of the calculation apparatus according to the second embodiment. 図10は、隣接行列の一例を示す図である。FIG. 10 is a diagram illustrating an example of the adjacency matrix. 図11Aは、固有値および固有ベクトルの一例を示す図である。FIG. 11A is a diagram illustrating an example of eigenvalues and eigenvectors. 図11Bは、固有値の絶対値の平方根の逆数の一例を示す図である。FIG. 11B is a diagram illustrating an example of the reciprocal of the square root of the absolute value of the eigenvalue. 図12は、距離の算出方法の一例を説明するための図である。FIG. 12 is a diagram for explaining an example of a distance calculation method. 図13は、実施例2に係る距離情報算出処理の手順を示すフローチャートである。FIG. 13 is a flowchart illustrating a procedure of distance information calculation processing according to the second embodiment. 図14は、実施例3に係る算出装置の機能構成の一例を示す図である。FIG. 14 is a diagram illustrating an example of a functional configuration of the calculation apparatus according to the third embodiment. 図15は、実施例3にかかる算出装置が実行する処理の一例を説明するための図である。FIG. 15 is a diagram for explaining an example of a process executed by the calculation apparatus according to the third embodiment. 図16は、実施例3にかかる算出装置が実行する処理の一例を説明するための図である。FIG. 16 is a schematic diagram illustrating an example of a process executed by the calculation apparatus according to the third embodiment. 図17は、実施例3に係る行列情報算出処理の手順を示すフローチャートである。FIG. 17 is a flowchart illustrating a procedure of matrix information calculation processing according to the third embodiment. 図18は、実施例3に係る算出処理の手順を示すフローチャートである。FIG. 18 is a flowchart illustrating the procedure of the calculation process according to the third embodiment. 図19は、算出プログラムを実行するコンピュータを示す図である。FIG. 19 is a diagram illustrating a computer that executes a calculation program. 図20Aは、従来の装置による距離の算出方法の一例を示す図である。FIG. 20A is a diagram illustrating an example of a distance calculation method by a conventional device. 図20Bは、従来の装置による距離の算出方法の一例を示す図である。FIG. 20B is a diagram illustrating an example of a distance calculation method performed by a conventional device. 図20Cは、従来の装置による距離の算出方法の一例を示す図である。FIG. 20C is a diagram illustrating an example of a distance calculation method by a conventional device. 図21Aは、従来の装置の問題点の一例を説明するための図である。FIG. 21A is a diagram for explaining an example of a problem of a conventional device. 図21Bは、従来の装置の問題点の一例を説明するための図である。FIG. 21B is a diagram for explaining an example of a problem of a conventional device. 図21Cは、従来の装置の問題点の一例を説明するための図である。FIG. 21C is a diagram for explaining an example of a problem of the conventional device. 図22Aは、従来の装置の問題点の一例を説明するための図である。FIG. 22A is a diagram for explaining an example of a problem of a conventional device. 図22Bは、従来の装置の問題点の一例を説明するための図である。FIG. 22B is a diagram for explaining an example of a problem of the conventional device. 図22Cは、従来の装置の問題点の一例を説明するための図である。FIG. 22C is a diagram for describing an example of a problem of a conventional device. 図23は、従来の装置の問題点の一例を説明するための図である。FIG. 23 is a diagram for explaining an example of a problem of a conventional apparatus.

以下に、本願の開示する算出装置、算出プログラムおよび算出方法の各実施例を図面に基づいて詳細に説明する。なお、実施例は開示の技術を限定するものではない。また、各実施例は、処理内容を矛盾させない範囲で適宜組み合わせることが可能である。   Hereinafter, embodiments of a calculation apparatus, a calculation program, and a calculation method disclosed in the present application will be described in detail with reference to the drawings. The embodiments do not limit the disclosed technology. In addition, the embodiments can be appropriately combined within a range in which processing contents are not contradictory.

実施例1に係る算出装置について説明する。図1は、実施例1に係る算出装置の機能構成の一例を示す図である。   A calculation apparatus according to the first embodiment will be described. FIG. 1 is a diagram illustrating an example of a functional configuration of the calculation apparatus according to the first embodiment.

[算出装置の機能構成]
図1に示すように、算出装置10は、入力部11と、出力部12と、通信部13と、記憶部14と、制御部15とを有する。
[Functional structure of calculation device]
As illustrated in FIG. 1, the calculation device 10 includes an input unit 11, an output unit 12, a communication unit 13, a storage unit 14, and a control unit 15.

入力部11は、各種情報を制御部15に入力する。例えば、入力部11は、ユーザから、後述の算出処理を実行するための指示を受け付けて、受け付けた指示を制御部15に入力する。なお、かかる指示には、距離の計算対象の2つのノード(ノードのペア)のID(IDentification)が含まれる。また、入力部11は、ユーザから、後述の距離情報算出処理を実行するための指示を受け付けて、受け付けた指示を制御部15に入力する。また、入力部11は、ユーザから各種の指示を受け付けて、受け付けた指示を制御部15へ入力する。また、入力部11は、ユーザから、後述の隣接行列データ14bを受け付けて、受け付けた隣接行列データ14bを制御部15に入力する。また、入力部11は、ユーザから、隣接行列データ14bを外部のサーバから取得する指示を受け付けて、受け付けた指示を制御部15に入力する。入力部11のデバイスの一例としては、マウスやキーボードなどのユーザの操作を受け付けるデバイスなどが挙げられる。   The input unit 11 inputs various information to the control unit 15. For example, the input unit 11 receives an instruction for executing a calculation process described later from the user, and inputs the received instruction to the control unit 15. This instruction includes IDs (IDentification) of two nodes (node pairs) for which distances are to be calculated. Further, the input unit 11 receives an instruction for executing distance information calculation processing described later from the user, and inputs the received instruction to the control unit 15. The input unit 11 receives various instructions from the user and inputs the received instructions to the control unit 15. Further, the input unit 11 receives an adjacency matrix data 14b described later from the user, and inputs the received adjacency matrix data 14b to the control unit 15. In addition, the input unit 11 receives an instruction from the user to acquire the adjacency matrix data 14 b from an external server, and inputs the received instruction to the control unit 15. As an example of the device of the input unit 11, there is a device that accepts a user operation such as a mouse or a keyboard.

出力部12は、各種の情報を出力する。例えば、出力部12は、後述の出力制御部15fの制御により、2つのノード間の距離を表示する。出力部12のデバイスの一例としては、液晶ディスプレイなどが挙げられる。   The output unit 12 outputs various information. For example, the output unit 12 displays the distance between two nodes under the control of an output control unit 15f described later. An example of the device of the output unit 12 is a liquid crystal display.

通信部13は、各装置間の通信を行うためのインターフェースである。例えば、通信部13は、図示しないサーバに接続される。かかるサーバの一例としては、後述の隣接行列データ14bを算出装置10に送信する指示を受信した場合に、隣接行列データ14bを算出装置10に送信するサーバが挙げられる。また、通信部13は、サーバから隣接行列データ14bを受信した場合には、受信した隣接行列データ14bを制御部15へ送信する。   The communication unit 13 is an interface for performing communication between devices. For example, the communication unit 13 is connected to a server (not shown). As an example of such a server, a server that transmits the adjacency matrix data 14b to the calculation device 10 when an instruction to transmit the adjacency matrix data 14b described later to the calculation device 10 is received. Further, when receiving the adjacency matrix data 14 b from the server, the communication unit 13 transmits the received adjacency matrix data 14 b to the control unit 15.

記憶部14は、各種情報を記憶する。例えば、記憶部14は、隣接行列データ14b、距離情報14bを記憶する。   The storage unit 14 stores various information. For example, the storage unit 14 stores adjacency matrix data 14b and distance information 14b.

隣接行列データ14bは、複数のノードを有するグラフにおけるノード間の接続状態を示すグラフデータの一例である。隣接行列データ14bが示す隣接行列は、エッジを介して直接接続されている2つのノード間に対応する成分の値として、2つのノードが接続されていることを示す値を有する行列である。また、隣接行列は、接続されていないノード間に対応する成分の値として、2つのノードが接続されていないことを示す値を有する行列である。図2は、隣接行列データのデータ構成の一例を示す図である。以下の説明では、ノードを、「N」と表記する場合がある。図2中左側に示すように、N1に、N2、N3、N4が接続され、N2に、N1、N4が接続され、N3に、N1が接続され、N4に、N1、N2が接続されるようなグラフの場合における隣接行列データ14bについて説明する。かかるグラフの場合には、図2中右側に示す隣接行列データ14bが示す隣接行列は、N1とN2、N1とN3およびN1とN4の各ノード間の成分の値として、2つのノードが接続されていることを示す値、例えば、「1」を有する。また、図2中右側に示す隣接行列データ14bが示す隣接行列は、N2とN4のノード間の成分の値として、2つのノードが接続されていることを示す値、例えば、「1」を有する。なお、図2中右側には、隣接行列データ14bが示す隣接行列が、同一のノード間(N1とN1、N2とN2、N3とN3、N4とN4)の成分の値として、「1」を有する場合が示されている。   The adjacency matrix data 14b is an example of graph data indicating a connection state between nodes in a graph having a plurality of nodes. The adjacency matrix indicated by the adjacency matrix data 14b is a matrix having values indicating that two nodes are connected as values of components corresponding to two nodes directly connected via an edge. The adjacency matrix is a matrix having values indicating that two nodes are not connected as values of components corresponding to nodes that are not connected. FIG. 2 is a diagram illustrating an example of a data configuration of adjacency matrix data. In the following description, the node may be expressed as “N”. 2, N2, N3, and N4 are connected to N1, N1 and N4 are connected to N2, N1 is connected to N3, and N1 and N2 are connected to N4. Next, the adjacency matrix data 14b in the case of a simple graph will be described. In the case of such a graph, the adjacency matrix indicated by the adjacency matrix data 14b shown on the right side in FIG. 2 has two nodes connected as values of components between the nodes N1 and N2, N1 and N3, and N1 and N4. For example, “1”. Further, the adjacency matrix indicated by the adjacency matrix data 14b shown on the right side in FIG. 2 has a value indicating that two nodes are connected, for example, “1” as the value of the component between the nodes N2 and N4. . On the right side in FIG. 2, the adjacency matrix indicated by the adjacency matrix data 14b is “1” as the value of the component between the same nodes (N1 and N1, N2 and N2, N3 and N3, N4 and N4). The case of having is shown.

距離情報14bは、後述の各ランドマークノードグループと各ノードとの距離を示す情報である。距離情報14bは、後述の第二の算出部15dにより算出される。図3は、距離情報のデータ構成の一例を示す図である。以下の説明では、後述のランドマークノードグループを、「LMG」と表記する場合がある。図3の例では、距離情報14bが、N1とLMG1との距離が「0.7」であることを示す場合が示されている。また、図3の例では、距離情報14bが、N1とLMG2との距離が「1.7」であることを示す場合が示されている。   The distance information 14b is information indicating the distance between each landmark node group described later and each node. The distance information 14b is calculated by a second calculation unit 15d described later. FIG. 3 is a diagram illustrating an example of a data configuration of distance information. In the following description, a landmark node group to be described later may be referred to as “LMG”. In the example of FIG. 3, the case where the distance information 14b indicates that the distance between N1 and LMG1 is “0.7” is shown. In the example of FIG. 3, the distance information 14b indicates a case where the distance between N1 and LMG2 indicates “1.7”.

記憶部14は、例えば、フラッシュメモリなどの半導体メモリ素子、または、ハードディスク、光ディスクなどの記憶装置である。なお、記憶部14は、上記の種類の記憶装置に限定されるものではなく、RAM(Random Access Memory)、ROM(Read Only Memory)であってもよい。   The storage unit 14 is, for example, a semiconductor memory device such as a flash memory, or a storage device such as a hard disk or an optical disk. The storage unit 14 is not limited to the above type of storage device, and may be a RAM (Random Access Memory) or a ROM (Read Only Memory).

制御部15は、各種の処理手順を規定したプログラムや制御データを格納するための内部メモリを有し、これらによって種々の処理を実行する。図1に示すように、制御部15は、取得部15aと、選択部15bと、第一の算出部15cと、第二の算出部15dと、第三の算出部15eと、出力制御部15fとを有する。   The control unit 15 has an internal memory for storing programs defining various processing procedures and control data, and executes various processes using these. As shown in FIG. 1, the control unit 15 includes an acquisition unit 15a, a selection unit 15b, a first calculation unit 15c, a second calculation unit 15d, a third calculation unit 15e, and an output control unit 15f. And have.

取得部15aは、隣接行列データ14bを取得する。例えば、取得部15aは、入力部11から隣接行列データ14bが入力された場合には、入力された隣接行列データ14bを取得し、取得した隣接行列データ14bを記憶部14に格納する。また、取得部15aは、入力部11から、隣接行列データ14bを外部のサーバから取得する指示が入力された場合には、隣接行列データ14bを算出装置10に送信する指示を通信部13へ送信する。また、取得部15aは、通信部13から隣接行列データ14bを受信した場合には、受信した隣接行列データ14bを取得し、取得した隣接行列データ14bを記憶部14に格納する。   The acquisition unit 15a acquires adjacency matrix data 14b. For example, when the adjacency matrix data 14 b is input from the input unit 11, the acquisition unit 15 a acquires the input adjacency matrix data 14 b and stores the acquired adjacency matrix data 14 b in the storage unit 14. In addition, when an instruction to acquire the adjacency matrix data 14b from an external server is input from the input unit 11, the acquisition unit 15a transmits an instruction to transmit the adjacency matrix data 14b to the calculation device 10 to the communication unit 13. To do. Further, when receiving the adjacency matrix data 14 b from the communication unit 13, the acquisition unit 15 a acquires the received adjacency matrix data 14 b and stores the acquired adjacency matrix data 14 b in the storage unit 14.

選択部15bは、各種情報を選択する。例えば、選択部15bは、複数のノードを有するグラフにおけるノード間の接続状態を示す隣接行列データ14bに基づいて、複数のノードの中から、それぞれ複数のノードを有する複数のランドマークノードグループを選択する。   The selection unit 15b selects various information. For example, the selection unit 15b selects a plurality of landmark node groups each having a plurality of nodes from the plurality of nodes based on the adjacency matrix data 14b indicating the connection state between the nodes in the graph having the plurality of nodes. To do.

具体例を挙げて説明すると、選択部15bは、まず、記憶部14から、隣接行列データ14bを取得する。そして、選択部15bは、「Fast Shortest Path Distance Estimation in Large Networks」などに記載されているような公知の技術を用いて、所定個のランドマークノードを選択する。例えば、選択部15bは、隣接行列データ14bが示すグラフにおけるノード間の隣接状態から、各ノードに接続されているノード数を計数し、接続されているノード数が多い順に、次のような処理を行う。すなわち、選択部15bは、接続されているノード数が最も多いノードから所定個のノードをランドマークノードとして選択する。図4は、実施例1に係る算出装置が実行する処理の一例を説明するための図である。図4が示すグラフの例では、選択部15bは、接続されているノード数の多さが上位5個のノード、すなわち、接続されているノード数が「9」であるN8、N18、N28、N38、N48の5つのノードをランドマークノードとして選択する。   If it demonstrates with a specific example, the selection part 15b will acquire the adjacency matrix data 14b from the memory | storage part 14 first. Then, the selection unit 15b selects a predetermined number of landmark nodes using a known technique described in “Fast Shortest Path Distance Estimation in Large Networks” or the like. For example, the selection unit 15b counts the number of nodes connected to each node from the adjacent state between the nodes in the graph indicated by the adjacency matrix data 14b, and performs the following processing in descending order of the number of connected nodes. I do. That is, the selection unit 15b selects a predetermined number of nodes as landmark nodes from the nodes having the largest number of connected nodes. FIG. 4 is a diagram for explaining an example of processing executed by the calculation apparatus according to the first embodiment. In the example of the graph illustrated in FIG. 4, the selection unit 15b includes the top five nodes with the largest number of connected nodes, that is, N8, N18, N28, where the number of connected nodes is “9”, Five nodes N38 and N48 are selected as landmark nodes.

次に、選択部15bは、ランドマークノードから所定の距離に位置するノードおよび当該ランドマークノードのグループを、ランドマークノードグループとして選択する。図4のグラフが示す例では、選択部15bは、N8から距離が「1」のN1〜N7、N9、N10の各ノードを特定し、特定したN1〜N7、N9、N10と、ランドマークノードであるN8のグループを、LMG1として決定することにより、ランドマークノードグループを選択する。同様に、図4のグラフが示す例では、選択部15bは、LMG2〜LMG5を選択する。すなわち、図4のグラフが示す例では、選択部15bは、5つのランドマークノードグループを選択する。   Next, the selection unit 15b selects a node located at a predetermined distance from the landmark node and the group of the landmark nodes as a landmark node group. In the example shown in the graph of FIG. 4, the selection unit 15b identifies the nodes N1 to N7, N9, and N10 whose distances are “1” from N8, and identifies the identified N1 to N7, N9, and N10 and the landmark node. The landmark node group is selected by determining the group N8 as LMG1. Similarly, in the example shown in the graph of FIG. 4, the selection unit 15b selects LMG2 to LMG5. That is, in the example shown in the graph of FIG. 4, the selection unit 15b selects five landmark node groups.

第一の算出部15cは、選択部15bにより選択された複数のランドマークノードグループのそれぞれについて、ランドマークノードグループ内のノード間の平均距離を算出する。具体例について説明すると、第一の算出部15cは、選択部15bにより選択された複数のランドマークノードグループのうち、第一の算出部15cによって選択されていないランドマークノードグループ(未選択のランドマークノードグループ)を1つ選択する。そして、第一の算出部15cは、選択したランドマークノードグループ内の全てのノード間について、距離を算出する。そして、第一の算出部15cは、算出した全てのノード間の距離の和を算出し、算出した和を、選択したランドマークノードグループ内の全てのノード間の組み合わせの個数で除することにより、ランドマークノードグループ内のノード間の距離の平均値を算出する。なお、この距離の平均値が、平均距離である。このようにして、第一の算出部15cは、ノード間の平均距離を全てのランドマークノードグループについて算出する。例えば、図4のグラフが示す例では、第一の算出部15cは、LMG1について、ノード間の平均距離「1.4」を算出する。   The first calculation unit 15c calculates an average distance between nodes in the landmark node group for each of the plurality of landmark node groups selected by the selection unit 15b. A specific example will be described. The first calculation unit 15c includes a landmark node group (an unselected land) that is not selected by the first calculation unit 15c among the plurality of landmark node groups selected by the selection unit 15b. One mark node group) is selected. Then, the first calculation unit 15c calculates the distance between all the nodes in the selected landmark node group. Then, the first calculation unit 15c calculates the sum of the distances between all the calculated nodes, and divides the calculated sum by the number of combinations between all the nodes in the selected landmark node group. Then, the average value of the distances between the nodes in the landmark node group is calculated. The average value of this distance is the average distance. In this way, the first calculation unit 15c calculates the average distance between nodes for all landmark node groups. For example, in the example shown in the graph of FIG. 4, the first calculation unit 15 c calculates an average distance “1.4” between nodes for LMG1.

第二の算出部15dは、第一の算出部15cによりランドマークノードグループごとに算出されたランドマークノードグループ内のノード間の平均距離、および、隣接行列データ14bに基づいて、次のような処理を行う。すなわち、第二の算出部15dは、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を算出する。   Based on the average distance between the nodes in the landmark node group calculated by the first calculation unit 15c for each landmark node group and the adjacency matrix data 14b, the second calculation unit 15d Process. That is, the second calculation unit 15d calculates the distance between each of the landmark node groups and each of all the nodes.

具体例を挙げて説明する。第二の算出部15dは、ランドマークノードグループと、当該ランドマークノードグループ内のノードとの距離を、当該ランドマークノードグループについて、第一の算出部15cにより算出されたノード間の平均距離を所定値で割った値とする。図5は、実施例1に係る算出装置が実行する処理の一例を説明するための図である。図5の例は、図4のグラフが示す例におけるLMG1、および、LMG1内のN1に接続されたN11を示す。図5のグラフが示す例では、第二の算出部15dは、LMG1と、LMG1内のN1〜N10のそれぞれとの距離を次のように算出する。すなわち、第二の算出部15dは、LMG1について第一の算出部15cにより算出されたノード間の平均距離「1.4」を「2」で割った値「0.7」を、LMG1と、LMG1内のN1〜N10のそれぞれとの距離として算出する。   A specific example will be described. The second calculation unit 15d calculates the distance between the landmark node group and the nodes in the landmark node group, and the average distance between the nodes calculated by the first calculation unit 15c for the landmark node group. The value is divided by a predetermined value. FIG. 5 is a diagram for explaining an example of processing executed by the calculation apparatus according to the first embodiment. The example of FIG. 5 shows LMG1 in the example shown by the graph of FIG. 4 and N11 connected to N1 in LMG1. In the example shown in the graph of FIG. 5, the second calculation unit 15d calculates the distance between LMG1 and each of N1 to N10 in LMG1 as follows. That is, the second calculation unit 15d calculates a value “0.7” obtained by dividing the average distance “1.4” between nodes calculated by the first calculation unit 15c for LMG1 by “2”, and LMG1. Calculated as the distance to each of N1 to N10 in LMG1.

また、第二の算出部15dは、ランドマークノードグループと、当該ランドマークノードグループに属さないノードとの距離を、次のように算出する。すなわち、第二の算出部15dは、まず、当該ランドマークノードグループ内のノードであって、当該ランドマークノードグループに属さないノードに最も近いノードを特定する。そして、第二の算出部15dは、当該ランドマークノードグループについて第一の算出部15cにより算出されたノード間の平均距離を所定値で割った値に、当該ランドマークに属さない上記のノードと特定したノードとの距離を加算した値を算出する。このようにして、第二の算出部15dは、ランドマークノードグループと、当該ランドマークノードグループに属さないノードとの距離を算出する。図5のグラフが示す例では、第二の算出部15dは、LMG1と、LMG1に属さないN11との距離を次のように算出する。すなわち、第二の算出部15dは、まず、LMG1内のノードであって、LMG1に属さないN11に最も近いN1を特定する。そして、第二の算出部15dは、LMG1について第一の算出部15cにより算出されたノード間の平均距離「1.4」を「2」で割った値「0.7」に、LMG1に属さないN11と特定したノードN1との距離「1」を加算した値「1.7」を算出する。このようにして、第二の算出部15dは、LMG1と、LMG1に属さないN11との距離を算出する。   The second calculation unit 15d calculates the distance between the landmark node group and a node that does not belong to the landmark node group as follows. That is, the second calculation unit 15d first identifies a node that is in the landmark node group and is closest to a node that does not belong to the landmark node group. Then, the second calculation unit 15d adds the above-mentioned nodes not belonging to the landmark to a value obtained by dividing the average distance between the nodes calculated by the first calculation unit 15c for the landmark node group by a predetermined value. A value obtained by adding the distance to the identified node is calculated. In this way, the second calculation unit 15d calculates the distance between the landmark node group and a node that does not belong to the landmark node group. In the example shown in the graph of FIG. 5, the second calculation unit 15d calculates the distance between LMG1 and N11 that does not belong to LMG1 as follows. That is, the second calculation unit 15d first identifies N1 that is a node in LMG1 and is closest to N11 that does not belong to LMG1. Then, the second calculation unit 15d belongs to LMG1 to a value “0.7” obtained by dividing the average distance “1.4” between the nodes calculated by the first calculation unit 15c for LMG1 by “2”. A value “1.7” obtained by adding the distance “1” between the node N1 that is not present and the identified node N1 is calculated. In this way, the second calculation unit 15d calculates the distance between LMG1 and N11 that does not belong to LMG1.

また、第二の算出部15dは、上述した方法と同様の方法で、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を算出する。そして、第二の算出部15dは、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を示す情報である距離情報14bを記憶部14に格納する。   Further, the second calculation unit 15d calculates the distance between each of the landmark node groups and each of all the nodes by the same method as described above. Then, the second calculation unit 15d stores distance information 14b, which is information indicating the distance between each of the landmark node groups and each of all the nodes, in the storage unit 14.

第三の算出部15eは、第二の算出部15dにより算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する。具体例について説明する。入力部11から、算出処理を実行するための指示が入力されると、第三の算出部15eは、まず、指示に含まれる、距離の計算対象の2つのノード(ノードのペア)のIDから、2つのノードを特定する。以下、特定された2つのノードが、N,Nである場合について説明する。そして、第三の算出部15eは、記憶部14から距離情報14bを取得する。 The third calculation unit 15e calculates a distance between two nodes whose distances are to be calculated based on the distance calculated by the second calculation unit 15d. A specific example will be described. When an instruction for executing the calculation process is input from the input unit 11, the third calculation unit 15 e first determines from the IDs of two nodes (node pairs) that are included in the instruction and are distance calculation targets. Identify two nodes. Hereinafter, a case where the two specified nodes are N A and N B will be described. Then, the third calculation unit 15e acquires the distance information 14b from the storage unit 14.

次に、第三の算出部15eは、未選択のランドマークノードグループを1つ選択する。そして、第三の算出部15eは、取得した距離情報14bを参照し、ノードNと選択したランドマークノードグループとの距離「D」を特定する。また、第三の算出部15eは、取得した距離情報14bを参照し、ノードNと選択したランドマークノードグループとの距離「D」を特定する。その後、第三の算出部15eは、距離「D」と距離「D」との和「D+D」を距離の候補として算出する。第三の算出部15eは、全てのランドマークノードグループについて順番に1つずつ選択し、同様の処理を行って、全てのランドマークノードグループについて、距離の候補を算出する。 Next, the third calculation unit 15e selects one unselected landmark node group. Then, a third calculation unit 15e refers to the acquired distance information 14b, specifies the distance "D A" of the landmark node group and the selected node N A. The third calculation unit 15e refers to the acquired distance information 14b, specifies the distance "D B" in the landmark node group and the selected node N B. Then, a third calculation unit 15e calculates the distance sum "D A + D B" in the "D A" and the distance "D B" as the distance of the candidate. The third calculation unit 15e sequentially selects all the landmark node groups one by one, performs the same process, and calculates distance candidates for all the landmark node groups.

図6は、実施例1に係る算出装置が実行する処理の一例を説明するための図である。図6を参照して、入力された指示に含まれる2つのノードのIDから、N2およびN12が特定され、図3の例に示す距離情報14bを用いて、N2とN12との距離を算出する場合について説明する。図6の例に示すように、第三の算出部15eは、LMG1とN2との距離「0.7」と、LMG1とN12との距離「2.7」との和「3.4」を、N2とN12との距離の候補として算出する。また、図6の例に示すように、第三の算出部15eは、LMG2とN2との距離「2.7」と、LMG2とN12との距離「0.7」との和「3.4」を、N2とN12との距離の候補として算出する。また、図6の例に示すように、第三の算出部15eは、LMG3とN2との距離「1.7」と、LMG3とN12との距離「1.7」との和「3.4」を、N2とN12との距離の候補として算出する。また、図6の例に示すように、第三の算出部15eは、LMG4とN2との距離「2.7」と、LMG4とN12との距離「2.7」との和「5.4」を、N2とN12との距離の候補として算出する。また、図6の例に示すように、第三の算出部15eは、LMG5とN2との距離「2.7」と、LMG5とN12との距離「2.7」との和「5.4」を、N2とN12との距離の候補として算出する。   FIG. 6 is a schematic diagram illustrating an example of a process executed by the calculation apparatus according to the first embodiment. Referring to FIG. 6, N2 and N12 are identified from the IDs of the two nodes included in the input instruction, and the distance between N2 and N12 is calculated using distance information 14b shown in the example of FIG. The case will be described. As shown in the example of FIG. 6, the third calculation unit 15e calculates the sum “3.4” of the distance “0.7” between LMG1 and N2 and the distance “2.7” between LMG1 and N12. , N2 and N12 are calculated as candidate distances. Further, as illustrated in the example of FIG. 6, the third calculation unit 15 e adds the distance “2.7” between LMG2 and N2 and the sum “3.4” of the distance “0.7” between LMG2 and N12. Is calculated as a distance candidate between N2 and N12. Further, as illustrated in the example of FIG. 6, the third calculation unit 15 e adds the distance “1.7” between the LMG 3 and N 2 and the sum “3.4” of the distance “1.7” between the LMG 3 and N 12. Is calculated as a distance candidate between N2 and N12. Further, as illustrated in the example of FIG. 6, the third calculation unit 15 e adds the distance “2.7” between the LMG 4 and N 2 and the distance “2.7” between the LMG 4 and N 12 to “5.4”. Is calculated as a distance candidate between N2 and N12. Further, as illustrated in the example of FIG. 6, the third calculation unit 15 e has a sum “5.4” of the distance “2.7” between the LMG 5 and N 2 and the distance “2.7” between the LMG 5 and N 12. Is calculated as a distance candidate between N2 and N12.

その後、第三の算出部15eは、算出した距離の候補のうち、最も距離が短い候補を選択する。例えば、図6の例では、最も距離が短い候補として、距離の候補「3.4」を選択する。続いて、第三の算出部15eは、選択した候補を、小数第一位で四捨五入した値を、距離の計算対象の2つのノード間の距離として算出する。例えば、図6の例では、第三の算出部15eは、選択した距離の候補「3.4」を、小数第一位で四捨五入した値「3」を、N2、N12間の距離として算出する。なお、第三の算出部15eは、選択した距離の候補を、そのまま、距離の計算対象の2つのノード間の距離として算出することもできる。   Thereafter, the third calculation unit 15e selects a candidate having the shortest distance among the calculated distance candidates. For example, in the example of FIG. 6, the distance candidate “3.4” is selected as the candidate with the shortest distance. Subsequently, the third calculation unit 15e calculates a value obtained by rounding the selected candidate to the first decimal place as a distance between two nodes to be calculated. For example, in the example of FIG. 6, the third calculation unit 15e calculates a value “3” obtained by rounding the selected distance candidate “3.4” to the first decimal place as the distance between N2 and N12. . Note that the third calculation unit 15e can also calculate the selected distance candidate as it is as the distance between two nodes to be calculated.

出力制御部15fは、第三の算出部15eにより算出された2つのノード間の距離を表示するように、出力部12による表示を制御する。   The output control unit 15f controls the display by the output unit 12 so as to display the distance between the two nodes calculated by the third calculation unit 15e.

上述してきたように、制御部15は、各ランドマークノードグループについてノード間の平均距離を算出し、算出したノード間の平均距離を用いて、各ランドマークノードグループと、全ノードとの距離を算出し、算出した距離を含む距離情報14bを記憶させる。そして、制御部15bは、距離情報14bを参照して、2つのノード間の距離を算出する。このように、ノード間の距離を算出する際に用いられる距離情報14bが、ノード間の平均距離によって算出されるので、従来のランドマークノードと、全ノードとの距離を用いてノード間の距離を算出する場合と比較して、距離の算出結果の精度が良好となる。したがって、制御部15によれば、距離の算出結果の精度の低下を抑制することができる。   As described above, the control unit 15 calculates the average distance between the nodes for each landmark node group, and uses the calculated average distance between the nodes to determine the distance between each landmark node group and all the nodes. The distance information 14b including the calculated distance is calculated and stored. Then, the control unit 15b refers to the distance information 14b and calculates the distance between the two nodes. Thus, since the distance information 14b used when calculating the distance between the nodes is calculated based on the average distance between the nodes, the distance between the nodes using the distance between the conventional landmark node and all the nodes. Compared with the case of calculating the distance, the accuracy of the distance calculation result is better. Therefore, according to the control part 15, the fall of the precision of the calculation result of distance can be suppressed.

制御部15は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路またはCPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路である。   The control unit 15 is an integrated circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA) or an electronic circuit such as a central processing unit (CPU) or a micro processing unit (MPU).

[処理の流れ]
次に、本実施例に係る算出装置10の処理の流れについて説明する。図7は、実施例1に係る距離情報算出処理の手順を示すフローチャートである。距離情報算出処理は、例えば、入力部11から、距離情報算出処理を実行するための指示を制御部15が受け付けたタイミングで、実行される。
[Process flow]
Next, a processing flow of the calculation apparatus 10 according to the present embodiment will be described. FIG. 7 is a flowchart illustrating a procedure of distance information calculation processing according to the first embodiment. The distance information calculation process is executed, for example, at a timing when the control unit 15 receives an instruction for executing the distance information calculation process from the input unit 11.

図7に示すように、選択部15bは、記憶部14から、隣接行列データ14bを取得する(S101)。そして、選択部15bは、所定数のランドマークノードを選択し、選択した所定数のランドマークノードのそれぞれについて、次のような処理を行う。すなわち、選択部15bは、当該ランドマークノードから所定の距離に位置するノードおよび当該ランドマークノードのグループを、ランドマークノードグループとして選択する(S102)。   As illustrated in FIG. 7, the selection unit 15b acquires the adjacency matrix data 14b from the storage unit 14 (S101). Then, the selection unit 15b selects a predetermined number of landmark nodes, and performs the following process for each of the selected predetermined number of landmark nodes. That is, the selection unit 15b selects a node located at a predetermined distance from the landmark node and a group of the landmark nodes as a landmark node group (S102).

続いて、第一の算出部15cは、選択部15bにより選択された複数のランドマークノードグループのうち、後述のS104で未選択のランドマークノードグループがあるか否かを判定する(S103)。未選択のランドマークノードグループがある場合(S103肯定)には、第一の算出部15cは、未選択のランドマークノードグループを1つ選択する(S104)。そして、第一の算出部15cは、選択したランドマークノードグループ内の全てのノード間について、距離を算出し、算出した全てのノード間の距離の和を算出し、その後、次のような処理を行う。すなわち、第一の算出部15cは、算出した和を、選択したランドマークノードグループ内の全てのノード間の組み合わせの個数で除することにより、ランドマークノードグループ内のノード間の距離の平均値(平均距離)を算出する(S105)。   Subsequently, the first calculation unit 15c determines whether there is a landmark node group that has not been selected in S104, which will be described later, among the plurality of landmark node groups selected by the selection unit 15b (S103). When there is an unselected landmark node group (Yes in S103), the first calculation unit 15c selects one unselected landmark node group (S104). Then, the first calculation unit 15c calculates the distance between all the nodes in the selected landmark node group, calculates the sum of the calculated distances between all the nodes, and then performs the following processing I do. That is, the first calculation unit 15c divides the calculated sum by the number of combinations between all the nodes in the selected landmark node group, thereby calculating the average value of the distances between the nodes in the landmark node group. (Average distance) is calculated (S105).

そして、第二の算出部15dは、第一の算出部15cによりランドマークノードグループごとに算出されたランドマークノードグループ内のノード間の平均距離、および、隣接行列データ14bに基づいて、次のような処理を行う。すなわち、第二の算出部15dは、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を算出し(S106)、S103へ戻る。   Then, the second calculation unit 15d calculates the following based on the average distance between the nodes in the landmark node group calculated for each landmark node group by the first calculation unit 15c, and the adjacency matrix data 14b. Perform the following process. That is, the second calculation unit 15d calculates the distance between each of the landmark node groups and all the nodes (S106), and returns to S103.

一方、未選択のランドマークノードグループがない場合(S103否定)には、第二の算出部15dは、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を示す情報である距離情報14bを記憶部14に格納し(S107)、処理を終了する。   On the other hand, when there is no unselected landmark node group (No in S103), the second calculation unit 15d has distance information 14b that is information indicating the distance between each of the landmark node groups and each of all the nodes. Is stored in the storage unit 14 (S107), and the process is terminated.

図8は、実施例1に係る算出処理の手順を示すフローチャートである。算出処理は、例えば、入力部11から、算出処理を実行するための指示を制御部15が受け付けたタイミングで、実行される。   FIG. 8 is a flowchart illustrating the procedure of the calculation process according to the first embodiment. The calculation process is executed, for example, at a timing when the control unit 15 receives an instruction to execute the calculation process from the input unit 11.

図8に示すように、第三の算出部15eは、算出処理を実行するための指示に含まれる、距離の計算対象の2つのノードのIDから、2つのノードN,Nを特定する(S201)。そして、第三の算出部15eは、記憶部14から距離情報14bを取得する(S202)。 As illustrated in FIG. 8, the third calculation unit 15 e identifies two nodes N A and N B from the IDs of the two nodes whose distances are to be calculated included in the instruction for executing the calculation process. (S201). And the 3rd calculation part 15e acquires the distance information 14b from the memory | storage part 14 (S202).

次に、第三の算出部15eは、後述のS204で未選択のランドマークノードグループがあるか否かを判定する(S203)。未選択のランドマークノードグループを1つ選択する(S204)。そして、第三の算出部15eは、取得した距離情報14bを参照し、ノードNと選択したランドマークノードグループとの距離「D」を特定する(S205)。続いて、第三の算出部15eは、取得した距離情報14bを参照し、ノードNと選択したランドマークノードグループとの距離「D」を特定する(S206)。その後、第三の算出部15eは、距離「D」と距離「D」との和「D+D」を距離の候補として算出し(S207)、S203へ戻る。 Next, the third calculation unit 15e determines whether there is a landmark node group that has not been selected in S204, which will be described later (S203). One unselected landmark node group is selected (S204). Then, a third calculation unit 15e refers to the acquired distance information 14b, specifies the distance "D A" of the landmark node group and the selected node N A (S205). Then, a third calculation unit 15e refers to the acquired distance information 14b, specifies the distance "D B" in the landmark node group and the selected node N B (S206). Then, a third calculation unit 15e, the distance is calculated as the sum "D A + D B" distances of the candidate with "D A" and the distance "D B" (S207), returns to S203.

その後、第三の算出部15eは、算出した距離の候補のうち、最も距離が短い候補を選択する(S208)。続いて、第三の算出部15eは、選択した候補を、小数第一位で四捨五入した値を、距離の計算対象の2つのノード間の距離として算出する(S209)。   Thereafter, the third calculation unit 15e selects the candidate with the shortest distance among the calculated distance candidates (S208). Subsequently, the third calculation unit 15e calculates a value obtained by rounding the selected candidate to the first decimal place as the distance between the two nodes to be calculated (S209).

そして、出力制御部15fは、第三の算出部15eにより算出された2つのノード間の距離を表示するように、出力部12による表示を制御し(S210)、処理を終了する。   Then, the output control unit 15f controls the display by the output unit 12 so as to display the distance between the two nodes calculated by the third calculation unit 15e (S210), and ends the process.

上述してきたように、本実施例に係る算出装置10は、複数のノードを有するグラフにおけるノード間の接続状態を示す隣接行列データ14bに基づいて、複数のノードの中から、それぞれ複数のノードを有する複数のランドマークノードグループを選択する。そして、算出装置10は、選択された複数のランドマークノードグループのそれぞれについて、ランドマークノードグループ内のノード間の平均距離を算出する。続いて、算出装置10は、ランドマークノードグループ内のノード間の平均距離、および、隣接行列データ14bに基づいて、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を示す距離情報14b算出する。その後、算出装置10は、算出された距離情報14bに基づいて、距離の算出対象の2つのノード間の距離を算出する。このように、ノード間の距離を算出する際に用いられる距離情報14bが、ノード間の平均距離によって算出されるので、従来のランドマークノードと、全ノードとの距離を用いてノード間の距離を算出する場合と比較して、距離の算出結果の精度が良好となる。したがって、算出装置10によれば、距離の算出結果の精度の低下を抑制することができる。   As described above, the calculation device 10 according to the present embodiment calculates a plurality of nodes from among the plurality of nodes based on the adjacency matrix data 14b indicating the connection state between the nodes in the graph having the plurality of nodes. A plurality of landmark node groups are selected. Then, the calculation device 10 calculates the average distance between the nodes in the landmark node group for each of the plurality of selected landmark node groups. Subsequently, the calculation apparatus 10 uses the average distance between the nodes in the landmark node group and the adjacency matrix data 14b, and distance information 14b indicating the distance between each of the landmark node groups and each of all the nodes. calculate. Thereafter, the calculation device 10 calculates the distance between the two nodes whose distance is to be calculated based on the calculated distance information 14b. Thus, since the distance information 14b used when calculating the distance between the nodes is calculated based on the average distance between the nodes, the distance between the nodes using the distance between the conventional landmark node and all the nodes. Compared with the case of calculating the distance, the accuracy of the distance calculation result is better. Therefore, according to the calculation device 10, it is possible to suppress a decrease in accuracy of the distance calculation result.

実施例2では、隣接行列の固有値および固有ベクトルを算出し、算出した固有値および固有ベクトルに基づいて、2つのノード間の距離を算出する場合について説明する。   In the second embodiment, a case will be described in which eigenvalues and eigenvectors of an adjacency matrix are calculated, and a distance between two nodes is calculated based on the calculated eigenvalues and eigenvectors.

[算出装置20の構成]
図9は、実施例2に係る算出装置の機能構成の一例を示す図である。図9に示すように、算出装置20は、記憶部24および制御部25を有する。記憶部24は、図1に示す実施例1に係る記憶部14の記憶内容に加えて、固有値データ24aおよび固有ベクトルデータ24bを記憶する点が実施例1に係る記憶部14と異なる。固有値データ24aおよび固有ベクトルデータ24bについては、後述する。また、制御部25は、図1に示す実施例1に係る制御部15と比較して、選択部25a、第一の算出部25b、第二の算出部25c、出力制御部25dを有する点が異なる。なお、以下では、上記の実施例1と同様の機能を果たす各部や機器については図1と同様の符号を付し、その説明は省略することとする。
[Configuration of Calculation Device 20]
FIG. 9 is a diagram illustrating an example of a functional configuration of the calculation apparatus according to the second embodiment. As illustrated in FIG. 9, the calculation device 20 includes a storage unit 24 and a control unit 25. The storage unit 24 is different from the storage unit 14 according to the first embodiment in that eigenvalue data 24a and eigenvector data 24b are stored in addition to the storage contents of the storage unit 14 according to the first embodiment illustrated in FIG. The eigenvalue data 24a and eigenvector data 24b will be described later. Moreover, the control part 25 has the point which has the selection part 25a, the 1st calculation part 25b, the 2nd calculation part 25c, and the output control part 25d compared with the control part 15 which concerns on Example 1 shown in FIG. Different. In the following description, the same reference numerals as those in FIG. 1 are given to the respective units and devices that perform the same functions as those in the first embodiment, and the description thereof will be omitted.

選択部25aは、隣接行列データ14bが示す隣接行列から複数の固有値、および、複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、算出した複数の固有値および複数の固有ベクトルに基づいて、ランドマークノードグループを選択する。   The selection unit 25a calculates each of a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from the adjacency matrix indicated by the adjacency matrix data 14b, and based on the calculated plurality of eigenvalues and the plurality of eigenvectors, Select a landmark node group.

具体例について説明すると、選択部25aは、まず、記憶部14から、隣接行列データ14bを取得する。そして、選択部25aは、隣接行列データ14bが示す隣接行列の固有値を算出する。図10は、隣接行列の一例を示す図である。図10には、N1〜N50の50個のノード間の接続状態を示す隣接行列が示されている。例えば、選択部25aは、図10の例の隣接行列を示す隣接行列データ14bを取得した場合に、隣接行列の固有ベクトルが重複しないときには、50個の固有値を算出する。そして、選択部25aは、算出した固有値の中から、絶対値が大きい順に、最も大きい固有値から所定数個までの固有値を特定し、特定した固有値のデータを固有値データ24aとして記憶部24に格納する。例えば、選択部25aは、上位5個の固有値を特定する。図11Aは、固有値および固有ベクトルの一例を示す図である。図11Aの例は、選択部25aが、算出した固有値の中から、絶対値が大きい上位5個の固有値を特定した場合を示す。なお、下記の説明では、選択部25aが、絶対値が大きい上位5個の固有値を特定する場合について説明する。また、図11Aの例は、上位5個の固有値の値が全て「10」である場合を示す。   To describe a specific example, the selection unit 25a first acquires the adjacency matrix data 14b from the storage unit 14. Then, the selection unit 25a calculates the eigenvalue of the adjacency matrix indicated by the adjacency matrix data 14b. FIG. 10 is a diagram illustrating an example of the adjacency matrix. FIG. 10 shows an adjacency matrix indicating connection states between 50 nodes N1 to N50. For example, when the adjacency matrix data 14b indicating the adjacency matrix in the example of FIG. 10 is acquired, the selection unit 25a calculates 50 eigenvalues when the eigenvectors of the adjacency matrix do not overlap. Then, the selection unit 25a specifies the eigenvalues from the largest eigenvalue to a predetermined number from the calculated eigenvalues in descending order, and stores the specified eigenvalue data in the storage unit 24 as eigenvalue data 24a. . For example, the selection unit 25a identifies the top five eigenvalues. FIG. 11A is a diagram illustrating an example of eigenvalues and eigenvectors. The example of FIG. 11A shows a case where the selection unit 25a specifies the top five eigenvalues having the largest absolute value from the calculated eigenvalues. In the following description, a case will be described in which the selection unit 25a identifies the top five eigenvalues with large absolute values. Further, the example of FIG. 11A shows a case where the values of the top five eigenvalues are all “10”.

そして、選択部25aは、固有値を特定すると、次のような処理を行う。すなわち、選択部25aは、まず、変数nの値を0に設定する。そして、選択部25aは、上位5個の固有値のうち、未選択の固有値があるか否かを判定する。未選択の固有値がある場合には、選択部25aは、変数nの値を1つインクリメントする。その後、選択部25aは、未選択の1つの固有値を固有値Eとして選択する。図11Aの例では、選択部25aが、まず、未選択の1つの固有値「10」を固有値Eとして選択した場合が示されている。 And the selection part 25a will perform the following processes, if an eigenvalue is specified. That is, the selection unit 25a first sets the value of the variable n to 0. Then, the selection unit 25a determines whether there is an unselected eigenvalue among the top five eigenvalues. When there is an unselected eigenvalue, the selection unit 25a increments the value of the variable n by one. Then, the selection unit 25a selects one of the eigenvalues of unselected as eigenvalues E n. In the example of FIG. 11A, the selection unit 25a is, first, the case of selecting the "10" one of the eigenvalues of unselected as eigenvalues E 1 is shown.

続いて、選択部25aは、選択した固有値Eに対応する固有ベクトルVを算出し、算出した固有ベクトルのデータを固有ベクトルデータ24bとして記憶部24に格納する。図11Aの例では、選択部25aが、選択した固有値Eに対応する固有ベクトルVを算出した場合が示されている。続いて、選択部25aは、絶対値が、固有値Eの絶対値の平方根の逆数(1/(E1/2)より大きい固有ベクトルVの成分を特定する。図11Bは、固有値の絶対値の平方根の逆数の一例を示す図である。図11Bの例は、固有値E〜Eの各値が「10」である場合に、各固有値の絶対値の平方根の逆数が、ほぼ「0.3」であることを示す。すなわち、図11Aの例において、選択部25aは、絶対値が、固有値Eの絶対値の平方根の逆数「0.3」より大きい固有ベクトルVの成分として、N1に対応する「0.34」を特定する。また、選択部25aは、絶対値が、固有値Eの絶対値の平方根の逆数「0.3」より大きい固有ベクトルVの成分として、N2に対応する「0.34」を特定する。また、選択部25aは、絶対値が、固有値Eの絶対値の平方根の逆数「0.3」より大きい固有ベクトルVの成分として、N3に対応する「0.35」を特定する。また、選択部25aは、絶対値が、固有値Eの絶対値の平方根の逆数「0.3」より大きい固有ベクトルVの成分として、N4に対応する「0.34」を特定する。 Subsequently, the selection unit 25a calculates the eigenvectors V n corresponding to eigenvalues E n selected, stored in the storage unit 24 the data of the calculated eigenvectors as unique vector data 24b. In the example of FIG. 11A, the selection unit 25a is, when calculating the eigenvectors V n corresponding to eigenvalues E 1 selected is shown. Subsequently, the selection unit 25a, the absolute value, the absolute value of the reciprocal of the square root of the eigenvalues E n (1 / (E n ) 1/2) identifying the components of a larger eigenvectors V n. FIG. 11B is a diagram illustrating an example of the reciprocal of the square root of the absolute value of the eigenvalue. The example of FIG. 11B indicates that when each value of the eigenvalues E 1 to E 5 is “10”, the reciprocal of the square root of the absolute value of each eigenvalue is approximately “0.3”. That is, in the example of FIG. 11A, selection unit 25a, the absolute value, as a component of the inverse "0.3" is greater than the eigenvectors V 1 of the absolute value of the square root of the eigenvalues E 1, corresponding to N1 "0.34" Is identified. The selection unit 25a, the absolute value, as a component of the inverse "0.3" is greater than the eigenvectors V 1 of the square root of the absolute value of the eigenvalues E 1, to identify the "0.34" corresponding to N2. The selection unit 25a, the absolute value, as a component of the inverse "0.3" is greater than the eigenvectors V 1 of the absolute value of the square root of the eigenvalues E 1, to identify the "0.35" corresponding to N3. The selection unit 25a, the absolute value, as a component of the inverse "0.3" is greater than the eigenvectors V 1 of the square root of the absolute value of the eigenvalues E 1, to identify the "0.34" corresponding to N4.

そして、選択部25aは、特定した成分に対応するノードの集合を、ランドマークノードグループGとして選択する。例えば、図11Aの例では、選択部25aは、N1〜N4のノードの集合を、ランドマークノードグループGとして選択する。これにより、いわゆる「密」になっているノード同士をランドマークノードグループとして選択することできる。なお、ここでいう「密になっているノード同士」とは、互いに、接続されているエッジ数が多いノード群を指す。 Then, the selection unit 25a selects a set of nodes corresponding to the identified component as the landmark node group Gn . For example, in the example of FIG. 11A, selection unit 25a, a set of nodes N1-N4, it is selected as the landmark node group G 1. Thereby, so-called “dense” nodes can be selected as landmark node groups. Here, “dense nodes” refers to a node group having a large number of connected edges.

第一の算出部25bは、固有値および固有ベクトルに基づいて、複数のランドマークノードグループのそれぞれと、複数のノードのそれぞれとの距離を算出する。具体例について説明する。第一の算出部25bは、選択部25aにより選択されたランドマークノードグループGと、全てのノードのそれぞれとの距離を次のようにして算出する。すなわち、第一の算出部25bは、固有ベクトルVのノードの成分の絶対値についてEの絶対値を底とする対数をとった値に、マイナス「−」を掛けた値を、ランドマークノードグループGとノードとの距離として算出する。図12は、距離の算出方法の一例を説明するための図である。図12の例では、第一の算出部25bが、固有ベクトルVのN1の成分の絶対値についてEの絶対値「10」を底とする対数をとった値に、マイナス「−」を掛けた値を、ランドマークノードグループGとN1との距離として算出する。このようにして、第一の算出部25bは、選択部25aにより選択されたランドマークノードグループGと、全てのノードのそれぞれとの距離を算出する。そして、第一の算出部25bは、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を示す情報である距離情報14bを記憶部24に格納する。なお、実施例2において、第一の算出部25bに代えて、実施例1に係る第一の算出部15cおよび第二の算出部15dを採用して、実施例1と同様に、選択されたランドマークノードグループGと、全てのノードのそれぞれとの距離を算出することもできる。 The first calculation unit 25b calculates the distance between each of the plurality of landmark node groups and each of the plurality of nodes based on the eigenvalue and the eigenvector. A specific example will be described. The first calculation unit 25b calculates the distance between the landmark node group Gn selected by the selection unit 25a and each of all the nodes as follows. That is, the first calculation unit 25b, the value of the logarithm to base the absolute value of E n the absolute value of the components of the node of eigenvectors V 1, minus "-" a value obtained by multiplying, landmark nodes Calculated as the distance between the group Gn and the node. FIG. 12 is a diagram for explaining an example of a distance calculation method. In the example of FIG. 12, the first calculation unit 25b multiplies the value obtained by taking the logarithm of the absolute value “10” of E 2 with respect to the absolute value of the N1 component of the eigenvector V 2 by minus “−”. the value is calculated as the distance between the landmark node group G 2 and the N1. In this way, the first calculation unit 25b calculates the distance between the landmark node group Gn selected by the selection unit 25a and each of all the nodes. The first calculation unit 25b stores distance information 14b, which is information indicating the distance between each of the landmark node groups and each of all the nodes, in the storage unit 24. In the second embodiment, instead of the first calculation unit 25b, the first calculation unit 15c and the second calculation unit 15d according to the first embodiment are adopted and selected in the same manner as in the first embodiment. It is also possible to calculate the distance between the landmark node group Gn and each of all the nodes.

第二の算出部25c、出力制御部25dについては、それぞれ、実施例1に係る第三の算出部15e、出力制御部15fと同様であるため、説明を省略する。   Since the second calculation unit 25c and the output control unit 25d are the same as the third calculation unit 15e and the output control unit 15f according to the first embodiment, description thereof is omitted.

制御部25は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路またはCPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路である。   The control unit 25 is an integrated circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA), or an electronic circuit such as a central processing unit (CPU) or a micro processing unit (MPU).

[処理の流れ]
次に、本実施例に係る算出装置20の処理の流れについて説明する。図13は、実施例2に係る距離情報算出処理の手順を示すフローチャートである。距離情報算出処理は、例えば、入力部11から、距離情報算出処理を実行するための指示を制御部25が受け付けたタイミングで、実行される。
[Process flow]
Next, a processing flow of the calculation device 20 according to the present embodiment will be described. FIG. 13 is a flowchart illustrating a procedure of distance information calculation processing according to the second embodiment. The distance information calculation process is executed, for example, at a timing when the control unit 25 receives an instruction for executing the distance information calculation process from the input unit 11.

図13に示すように、選択部25aは、記憶部14から、隣接行列データ14bを取得する(S301)。そして、選択部25aは、隣接行列データ14bが示す隣接行列の固有値を算出する(S302)。そして、選択部25aは、算出した固有値の中から、絶対値が大きい上位5個の固有値を特定し、特定した固有値のデータを固有値データ24aとして記憶部24に格納する(S303)。そして、選択部25aは、変数nの値を0に設定する(S304)。   As illustrated in FIG. 13, the selection unit 25a acquires the adjacency matrix data 14b from the storage unit 14 (S301). Then, the selection unit 25a calculates the eigenvalue of the adjacency matrix indicated by the adjacency matrix data 14b (S302). Then, the selection unit 25a identifies the top five eigenvalues having a large absolute value from the calculated eigenvalues, and stores the identified eigenvalue data in the storage unit 24 as eigenvalue data 24a (S303). Then, the selection unit 25a sets the value of the variable n to 0 (S304).

そして、選択部25aは、上位5個の固有値のうち、未選択の固有値があるか否かを判定する(S305)。未選択の固有値がある場合(S305肯定)には、選択部25aは、変数nの値を1つインクリメントする(S306)。その後、選択部25aは、未選択の1つの固有値を固有値Eとして選択する(S307)。 Then, the selection unit 25a determines whether there is an unselected eigenvalue among the top five eigenvalues (S305). When there is an unselected eigenvalue (Yes in S305), the selection unit 25a increments the value of the variable n by 1 (S306). Then, the selection unit 25a selects one of the eigenvalues of unselected as the eigenvalues E n (S307).

続いて、選択部25aは、選択した固有値Eに対応する固有ベクトルVを算出し、算出した固有ベクトルのデータを固有ベクトルデータ24bとして記憶部24に格納する(S308)。続いて、選択部25aは、絶対値が、固有値Eの絶対値の平方根の逆数(1/(E1/2)より大きい固有ベクトルVの成分を特定する(S309)。 Subsequently, the selection unit 25a calculates the eigenvectors V n corresponding to eigenvalues E n selected, stored in the storage unit 24 the data of the calculated eigenvectors as unique vector data 24b (S308). Subsequently, the selection unit 25a, the absolute value, the absolute value of the reciprocal of the square root of the eigenvalues E n (1 / (E n ) 1/2) identifying the components of a larger eigenvectors V n (S309).

そして、選択部25aは、特定した成分に対応するノードの集合を、ランドマークノードグループGとして選択する(S310)。続いて、第一の算出部25bは、固有ベクトルVのノードの成分の絶対値についてEの絶対値を底とする対数をとった値に、マイナス「−」を掛けた値を、ランドマークノードグループGとノードとの距離として算出する処理を、全ノードに対して行う(S311)。そして、S305に戻る。 Then, the selection unit 25a selects a set of nodes corresponding to the identified component as the landmark node group Gn (S310). Subsequently, the first calculating unit 25b, the value of the logarithm to base the absolute value of E n the absolute value of the components of the node of eigenvectors V 1, minus "-" a value obtained by multiplying, landmarks The process of calculating the distance between the node group Gn and the node is performed for all nodes (S311). Then, the process returns to S305.

ここで、未選択の固有値がない場合(S305否定)には、第一の算出部25bは、ランドマークノードグループのそれぞれと、全ノードのそれぞれとの距離を示す情報である距離情報14bを記憶部24に格納し(S312)、処理を終了する。   Here, when there is no unselected eigenvalue (No in S305), the first calculation unit 25b stores distance information 14b that is information indicating the distance between each of the landmark node groups and all the nodes. The data is stored in the unit 24 (S312), and the process ends.

なお、算出処理については、実施例1と同様であるため、説明を省略する。   Note that the calculation process is the same as that in the first embodiment, and thus the description thereof is omitted.

上述してきたように、本実施例に係る算出装置20は、隣接行列データ14bが示す隣接行列から複数の固有値、および、複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出する。そして、算出装置20は、算出した複数の固有値および複数の固有ベクトルに基づいて、ランドマークノードグループを選択する。そして、算出装置20は、固有値および固有ベクトルに基づいて、複数のランドマークノードグループのそれぞれと、複数のノードのそれぞれとの距離を示す距離情報14bを算出する。その後、算出装置20は、算出された距離情報14bに基づいて、距離の算出対象の2つのノード間の距離を算出する。このように、ノード間の距離を算出する際に用いられる距離情報14bが、「密」になったノード同士を有するランドマークノードグループごとに算出されるので、距離の算出結果の精度がさらに良好となる。したがって、算出装置20によれば、距離の算出結果の精度の低下を抑制することができる。   As described above, the calculation device 20 according to the present embodiment calculates a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from the adjacency matrix indicated by the adjacency matrix data 14b. Then, the calculation device 20 selects a landmark node group based on the calculated plural eigenvalues and plural eigenvectors. Then, the calculation device 20 calculates distance information 14b indicating the distance between each of the plurality of landmark node groups and each of the plurality of nodes based on the eigenvalue and the eigenvector. Thereafter, the calculation device 20 calculates the distance between the two nodes whose distance is to be calculated based on the calculated distance information 14b. Thus, since the distance information 14b used when calculating the distance between the nodes is calculated for each landmark node group having “dense” nodes, the accuracy of the distance calculation result is further improved. It becomes. Therefore, according to the calculation device 20, it is possible to suppress a decrease in accuracy of the distance calculation result.

実施例2では、ランドマークノードグループを選択したが、実施例3では、ランドマークノードグループを選択せずに、2つのノード間の距離を算出する場合について説明する。   In the second embodiment, the landmark node group is selected. In the third embodiment, a case where the distance between two nodes is calculated without selecting the landmark node group will be described.

[算出装置30の構成]
図14は、実施例3に係る算出装置の機能構成の一例を示す図である。図14に示すように、算出装置30は、記憶部34および制御部35を有する。記憶部34は、図9に示す実施例2に係る記憶部24の記憶内容のうち、隣接行列データ14b、固有値データ24aおよび固有ベクトルデータ24bを記憶する点が実施例2に係る記憶部24と異なる。また、制御部35は、図9に示す実施例2に係る制御部25と比較して、第一の算出部35a、第二の算出部35b、出力制御部35cを有する点が異なる。なお、以下では、上記の実施例1、2と同様の機能を果たす各部や機器については図1、図9と同様の符号を付し、その説明は省略することとする。
[Configuration of Calculation Device 30]
FIG. 14 is a diagram illustrating an example of a functional configuration of the calculation apparatus according to the third embodiment. As illustrated in FIG. 14, the calculation device 30 includes a storage unit 34 and a control unit 35. The storage unit 34 is different from the storage unit 24 according to the second embodiment in that it stores adjacency matrix data 14b, eigenvalue data 24a, and eigenvector data 24b among the storage contents of the storage unit 24 according to the second embodiment illustrated in FIG. . The control unit 35 is different from the control unit 25 according to the second embodiment illustrated in FIG. 9 in that the control unit 35 includes a first calculation unit 35a, a second calculation unit 35b, and an output control unit 35c. In the following description, the same reference numerals as those in FIGS. 1 and 9 are used for components and devices that perform the same functions as those in the first and second embodiments, and the description thereof is omitted.

第一の算出部35aは、隣接行列データ14bが示す隣接行列から複数の固有値、および、複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出する。   The first calculator 35a calculates a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from the adjacency matrix indicated by the adjacency matrix data 14b.

具体例について説明すると、第一の算出部35aは、まず、記憶部34から、隣接行列データ14bを取得する。そして、第一の算出部35aは、隣接行列データ14bが示す隣接行列の固有値を算出する。そして、第一の算出部35aは、算出した固有値の中から、絶対値が大きい順に、最も大きい固有値から所定数個までの固有値を特定する。例えば、第一の算出部35aは、上位5個の固有値を特定する。なお、下記の説明では、第一の算出部35aが、絶対値が大きい上位5個の固有値を特定する場合について説明する。   A specific example will be described. First, the first calculation unit 35 a first acquires the adjacency matrix data 14 b from the storage unit 34. Then, the first calculator 35a calculates the eigenvalue of the adjacency matrix indicated by the adjacency matrix data 14b. Then, the first calculation unit 35a specifies, from the calculated eigenvalues, the largest eigenvalue to a predetermined number of eigenvalues in descending order of the absolute value. For example, the first calculation unit 35a identifies the top five eigenvalues. In the following description, a case will be described in which the first calculation unit 35a specifies the top five eigenvalues having a large absolute value.

そして、第一の算出部35aは、固有値を特定すると、次のような処理を行う。すなわち、第一の算出部35aは、まず、変数nの値を0に設定する。そして、第一の算出部35aは、上位5個の固有値のうち、未選択の固有値があるか否かを判定する。未選択の固有値がある場合には、第一の算出部35aは、変数nの値を1つインクリメントする。その後、第一の算出部35aは、未選択の1つの固有値を固有値Eとして選択する。 And the 1st calculation part 35a will perform the following processes, if an eigenvalue is specified. That is, the first calculation unit 35a first sets the value of the variable n to 0. Then, the first calculation unit 35a determines whether there is an unselected eigenvalue among the top five eigenvalues. If there is an unselected eigenvalue, the first calculation unit 35a increments the value of the variable n by one. Then, the first calculating unit 35a selects one of the eigenvalues of unselected as eigenvalues E n.

続いて、第一の算出部35aは、選択した固有値Eに対応する固有ベクトルVを算出する。そして、第一の算出部35aは、再び、上位5個の固有値のうち、未選択の固有値があるか否かを判定する。第一の算出部35aは、未選択の固有値がないと判定するまで、変数nの値を1つインクリメントし、未選択の固有値Eを選択し、選択した固有値Eに対応する固有ベクトルVを算出する処理を繰り返し行う。 Subsequently, the first calculating unit 35a calculates the eigenvectors V n corresponding to eigenvalues E n selected. Then, the first calculation unit 35a again determines whether there is an unselected eigenvalue among the top five eigenvalues. First calculation unit 35a, until it is determined that no eigenvalue unselected, is incremented by one the value of the variable n, select the eigenvalues E n unselected, eigenvector V n corresponding to eigenvalues E n selected The process of calculating is repeated.

そして、未選択の固有値がないと判定した場合には、第一の算出部35aは、次のような処理を行う。すなわち、第一の算出部35aは、固有ベクトルV(n=1、2、・・・5)のデータを固有ベクトルデータ24bとして記憶部34に格納し、固有値E(n=1、2、・・・5)のデータを固有値データ24aとして記憶部34に格納する。 When it is determined that there is no unselected eigenvalue, the first calculation unit 35a performs the following process. That is, the first calculation unit 35a stores the data of the eigenvector V n (n = 1, 2,... 5) as the eigenvector data 24b in the storage unit 34, and the eigenvalue E n (n = 1, 2,. ... 5) is stored in the storage unit 34 as the eigenvalue data 24a.

第二の算出部35bは、複数の固有ベクトルV(n=1、2、・・・5)ごとに、距離の算出対象の2つのノードのそれぞれに対応する固有ベクトルVの2つの成分の積と、固有ベクトルVに対応する固有値Eのk乗の値との積を算出する。そして、第二の算出部35bは、複数の固有ベクトルVごとに算出した積の値の総和を算出する。続いて、第二の算出部35bは、算出した総和が、隣接行列においてノード間が接続していることを示す値「1」から所定値「α」を減算した値「1−α」を超える最小のkの値を、2つのノード間の距離として算出する。 Second calculating unit 35b, a plurality of eigenvectors V n (n = 1,2, ··· 5) each, the distance the product of two components of the eigenvector V n corresponding to each of the two nodes to be calculated for And the product of the eigenvalue E n corresponding to the eigenvector V n and the value of the k-th power. Then, the second calculation unit 35b calculates the sum of the value of the product calculated for each of the plurality of eigenvectors V n. Subsequently, in the second calculation unit 35b, the calculated sum exceeds the value “1-α” obtained by subtracting the predetermined value “α” from the value “1” indicating that the nodes are connected in the adjacent matrix. The minimum value of k is calculated as the distance between the two nodes.

具体例について説明する。入力部11から、算出処理を実行するための指示が入力されると、第二の算出部35bは、まず、指示に含まれる、距離の計算対象の2つのノード(ノードのペア)のIDから、2つのノードを特定する。以下、特定された2つのノードが、N,Nである場合について説明する。そして、第二の算出部35bは、記憶部34から固有ベクトルデータ24b、固有値データ24aを取得する。次に、第二の算出部35bは、変数kの値を0に設定する。 A specific example will be described. When an instruction for executing a calculation process is input from the input unit 11, the second calculation unit 35 b first determines from the IDs of two nodes (node pairs) that are included in the instruction and are distance calculation targets. Identify two nodes. Hereinafter, a case where the two specified nodes are N A and N B will be described. Then, the second calculation unit 35b acquires the eigenvector data 24b and the eigenvalue data 24a from the storage unit 34. Next, the second calculation unit 35b sets the value of the variable k to 0.

その後、第二の算出部35bは、変数kの値を1つインクリメントする。そして、第二の算出部35bは、次の式によって、「J」の値を算出する。

Figure 2013164693
Thereafter, the second calculation unit 35b increments the value of the variable k by one. Then, the second calculation unit 35b calculates the value of “J” by the following equation.
Figure 2013164693

ここで、隣接行列を「A」、隣接行列Aの固有ベクトルを列方向に並べた行列を「P」、行列Pの逆行列を「P−1」、P−1AP=Wとすると、行列Wは、対角成分に固有値を有し、他の成分が「0」となる行列である。また、A=PWP−1であることから、A=PW−1である。さらに、Aが示す行列において、2つのノード間の接続状態を示す成分が、「1」以上となるときのkの値が、2つのノード間の距離を示すため、上記の式は、Aの近似式である。 Here, when the adjacency matrix is “A”, the matrix in which the eigenvectors of the adjacency matrix A are arranged in the column direction is “P”, the inverse matrix of the matrix P is “P −1 ”, and P −1 AP = W, the matrix W Is a matrix in which diagonal components have eigenvalues and the other components are “0”. Further, since A = PWP −1 , A k = PW k P −1 . Furthermore, since the value of k when the component indicating the connection state between two nodes is “1” or more in the matrix indicated by A k indicates the distance between the two nodes, It is an approximate expression of k .

図15および図16は、実施例3にかかる算出装置が実行する処理の一例を説明するための図である。図15の例は、第二の算出部35bが、算出処理を実行するための指示に含まれる、距離の計算対象の2つのノードのIDから、N1、N25を特定した場合を示す。また、図15の例は、第二の算出部35bが取得した固有ベクトルデータ24bが示す固有ベクトルの成分のうち、固有ベクトルV〜Vのそれぞれにおける、N1、N25の成分を示す。また、図15の例は、第二の算出部35bが取得した固有値データ24aが示す固有値E〜Eのそれぞれが、「10」である場合を示す。図15の例において、k=1の場合、第二の算出部35bは、図16中、一番上の式が示す計算を行う。このとき、Jの値は、0.01である。 FIGS. 15 and 16 are diagrams for explaining an example of processing executed by the calculation apparatus according to the third embodiment. The example of FIG. 15 illustrates a case where the second calculation unit 35b identifies N1 and N25 from the IDs of two nodes that are distance calculation targets included in the instruction for executing the calculation process. Further, the example of FIG. 15 illustrates components N1 and N25 in each of the eigenvectors V 1 to V 5 among the eigenvector components indicated by the eigenvector data 24b acquired by the second calculation unit 35b. The example of FIG. 15 illustrates a case where each of the eigenvalues E 1 to E 5 indicated by the eigenvalue data 24a acquired by the second calculation unit 35b is “10”. In the example of FIG. 15, when k = 1, the second calculation unit 35 b performs the calculation indicated by the top expression in FIG. 16. At this time, the value of J is 0.01.

そして、第二の算出部35bは、Jの値が、「1−α」以上であるか否かを判定する。ここで、「1」は、隣接行列においてノード間が接続していることを示す値である。また、「1」ではなく、「1−α」とJとを比較している理由は、上記の式がAの近似式であり、行列Wの対角成分には、第一の算出部35aにより特定された所定個(本実施例では5個)の固有値以外の固有値も含まれているからである。 Then, the second calculation unit 35b determines whether or not the value of J is “1−α” or more. Here, “1” is a value indicating that the nodes are connected in the adjacency matrix. In the "1" but the reason for the comparison between J and "1-alpha" is a approximate expression of the equation is A k, the diagonal elements of the matrix W, the first calculation unit This is because eigenvalues other than the predetermined number (five in this embodiment) of eigenvalues specified by 35a are also included.

Jの値が、「1−α」以上でない場合には、第二の算出部35bは、kの値を1つインクリメントして、再び、上記の式を用いて、Jの値を算出し、算出したJの値が、「1−α」以上であるか否かを判定する。このように、第二の算出部35bは、算出したJの値が、「1−α」以上となるまで、kの値を1つインクリメントし、上記の式によってJを算出する処理を繰り返す。   When the value of J is not “1−α” or more, the second calculation unit 35b increments the value of k by one, calculates the value of J again using the above equation, It is determined whether or not the calculated value of J is “1−α” or more. In this way, the second calculation unit 35b increments the value of k by one until the calculated value of J becomes “1−α” or more, and repeats the process of calculating J by the above formula.

例えば、図16の例では、k=1の場合、Jの値は、0.01であり、Jの値が、「1−α」以上でないため、第二の算出部35bは、k=2に設定し、再び、Jの値を計算する。ここで、図15の例において、k=2の場合、第二の算出部35bは、図16中、中央の式が示す計算を行う。このとき、Jの値は、0.12であり、Jの値が、「1−α」以上でないため、第二の算出部35bは、k=3に設定し、再び、Jの値を計算する。図16の例では、k=3の場合、Jの値は、1.22であり、Jの値が、「1−α」以上となる。   For example, in the example of FIG. 16, when k = 1, the value of J is 0.01, and the value of J is not “1−α” or more. And calculate the value of J again. Here, in the example of FIG. 15, when k = 2, the second calculation unit 35b performs the calculation indicated by the central expression in FIG. At this time, the value of J is 0.12, and since the value of J is not “1−α” or more, the second calculation unit 35b sets k = 3 and calculates the value of J again. To do. In the example of FIG. 16, when k = 3, the value of J is 1.22, and the value of J is “1−α” or more.

Jの値が、「1−α」以上である場合には、第二の算出部35bは、kの値を、N〜N間の距離として算出する。 When the value of J is “1−α” or more, the second calculation unit 35b calculates the value of k as the distance between N A and N B.

このように、制御部35は、上記の式を用いて、Jの値が「1−α」以上となる場合のkの値を「1」から1つずつ増加させて調べている。そのため、本実施例によれば、精度良くノード間の距離を算出することができる。   As described above, the control unit 35 uses the above formula to check the value of k when the value of J is “1−α” or more by increasing from “1” one by one. Therefore, according to the present embodiment, the distance between the nodes can be calculated with high accuracy.

出力制御部35cは、第二の算出部35bにより算出された2つのノード間の距離を表示するように、出力部12による表示を制御する。   The output control unit 35c controls the display by the output unit 12 so as to display the distance between the two nodes calculated by the second calculation unit 35b.

制御部35は、ASIC(Application Specific Integrated Circuit)やFPGA(Field Programmable Gate Array)などの集積回路またはCPU(Central Processing Unit)やMPU(Micro Processing Unit)などの電子回路である。   The control unit 35 is an integrated circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA) or an electronic circuit such as a central processing unit (CPU) or a micro processing unit (MPU).

[処理の流れ]
次に、本実施例に係る算出装置30の処理の流れについて説明する。図17は、実施例3に係る行列情報算出処理の手順を示すフローチャートである。行列情報算出処理は、例えば、入力部11から、行列情報算出処理を実行するための指示を制御部35が受け付けたタイミングで、実行される。
[Process flow]
Next, a processing flow of the calculation device 30 according to the present embodiment will be described. FIG. 17 is a flowchart illustrating a procedure of matrix information calculation processing according to the third embodiment. The matrix information calculation process is executed, for example, at a timing when the control unit 35 receives an instruction to execute the matrix information calculation process from the input unit 11.

図17に示すように、第一の算出部35aは、記憶部34から、隣接行列データ14bを取得する(S401)。そして、第一の算出部35aは、隣接行列データ14bが示す隣接行列の固有値を算出する(S402)。そして、第一の算出部35aは、値の大きい上位5個の固有値を特定する(S403)。   As shown in FIG. 17, the first calculation unit 35a acquires the adjacency matrix data 14b from the storage unit 34 (S401). Then, the first calculator 35a calculates the eigenvalue of the adjacency matrix indicated by the adjacency matrix data 14b (S402). Then, the first calculation unit 35a identifies the top five eigenvalues with large values (S403).

そして、第一の算出部35aは、変数nの値を0に設定する(S404)。そして、第一の算出部35aは、上位5個の固有値のうち、未選択の固有値があるか否かを判定する(S405)。未選択の固有値がある場合(S405肯定)には、第一の算出部35aは、変数nの値を1つインクリメントする(S406)。その後、第一の算出部35aは、未選択の1つの固有値を固有値Eとして選択する(S407)。 Then, the first calculation unit 35a sets the value of the variable n to 0 (S404). Then, the first calculation unit 35a determines whether there is an unselected eigenvalue among the top five eigenvalues (S405). If there is an unselected eigenvalue (Yes at S405), the first calculation unit 35a increments the value of the variable n by one (S406). Then, the first calculating unit 35a selects one of the eigenvalues of unselected as the eigenvalues E n (S407).

続いて、第一の算出部35aは、選択した固有値Eに対応する固有ベクトルVを算出し(S408)、S405へ戻る。 Subsequently, the first calculating unit 35a calculates the eigenvectors V n corresponding to eigenvalues E n selected (S408), returns to S405.

また、未選択の固有値がない場合(S405否定)には、第一の算出部35aは、次のような処理を行う。すなわち、第一の算出部35aは、固有ベクトルV(n=1、2、・・・5)のデータを固有ベクトルデータ24bとして記憶部34に格納し、固有値E(n=1、2、・・・5)のデータを固有値データ24aとして記憶部34に格納し(S409)、処理を終了する。 If there is no unselected eigenvalue (No at S405), the first calculation unit 35a performs the following process. That is, the first calculation unit 35a stores the data of the eigenvector V n (n = 1, 2,... 5) as the eigenvector data 24b in the storage unit 34, and the eigenvalue E n (n = 1, 2,. .. 5) is stored in the storage unit 34 as the eigenvalue data 24a (S409), and the process is terminated.

図18は、実施例3に係る算出処理の手順を示すフローチャートである。算出処理は、例えば、入力部11から、算出処理を実行するための指示を制御部35が受け付けたタイミングで、実行される。   FIG. 18 is a flowchart illustrating the procedure of the calculation process according to the third embodiment. The calculation process is executed, for example, at a timing when the control unit 35 receives an instruction for executing the calculation process from the input unit 11.

図18に示すように、第二の算出部35bは、算出処理を実行するための指示に含まれる、距離の計算対象の2つのノードのIDから、2つのノード(N,N)を特定する(S501)。そして、第二の算出部35bは、記憶部34から固有ベクトルデータ24b、固有値データ24aを取得する(S502)。次に、第二の算出部35bは、変数kの値を0に設定する(S503)。 As illustrated in FIG. 18, the second calculation unit 35 b determines two nodes (N A and N B ) from the IDs of the two nodes that are distance calculation targets included in the instruction for executing the calculation process. Specify (S501). Then, the second calculation unit 35b acquires eigenvector data 24b and eigenvalue data 24a from the storage unit 34 (S502). Next, the second calculation unit 35b sets the value of the variable k to 0 (S503).

その後、第二の算出部35bは、変数kの値を1つインクリメントする(S504)。そして、第二の算出部35bは、上記の式によって、「J」の値を算出する(S505)。   Thereafter, the second calculator 35b increments the value of the variable k by 1 (S504). Then, the second calculator 35b calculates the value of “J” by the above formula (S505).

そして、第二の算出部35bは、Jの値が、「1−α」以上であるか否かを判定する(S506)。Jの値が、「1−α」以上でない場合(S506否定)には、S504に戻る。   Then, the second calculation unit 35b determines whether the value of J is “1−α” or more (S506). If the value of J is not “1−α” or more (No at S506), the process returns to S504.

ここで、Jの値が、「1−α」以上である場合(S506肯定)には、第二の算出部35bは、kの値を、N〜N間の距離として算出する(S507)。そして、出力制御部35cは、S507で算出された2つのノード間の距離を表示するように、出力部12による表示を制御し(S508)、処理を終了する。 Here, when the value of J is “1−α” or more (Yes in S506), the second calculation unit 35b calculates the value of k as the distance between N A and N B (S507). ). Then, the output control unit 35c controls the display by the output unit 12 so as to display the distance between the two nodes calculated in S507 (S508), and ends the process.

上述してきたように、本実施例に係る算出装置30は、隣接行列データ14bが示す隣接行列から複数の固有値、および、複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出する。そして、算出装置30は、複数の固有ベクトルV(n=1、2、・・・5)ごとに、距離の算出対象の2つのノードのそれぞれに対応する固有ベクトルVの2つの成分の積と、固有ベクトルVに対応する固有値Eのk乗の値との積を算出する。そして、算出装置30は、複数の固有ベクトルVごとに算出した積の値の総和Jを算出する。続いて、算出装置30は、算出した総和Jが、隣接行列においてノード間が接続していることを示す値「1」から所定値「α」を減算した値「1−α」を超える最小のkの値を、2つのノード間の距離として算出する。このように、本実施例に係る算出装置30は、総和Jの値が「1−α」以上となる場合のkの値を「1」から1つずつ増加させて調べている。そのため、本実施例に係る算出装置30によれば、精度良くノード間の距離を算出することができる。 As described above, the calculation apparatus 30 according to the present embodiment calculates a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from the adjacency matrix indicated by the adjacency matrix data 14b. Then, the calculation device 30 calculates, for each of a plurality of eigenvectors V n (n = 1, 2,... 5), the product of two components of the eigenvector V n corresponding to each of the two nodes whose distances are to be calculated. , and it calculates the product of the k-th power values eigenvalue E n corresponding to eigenvectors V n. The calculation device 30 calculates the sum J of the value of the product calculated for each of the plurality of eigenvectors V n. Subsequently, the calculation device 30 determines that the calculated sum J exceeds the minimum value “1-α” obtained by subtracting the predetermined value “α” from the value “1” indicating that the nodes are connected in the adjacent matrix. The value of k is calculated as the distance between the two nodes. As described above, the calculation device 30 according to the present embodiment examines the value of k when the value of the total sum J is “1−α” or more by increasing one by one from “1”. Therefore, according to the calculation device 30 according to the present embodiment, the distance between nodes can be calculated with high accuracy.

また、Jの値として、次の値を用いることもできる。まず、算出装置30は、複数の固有ベクトルV(n=1、2、・・・5)ごとに、距離の算出対象の2つのノードのそれぞれに対応する固有ベクトルVの2つの成分の積と、固有ベクトルVに対応する固有値Eのk乗の値との積を算出する。そして、算出装置30は、複数の固有ベクトルVごとに算出した積の値の総和の平均値、すなわち、V(n=1)を用いて算出した積と、V(n=1、2)を用いて算出した積の総和と、V(n=1、2、3)を用いて算出した積の総和と、V(n=1、2、3、4)を用いて算出した積の総和と、V(n=1、2、3、4、5)を用いて算出した積の総和の、平均値をJとして用いることもできる。このようにすることにより、より精度良くノード間の距離を算出することができる。精度が向上する理由は、用いる固有値の個数を順次増やしていくと、上記の数式で示したJの値は、隣接行列Aの冪乗Aにおいて2つのノード間の接続状態を示す成分より、大きい値と小さい値の間を行き来するため、その平均値をとることで、より正確にAの成分に近くなるためである。 Moreover, the following value can also be used as the value of J. First, calculating device 30, a plurality of eigenvectors V n (n = 1,2, ··· 5) each, and the two components of the product of eigenvectors V n corresponding to each of the distance the two nodes to be calculated for , and it calculates the product of the k-th power values eigenvalue E n corresponding to eigenvectors V n. Then, the calculation device 30 calculates the average value of the sum of the product values calculated for each of the plurality of eigenvectors V n , that is, the product calculated using V n (n = 1), and V n (n = 1, 2). ), The product sum calculated using V n (n = 1, 2, 3), and V n (n = 1, 2, 3, 4). An average value of the sum of products and the sum of products calculated using V n (n = 1, 2, 3, 4, 5) can also be used as J. By doing so, the distance between the nodes can be calculated with higher accuracy. The reason for improved accuracy and gradually increasing the number of eigenvalues using sequential, the value of J shown in the above formulas, from component showing a connection state between two nodes in exponentiation A k of the adjacency matrix A, to alternate between high and low values, by taking the average value is more accurate to become closer to the component of the a k.

さて、これまで開示の装置に関する実施例について説明したが、本発明は上述した実施例以外にも、種々の異なる形態にて実施されてよいものである。そこで、以下では、本発明に含まれる他の実施例を説明する。   Although the embodiments related to the disclosed apparatus have been described above, the present invention may be implemented in various different forms other than the above-described embodiments. Therefore, another embodiment included in the present invention will be described below.

例えば、実施例において説明した各処理のうち、自動的に行われるものとして説明した処理の全部または一部を手動的に行うこともできる。また、実施例において説明した各処理のうち、手動的に行われるものとして説明した処理の全部または一部を公知の方法で自動的に行うこともできる。   For example, all or some of the processes described as being automatically performed among the processes described in the embodiments may be performed manually. In addition, among the processes described in the embodiments, all or a part of the processes described as being manually performed can be automatically performed by a known method.

また、各種の負荷や使用状況などに応じて、各実施例において説明した各処理の各ステップでの処理を任意に細かくわけたり、あるいはまとめたりすることができる。また、ステップを省略することもできる。   In addition, the processing at each step of each processing described in each embodiment can be arbitrarily finely divided or combined according to various loads and usage conditions. Also, the steps can be omitted.

また、各種の負荷や使用状況などに応じて、各実施例において説明した各処理の各ステップでの処理の順番を変更できる。   Further, the order of processing at each step of each processing described in each embodiment can be changed according to various loads and usage conditions.

また、図示した各装置の各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。すなわち、各装置の分散・統合の具体的状態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況などに応じて、任意の単位で機能的または物理的に分散・統合して構成することができる。   Further, each component of each illustrated apparatus is functionally conceptual, and does not necessarily need to be physically configured as illustrated. In other words, the specific state of distribution / integration of each device is not limited to the one shown in the figure, and all or a part thereof may be functionally or physically distributed or arbitrarily distributed in arbitrary units according to various loads or usage conditions. Can be integrated and configured.

[算出プログラム]
また、上記の実施例で説明した算出装置10、20または30の各種の処理は、あらかじめ用意されたプログラムをパーソナルコンピュータやワークステーションなどのコンピュータシステムで実行することによって実現することもできる。そこで、以下では、図19を用いて、上記の実施例で説明した算出装置10、20または30と同様の機能を有する算出プログラムを実行するコンピュータの一例を説明する。図19は、算出プログラムを実行するコンピュータを示す図である。
[Calculation program]
In addition, the various processes of the calculation device 10, 20 or 30 described in the above embodiment can be realized by executing a program prepared in advance on a computer system such as a personal computer or a workstation. Therefore, in the following, an example of a computer that executes a calculation program having the same function as that of the calculation device 10, 20 or 30 described in the above embodiment will be described with reference to FIG. FIG. 19 is a diagram illustrating a computer that executes a calculation program.

図19に示すように、コンピュータ300は、CPU(Central Processing Unit)310、ROM(Read Only Memory)320、HDD(Hard Disk Drive)330、RAM(Random Access Memory)340を有する。CPU310、ROM320、HDD330、RAM340は、互いに、バス350を介して接続されている。   As illustrated in FIG. 19, the computer 300 includes a central processing unit (CPU) 310, a read only memory (ROM) 320, a hard disk drive (HDD) 330, and a random access memory (RAM) 340. The CPU 310, the ROM 320, the HDD 330, and the RAM 340 are connected to each other via a bus 350.

ROM320には、OSなどの基本プログラムが記憶されている。また、HDD330には、上記の実施例で示す取得部、選択部、第一の算出部、第二の算出部、第三の算出部および出力制御部などと同様の機能を発揮する算出プログラム330aが予め記憶される。なお、算出プログラム330aについては、適宜分離しても良い。また、HDD330には、距離情報、隣接行列データ、固有値データ、固有ベクトルデータなどが設けられる。これらの距離情報、隣接行列データ、固有値データ、固有ベクトルデータは、上述した距離情報14a、隣接行列データ14b、固有値データ24a、固有ベクトルデータ24bに対応する。   The ROM 320 stores basic programs such as an OS. Further, the HDD 330 has a calculation program 330a that exhibits the same functions as the acquisition unit, selection unit, first calculation unit, second calculation unit, third calculation unit, output control unit, and the like described in the above embodiment. Is stored in advance. Note that the calculation program 330a may be separated as appropriate. The HDD 330 is provided with distance information, adjacency matrix data, eigenvalue data, eigenvector data, and the like. These distance information, adjacency matrix data, eigenvalue data, and eigenvector data correspond to the above-described distance information 14a, adjacency matrix data 14b, eigenvalue data 24a, and eigenvector data 24b.

そして、CPU310が、算出プログラム330aをHDD330から読み出して実行する。   Then, the CPU 310 reads the calculation program 330a from the HDD 330 and executes it.

そして、CPU310は、距離情報、隣接行列データ、固有値データ、固有ベクトルデータなどを読み出してRAM340に格納する。さらに、CPU310は、RAM340に格納された距離情報、隣接行列データ、固有値データ、固有ベクトルデータなどを用いて、算出プログラム330aを実行する。なお、RAM340に格納される各データは、常に全てのデータがRAM340に格納されなくともよい。処理に用いられるデータがRAM340に格納されれば良い。   The CPU 310 reads out distance information, adjacency matrix data, eigenvalue data, eigenvector data, and the like and stores them in the RAM 340. Further, the CPU 310 executes the calculation program 330a using distance information, adjacency matrix data, eigenvalue data, eigenvector data, and the like stored in the RAM 340. Note that all data stored in the RAM 340 may not always be stored in the RAM 340. Data used for processing may be stored in the RAM 340.

なお、上記した算出プログラム330aについては、必ずしも最初からHDD330に記憶させておく必要はない。   Note that the above-described calculation program 330a is not necessarily stored in the HDD 330 from the beginning.

例えば、コンピュータ300に挿入されるフレキシブルディスク(FD)、CD−ROM、DVDディスク、光磁気ディスク、ICカードなどの「可搬用の物理媒体」にプログラムを記憶させておく。そして、コンピュータ300がこれらからプログラムを読み出して実行するようにしてもよい。   For example, the program is stored in a “portable physical medium” such as a flexible disk (FD), a CD-ROM, a DVD disk, a magneto-optical disk, or an IC card inserted into the computer 300. Then, the computer 300 may read and execute the program from these.

さらには、公衆回線、インターネット、LAN、WANなどを介してコンピュータ300に接続される「他のコンピュータ(またはサーバ)」などにプログラムを記憶させておく。そして、コンピュータ300がこれらからプログラムを読み出して実行するようにしてもよい。   Furthermore, the program is stored in “another computer (or server)” connected to the computer 300 via a public line, the Internet, a LAN, a WAN, or the like. Then, the computer 300 may read and execute the program from these.

10 算出装置
11 入力部
12 出力部
14 記憶部
14a 隣接行列データ
14b 距離情報
15 制御部
15b 選択部
15c 第一の算出部
15d 第二の算出部
15e 第三の算出部
DESCRIPTION OF SYMBOLS 10 Calculation apparatus 11 Input part 12 Output part 14 Storage part 14a Adjacency matrix data 14b Distance information 15 Control part 15b Selection part 15c First calculation part 15d Second calculation part 15e Third calculation part

Claims (13)

複数のノードを有するグラフにおけるノード間の接続状態を示す情報に基づいて、前記複数のノードの中から、それぞれ複数のノードを有する複数のグループを選択する選択部と、
前記選択部により選択された複数のグループのそれぞれについて、グループ内のノード間の平均距離を算出する第一の算出部と、
前記第一の算出部によりグループごとに算出されたグループ内のノード間の平均距離、および、前記ノード間の接続状態を示す情報に基づいて、前記グループのそれぞれと、前記複数のノードのそれぞれとの距離を算出する第二の算出部と、
前記第二の算出部により算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する第三の算出部と、
を有することを特徴とする算出装置。
A selection unit that selects a plurality of groups each having a plurality of nodes from the plurality of nodes based on information indicating a connection state between the nodes in the graph having a plurality of nodes;
A first calculation unit that calculates an average distance between nodes in the group for each of the plurality of groups selected by the selection unit;
Based on the average distance between the nodes in the group calculated for each group by the first calculation unit, and information indicating the connection state between the nodes, each of the groups, and each of the plurality of nodes, A second calculation unit for calculating the distance of
Based on the distance calculated by the second calculation unit, a third calculation unit for calculating a distance between two nodes to be calculated;
A calculation device comprising:
前記第三の算出部は、前記第二の算出部により算出された前記2つのノードのそれぞれと前記グループとの距離の和をグループごとに算出し、算出した距離の和のうち、最小の和を前記2つのノード間の距離として算出する
請求項1に記載の算出装置。
The third calculation unit calculates, for each group, a sum of distances between the two nodes calculated by the second calculation unit and the group, and among the calculated sums of distances, a minimum sum is calculated. The calculation device according to claim 1, wherein: is calculated as a distance between the two nodes.
前記選択部は、前記ノード間の接続状態を示す情報に基づいて、複数のノードの中から第一の条件を満たすノードを複数選択し、選択した複数のノードのそれぞれについて、第二の条件を満たすグループを選択する
ことを特徴とする請求項1または2に記載の算出装置。
The selection unit selects a plurality of nodes satisfying a first condition from a plurality of nodes based on information indicating a connection state between the nodes, and sets a second condition for each of the selected plurality of nodes. The calculation device according to claim 1 or 2, wherein a group to be satisfied is selected.
前記選択部は、前記ノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、算出した複数の固有値および複数の固有ベクトルに基づいて、前記複数のグループを選択することを特徴とする請求項1または2に記載の算出装置。   The selection unit calculates a plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues from a matrix indicating a connection state between the nodes, and based on the calculated plurality of eigenvalues and a plurality of eigenvectors. The calculation device according to claim 1, wherein the plurality of groups are selected. 複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、算出した複数の固有値および複数の固有ベクトルに基づいて、それぞれ複数のノードを有する複数のグループを選択する選択部と、
前記固有値および前記固有ベクトルに基づいて、前記複数のグループのそれぞれと、前記複数のノードのそれぞれとの距離を算出する第一の算出部と、
前記第一の算出部により算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する第二の算出部と、
を有することを特徴とする算出装置。
A plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues are calculated from a matrix indicating a connection state between nodes in a graph having a plurality of nodes, and the calculated eigenvalues and a plurality of eigenvectors are calculated. A selection unit for selecting a plurality of groups each having a plurality of nodes, and
A first calculation unit for calculating a distance between each of the plurality of groups and each of the plurality of nodes based on the eigenvalue and the eigenvector;
Based on the distance calculated by the first calculation unit, a second calculation unit that calculates a distance between two nodes to be calculated;
A calculation device comprising:
前記選択部は、前記複数の固有値および複数の固有ベクトルに基づいて、固有値ごとに、該固有値の絶対値の平方の逆数よりも、固有ベクトルの成分の絶対値が大きいノードを一つのグループとして選択する
ことを特徴とする請求項4または5に記載の算出装置。
The selection unit selects, as a group, a node having an absolute value of a component of an eigenvector larger than the inverse of the square of the absolute value of the eigenvalue for each eigenvalue based on the plurality of eigenvalues and a plurality of eigenvectors. The calculation device according to claim 4, wherein:
複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出する第一の算出部と、
前記複数の固有ベクトルごとに、距離の算出対象の2つのノードのそれぞれに対応する該固有ベクトルの2つの成分の積と該固有ベクトルに対応する固有値のk乗の値との積を算出し、前記複数の固有ベクトルごとに算出した前記積の和を算出し、算出した該和が、前記行列においてノード間が接続していることを示す値から所定値を減算した値を超える最小の前記kの値を、前記2つのノード間の距離として算出する第二の算出部と、
を有することを特徴とする算出装置。
A first calculation unit that calculates a plurality of eigenvalues from a matrix indicating a connection state between nodes in a graph having a plurality of nodes, and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues;
For each of the plurality of eigenvectors, a product of a product of two components of the eigenvector corresponding to each of the two nodes whose distance is to be calculated and a k-th power value of the eigenvalue corresponding to the eigenvector is calculated. The sum of the products calculated for each eigenvector is calculated, and the calculated sum is a minimum value of k exceeding a value obtained by subtracting a predetermined value from a value indicating that the nodes are connected in the matrix. A second calculation unit that calculates the distance between the two nodes;
A calculation device comprising:
コンピュータに、
複数のノードを有するグラフにおけるノード間の接続状態を示す情報に基づいて、前記複数のノードの中から、それぞれ複数のノードを有する複数のグループを選択し、
選択された前記複数のグループのそれぞれについて、グループ内のノード間の平均距離を算出し、
グループごとに算出された前記グループ内のノード間の平均距離、および、前記ノード間の接続状態を示す情報に基づいて、前記グループのそれぞれと、前記複数のノードのそれぞれとの距離を算出し、
算出された前記距離に基づいて、距離の算出対象の2つのノード間の距離を算出する、
各処理を実行させるための算出プログラム。
On the computer,
Based on information indicating a connection state between nodes in a graph having a plurality of nodes, a plurality of groups each having a plurality of nodes are selected from the plurality of nodes,
For each of the selected groups, calculate an average distance between nodes in the group;
Based on the average distance between the nodes in the group calculated for each group, and information indicating the connection state between the nodes, to calculate the distance between each of the groups and each of the plurality of nodes,
Based on the calculated distance, a distance between two nodes to be calculated is calculated.
A calculation program for executing each process.
コンピュータに、
複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、算出した複数の固有値および複数の固有ベクトルに基づいて、それぞれ複数のノードを有する複数のグループを選択し、
前記固有値および前記固有ベクトルに基づいて、前記複数のグループのそれぞれと、前記複数のノードのそれぞれとの距離を算出し、
算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する、
各処理を実行させるための算出プログラム。
On the computer,
A plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues are calculated from a matrix indicating a connection state between nodes in a graph having a plurality of nodes, and the calculated eigenvalues and a plurality of eigenvectors are calculated. Select multiple groups, each with multiple nodes,
Calculating a distance between each of the plurality of groups and each of the plurality of nodes based on the eigenvalue and the eigenvector;
Based on the calculated distance, calculate the distance between the two nodes of the distance calculation target,
A calculation program for executing each process.
コンピュータに、
複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、
前記複数の固有ベクトルごとに、距離の算出対象の2つのノードのそれぞれに対応する該固有ベクトルの2つの成分の積と該固有ベクトルに対応する固有値のk乗の値との積を算出し、前記複数の固有ベクトルごとに算出した前記積の和を算出し、算出した該和が、前記行列においてノード間が接続していることを示す値から所定値を減算した値を超える最小の前記kの値を、前記2つのノード間の距離として算出する、
各処理を実行させるための算出プログラム。
On the computer,
Calculating a plurality of eigenvalues from a matrix indicating a connection state between nodes in a graph having a plurality of nodes, and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues;
For each of the plurality of eigenvectors, a product of a product of two components of the eigenvector corresponding to each of the two nodes whose distance is to be calculated and a k-th power value of the eigenvalue corresponding to the eigenvector is calculated. The sum of the products calculated for each eigenvector is calculated, and the calculated sum is a minimum value of k exceeding a value obtained by subtracting a predetermined value from a value indicating that the nodes are connected in the matrix. Calculating as the distance between the two nodes,
A calculation program for executing each process.
コンピュータが実行する算出方法であって、
複数のノードを有するグラフにおけるノード間の接続状態を示す情報に基づいて、前記複数のノードの中から、それぞれ複数のノードを有する複数のグループを選択し、
選択された前記複数のグループのそれぞれについて、グループ内のノード間の平均距離を算出し、
グループごとに算出された前記グループ内のノード間の平均距離、および、前記ノード間の接続状態を示す情報に基づいて、前記グループのそれぞれと、前記複数のノードのそれぞれとの距離を算出し、
算出された前記距離に基づいて、距離の算出対象の2つのノード間の距離を算出する、
各処理を実行することを特徴とする算出方法。
A calculation method executed by a computer,
Based on information indicating a connection state between nodes in a graph having a plurality of nodes, a plurality of groups each having a plurality of nodes are selected from the plurality of nodes,
For each of the selected groups, calculate an average distance between nodes in the group;
Based on the average distance between the nodes in the group calculated for each group, and information indicating the connection state between the nodes, to calculate the distance between each of the groups and each of the plurality of nodes,
Based on the calculated distance, a distance between two nodes to be calculated is calculated.
A calculation method characterized by executing each process.
コンピュータが実行する算出方法であって、
複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、算出した複数の固有値および複数の固有ベクトルに基づいて、それぞれ複数のノードを有する複数のグループを選択し、
前記固有値および前記固有ベクトルに基づいて、前記複数のグループのそれぞれと、前記複数のノードのそれぞれとの距離を算出し、
算出された距離に基づいて、距離の算出対象の2つのノード間の距離を算出する、
各処理を実行することを特徴とする算出方法。
A calculation method executed by a computer,
A plurality of eigenvalues and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues are calculated from a matrix indicating a connection state between nodes in a graph having a plurality of nodes, and the calculated eigenvalues and a plurality of eigenvectors are calculated. Select multiple groups, each with multiple nodes,
Calculating a distance between each of the plurality of groups and each of the plurality of nodes based on the eigenvalue and the eigenvector;
Based on the calculated distance, calculate the distance between the two nodes of the distance calculation target,
A calculation method characterized by executing each process.
コンピュータが実行する算出方法であって、
複数のノードを有するグラフにおけるノード間の接続状態を示す行列から複数の固有値、および、該複数の固有値のそれぞれに対応する複数の固有ベクトルのそれぞれを算出し、
前記複数の固有ベクトルごとに、距離の算出対象の2つのノードのそれぞれに対応する該固有ベクトルの2つの成分の積と該固有ベクトルに対応する固有値のk乗の値との積を算出し、前記複数の固有ベクトルごとに算出した前記積の和を算出し、算出した該和が、前記行列においてノード間が接続していることを示す値から所定値を減算した値を超える最小の前記kの値を、前記2つのノード間の距離として算出する、
各処理を実行することを特徴とする算出方法。
A calculation method executed by a computer,
Calculating a plurality of eigenvalues from a matrix indicating a connection state between nodes in a graph having a plurality of nodes, and a plurality of eigenvectors corresponding to each of the plurality of eigenvalues;
For each of the plurality of eigenvectors, a product of a product of two components of the eigenvector corresponding to each of the two nodes whose distance is to be calculated and a k-th power value of the eigenvalue corresponding to the eigenvector is calculated. The sum of the products calculated for each eigenvector is calculated, and the calculated sum is a minimum value of k exceeding a value obtained by subtracting a predetermined value from a value indicating that the nodes are connected in the matrix. Calculating as the distance between the two nodes,
A calculation method characterized by executing each process.
JP2012026686A 2012-02-09 2012-02-09 Calculation device, calculation program, and calculation method Active JP5831274B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012026686A JP5831274B2 (en) 2012-02-09 2012-02-09 Calculation device, calculation program, and calculation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012026686A JP5831274B2 (en) 2012-02-09 2012-02-09 Calculation device, calculation program, and calculation method

Publications (2)

Publication Number Publication Date
JP2013164693A true JP2013164693A (en) 2013-08-22
JP5831274B2 JP5831274B2 (en) 2015-12-09

Family

ID=49176015

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012026686A Active JP5831274B2 (en) 2012-02-09 2012-02-09 Calculation device, calculation program, and calculation method

Country Status (1)

Country Link
JP (1) JP5831274B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020077299A (en) * 2018-11-09 2020-05-21 富士通株式会社 Graph simplification method, graph simplification program, and information processing system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020077299A (en) * 2018-11-09 2020-05-21 富士通株式会社 Graph simplification method, graph simplification program, and information processing system
JP7157328B2 (en) 2018-11-09 2022-10-20 富士通株式会社 Graph simplification method, graph simplification program, and information processing device

Also Published As

Publication number Publication date
JP5831274B2 (en) 2015-12-09

Similar Documents

Publication Publication Date Title
US11144828B2 (en) Training task optimization system, training task optimization method and non-transitory computer readable medium for operating the same
KR20210082210A (en) Creating an Integrated Circuit Floor Plan Using Neural Networks
US9995564B2 (en) Terminal and server for modifying magnetic field and method thereof
US11443219B2 (en) Model estimation system, method, and program
US20190065963A1 (en) Optimal solution search method, optimal solution search program, and optimal solution search apparatus
CN113054651B (en) Network topology optimization method, device and system
WO2015153910A1 (en) Determining job applicant fit score
CN113326449B (en) Method, device, electronic equipment and medium for predicting traffic flow
JP5831274B2 (en) Calculation device, calculation program, and calculation method
US10274533B1 (en) Pre-computation system and method for transition domain characterization within a floating random walk based multi-dielectric capacitance extraction methodology
CN109429194B (en) Method and device for determining position of reference node in mobile sensing network
US20180279078A1 (en) Confirming work supporting device, confirming work supporting system, and computer program product
EP2890041B1 (en) Space division method, space division device, and space division program
JP2017174230A (en) Trajectory data processing method, trajectory data processing program and trajectory data processing device
EP4145327A1 (en) System for estimating characteristic value of material
US11835347B2 (en) Route search device, route search method, and route search program
KR20180119443A (en) Clustering method and apparatus using Gaussian Process Regression
KR20170074418A (en) Apparatus and method for converting k-mer for measuring similarity of sequences
JP6237291B2 (en) Information processing apparatus, color interpolation method, program, and table generation method
CN112996011A (en) Cell value evaluation method, device, computer equipment and readable storage medium
CN111177290A (en) Method and device for evaluating accuracy of three-dimensional map
US20160259670A1 (en) Computer readable medium, mapping information generating method, and mapping information generating apparatus
US20240153158A1 (en) Map image generation apparatus, control method, and non-transitory computer readable medium
US20230409964A1 (en) Learning device, identification device, learning method, identification method, learning program, and identification program
CN110795936B (en) Word vector acquisition method and device, storage medium and electronic device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20141007

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20150622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150707

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150907

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150929

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20151012

R150 Certificate of patent or registration of utility model

Ref document number: 5831274

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150