## org.apache.mahout.fpm.pfpgrowth.fpgrowth
Class FPTree

    java.lang.Object
      org.apache.mahout.fpm.pfpgrowth.fpgrowth.FPTree

    public class FPTree

extends Object

The Frequent Pattern Tree datastructure used for mining patterns using `FPGrowth` algorithm

Field Summary
`static int` `ROOTNODEID`

Constructor Summary
`FPTree()`
`FPTree(int size)`

Method Summary
`void` `addChild(int parentNodeId, int childnodeId)`
`void` `addCount(int nodeId, long count)`
`void` `addHeaderCount(int attributeValue, long count)`
`void` `addHeaderNext(int attributeValue, int nodeId)`
`int` `attribute(int nodeId)`
`int` `childAtIndex(int nodeId, int index)`
`int` `childCount(int nodeId)`
`int` `childWithAttribute(int nodeId, int childAttribute)`
`void` `clear()`
`void` `clearConditional()`
`int` `conditional(int nodeId)`
`long` `count(int nodeId)`
`int` `createConditionalNode(int attributeValue, long count)`
`int` `createNode(int parentNodeId, int attributeValue, long count)`
`void` `createRootNode()`
`int` `getAttributeAtIndex(int index)`
`int` `getHeaderNext(int attributeValue)`
`long` `getHeaderSupportCount(int attributeValue)`
`int[]` `getHeaderTableAttributes()`
`int` `getHeaderTableCount()`
`boolean` `isEmpty()`
`int` `next(int nodeId)`
`int` `parent(int nodeId)`
`void` `removeHeaderNext(int attributeValue)`
`void` `reorderHeaderTable()`
`void` `replaceChild(int parentNodeId, int replacableNode, int childnodeId)`
`void` `setConditional(int nodeId, int conditionalNode)`
`void` `setNext(int nodeId, int nextNode)`
`void` `setParent(int nodeId, int parentNode)`
`void` `setSinglePath(boolean bit)`
`boolean` `singlePath()`
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ROOTNODEID

    public static final int ROOTNODEID

See Also:
  Constant Field Values

Constructor Detail

### FPTree

    public FPTree()

### FPTree

    public FPTree(int size)

Method Detail

### addChild

    public final void addChild(int parentNodeId,
                               int childnodeId)

### addCount

    public final void addCount(int nodeId,
                               long count)

### addHeaderCount

    public final void addHeaderCount(int attributeValue,
                                     long count)

### addHeaderNext

    public final void addHeaderNext(int attributeValue,
                                    int nodeId)

### attribute

    public final int attribute(int nodeId)

### childAtIndex

    public final int childAtIndex(int nodeId,
                                  int index)

### childCount

    public final int childCount(int nodeId)

### childWithAttribute

    public final int childWithAttribute(int nodeId,
                                        int childAttribute)

### clear

    public final void clear()

### clearConditional

    public final void clearConditional()

### conditional

    public final int conditional(int nodeId)

### count

    public final long count(int nodeId)

### createConditionalNode

    public final int createConditionalNode(int attributeValue,
                                           long count)

### createNode

    public final int createNode(int parentNodeId,
                                int attributeValue,
                                long count)

### createRootNode

    public final void createRootNode()

### getAttributeAtIndex

    public final int getAttributeAtIndex(int index)

### getHeaderNext

    public final int getHeaderNext(int attributeValue)

### getHeaderSupportCount

    public final long getHeaderSupportCount(int attributeValue)

### getHeaderTableAttributes

    public final int[] getHeaderTableAttributes()

### getHeaderTableCount

    public final int getHeaderTableCount()

### isEmpty

    public final boolean isEmpty()

### next

    public final int next(int nodeId)

### parent

    public final int parent(int nodeId)

### removeHeaderNext

    public final void removeHeaderNext(int attributeValue)

### reorderHeaderTable

    public final void reorderHeaderTable()

### replaceChild

    public void replaceChild(int parentNodeId,
                             int replacableNode,
                             int childnodeId)

### setConditional

    public final void setConditional(int nodeId,
                                     int conditionalNode)

### setNext

    public final void setNext(int nodeId,
                              int nextNode)

### setParent

    public final void setParent(int nodeId,
                                int parentNode)

### setSinglePath

    public final void setSinglePath(boolean bit)

### singlePath

    public final boolean singlePath()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.