class FDTree extends FDTreeElement {

    public void addFunctionalDependency(BitSet lhs, int a) {
        FDTreeElement fdTreeEl;
        //update root vertex
        FDTreeElement currentNode = this;
        currentNode.addRhsAttribute(a);

        for (int i = lhs.nextSetBit(0); i >= 0; i = lhs.nextSetBit(i + 1)) {

            if (currentNode.children[i - 1] == null) {
                fdTreeEl = new FDTreeElement(maxAttributeNumber);
                currentNode.children[i - 1] = fdTreeEl;
            }
            // update vertex to add attribute
            currentNode = currentNode.getChild(i - 1);
            currentNode.addRhsAttribute(a);
        }
        // mark the last element
        currentNode.markAsLastVertex(a - 1);
    }

    public  FDTree(int maxAttributeNumber);

}