unot
クラス UnotPattern

java.lang.Object
  |
  +--unot.Pattern
        |
        +--unot.UnotPattern
すべての実装インタフェース:
java.lang.Cloneable

public class UnotPattern
extends Pattern

UnotPattern.java このクラスは UNOT パターンのデータ構造を表現する. (trcs216.pdf pp.8 Fig.4) Created: Thu Aug 7 20:34:14 2003


フィールドの概要
private  unot.DLpair[] code
          (depth, label) 対の列
private  int copydepth
          コピー深さの値.
static int INFTY_DEPTH
          Infinity Node の仮想 depth
protected static unot.DLpair inftyNode
          Infinity Node を表現する static なノード.
private  int[] lcp
          最右枝上の各高さにおける右木のコードが, 左木のコードと何文字一致しているかを示す値の配列
private  int[] left
          code における左木への添字インデックス値の配列
private  int rootCount
          根出現となるノードのリスト.オプション
private  unot.NodeList rootList
          根出現となるノードのリスト.オプション
 
クラス unot.Pattern から継承したフィールド
docSet, id, INFTY_INDEX, reader, right, writer
 
コンストラクタの概要
UnotPattern()
          Creates a new UnotPattern instance.
UnotPattern(unot.DLpair[] code, int[] left, int[] right, int[] lcp, int copydepth)
          Creates a new UnotPattern instance.
UnotPattern(int rootLabel)
          Returns a UnotPattern object that has only root node.
 
メソッドの概要
 java.lang.Object clone()
          Returns a cloned object.
 int getCodeSize()
          Get the code size (= the number of nodes).
 int getCopyDepth()
           
 int getDisagreeNodeDepth(int depth)
          Gets the disagreement node depth.
 int getDisagreeNodeLabel(int depth)
          Gets the disagreement node label.
 int[] getLcp()
           
 int[] getLeft()
           
 int getLeftIndex(int depth)
          Gets the index of the left node at the depth in the rightmost branch.
 unot.DLpair getNodeAt(int i)
          Get the depth-label pair for the i-th node.
 int getNodeIndex(int depth)
          Gets the index of the node on the `code' array of this object.
 int getNodeLabel(int depth)
          Gets the label of the rightmost branch node at the depth.
 int[] getRight()
           
 int getRightIndex(int depth)
          Gets the index of the depth in the rightmost branch.
 int getRootCount()
           
 unot.NodeList getRootList()
           
 int getTopDepth()
          Get the top depth of the rightmost branch.
 int getTopIndex()
          Gets the top index of the `code' array of this object.
static unot.UnotPatternWriter getUnotPatternWriter()
          パターン出力ルーチンを返す.
static void initialize(int numOfLabels, unot.DocSet docset)
          Infinity Node を初期化する.
 boolean isBalanced(int depth)
          Compares the left with the right in the node at the depth.
 boolean isInftyNode(int depth)
          Distinguish whether the depth node is Infinity Node or not.
 unot.UnotPattern rightmostExpand(unot.UnotPattern oldPattern, unot.DLpair newNode, int succCopyDepth)
          Returns a UnotPattern which is expanded with the Rightmost Expantion.
static void setMaxLabel(int numOfLabels)
          Infinity Node を初期化する.
 void setRootCount(int rootCount)
           
 void setRootNodeList(unot.NodeList list)
           
static void setUnotPatternWriter(unot.UnotPatternWriter writer)
          パターン出力ルーチンを設定する.
 java.lang.String toString()
          Retrieves a String representation of the object.
 java.lang.String writeToString()
          Retrieve a tree like String representation of the object.
 
クラス unot.Pattern から継承したメソッド
getId, getPatId, getPatternWriter, rightmostExpand, setId, setPatternReader, setPatternWriter, setRootList
 
クラス java.lang.Object から継承したメソッド
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

inftyNode

protected static unot.DLpair inftyNode
Infinity Node を表現する static なノード. Infinity Node とはそこに子供を持たないことを示す番兵で, どのラベルよりも大きい(重い)ラベル値をもつ.


INFTY_DEPTH

public static final int INFTY_DEPTH
Infinity Node の仮想 depth

関連項目:
定数フィールド値

code

private unot.DLpair[] code
(depth, label) 対の列


left

private int[] left
code における左木への添字インデックス値の配列


lcp

private int[] lcp
最右枝上の各高さにおける右木のコードが, 左木のコードと何文字一致しているかを示す値の配列


copydepth

private int copydepth
コピー深さの値.


rootList

private unot.NodeList rootList
根出現となるノードのリスト.オプション


rootCount

private int rootCount
根出現となるノードのリスト.オプション

コンストラクタの詳細

UnotPattern

public UnotPattern()
Creates a new UnotPattern instance.


UnotPattern

public UnotPattern(int rootLabel)
Returns a UnotPattern object that has only root node.

パラメータ:
rootLabel - an int value

UnotPattern

public UnotPattern(unot.DLpair[] code,
                   int[] left,
                   int[] right,
                   int[] lcp,
                   int copydepth)
Creates a new UnotPattern instance.

パラメータ:
code - a DLpair[] value
left - an int[] value
right - an int[] value
lcp - an int[] value
copydepth - an int value
メソッドの詳細

setMaxLabel

public static void setMaxLabel(int numOfLabels)
Infinity Node を初期化する.

パラメータ:
numOfLabels - an int value

initialize

public static void initialize(int numOfLabels,
                              unot.DocSet docset)
Infinity Node を初期化する.

パラメータ:
numOfLabels - an int value

setUnotPatternWriter

public static void setUnotPatternWriter(unot.UnotPatternWriter writer)
パターン出力ルーチンを設定する. UnotPattern専用のPatternWriter向け.引数の型はUnotPattern.


getUnotPatternWriter

public static unot.UnotPatternWriter getUnotPatternWriter()
パターン出力ルーチンを返す. UnotPattern専用のPatternWriter向け.返り値の型はUnotPattern.


getCodeSize

public int getCodeSize()
Get the code size (= the number of nodes).

オーバーライド:
クラス Pattern 内の getCodeSize
戻り値:
an size of the pattern

getNodeAt

public unot.DLpair getNodeAt(int i)
Get the depth-label pair for the i-th node.

オーバーライド:
クラス Pattern 内の getNodeAt
戻り値:
a DLpair (depth, label)

getRight

public int[] getRight()
オーバーライド:
クラス Pattern 内の getRight

getLeft

public int[] getLeft()

getLcp

public int[] getLcp()

getCopyDepth

public int getCopyDepth()

getRootList

public unot.NodeList getRootList()
オーバーライド:
クラス Pattern 内の getRootList

getRootCount

public int getRootCount()
オーバーライド:
クラス Pattern 内の getRootCount

setRootCount

public void setRootCount(int rootCount)
オーバーライド:
クラス Pattern 内の setRootCount

setRootNodeList

public void setRootNodeList(unot.NodeList list)

getTopDepth

public int getTopDepth()
Get the top depth of the rightmost branch.

オーバーライド:
クラス Pattern 内の getTopDepth
戻り値:
an int value

getTopIndex

public int getTopIndex()
Gets the top index of the `code' array of this object.

オーバーライド:
クラス Pattern 内の getTopIndex
戻り値:
an int value

getNodeIndex

public int getNodeIndex(int depth)
Gets the index of the node on the `code' array of this object.

オーバーライド:
クラス Pattern 内の getNodeIndex
パラメータ:
depth - an int value
戻り値:
an int value

getNodeLabel

public int getNodeLabel(int depth)
Gets the label of the rightmost branch node at the depth.

オーバーライド:
クラス Pattern 内の getNodeLabel
パラメータ:
depth - an int value
戻り値:
an int value

getRightIndex

public int getRightIndex(int depth)
Gets the index of the depth in the rightmost branch.

オーバーライド:
クラス Pattern 内の getRightIndex
パラメータ:
depth - an int value
戻り値:
an int value

getLeftIndex

public int getLeftIndex(int depth)
Gets the index of the left node at the depth in the rightmost branch.

パラメータ:
depth - an int value
戻り値:
an int value

isInftyNode

public boolean isInftyNode(int depth)
Distinguish whether the depth node is Infinity Node or not.

オーバーライド:
クラス Pattern 内の isInftyNode
パラメータ:
depth - an int value
戻り値:
a boolean value

isBalanced

public boolean isBalanced(int depth)
Compares the left with the right in the node at the depth.

パラメータ:
depth - an int value
戻り値:
a boolean value

getDisagreeNodeDepth

public int getDisagreeNodeDepth(int depth)
Gets the disagreement node depth. `disagreement node' is the node of the position j if j <= min(|C(Li)|, |C(Ri)|) and the j-th components of C(Li) and C(Ri) are different pairs.

パラメータ:
depth - an int value
戻り値:
an int value

getDisagreeNodeLabel

public int getDisagreeNodeLabel(int depth)
Gets the disagreement node label. `disagreement node' is the node of the position j if j <= min(|C(Li)|, |C(Ri)|) and the j-th components of C(Li) and C(Ri) are different pairs.

パラメータ:
depth - an int value
戻り値:
an int value

rightmostExpand

public unot.UnotPattern rightmostExpand(unot.UnotPattern oldPattern,
                                        unot.DLpair newNode,
                                        int succCopyDepth)
Returns a UnotPattern which is expanded with the Rightmost Expantion.

パラメータ:
oldPattern - an UnotPattern value
newNode - a DLpair value
succCopyDepth - an int value
戻り値:
an UnotPattern value

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a cloned object.

オーバーライド:
クラス Pattern 内の clone
戻り値:
an Object value
例外:
java.lang.CloneNotSupportedException - if an error occurs

toString

public java.lang.String toString()
Retrieves a String representation of the object.

オーバーライド:
クラス Pattern 内の toString
戻り値:
a String representation of this object.
関連項目:
Object.toString()

writeToString

public java.lang.String writeToString()
Retrieve a tree like String representation of the object.

オーバーライド:
クラス Pattern 内の writeToString
戻り値:
a String value