Class AdTree<A,V>

java.lang.Object
edu.pitt.isp.sverchkov.data.AdTree<A,V>
Type Parameters:
A - Attribute type
V - Value type
All Implemented Interfaces:
Serializable

public class AdTree<A,V> extends Object
An implementation of a static AD tree based on Moore and Lee 1998 (mostly)

Indexing of the variables works backwards: (a_i can't have children a_i ... a_m) ... not that that difference is visible in the API.

Version:
$Id: $Id
Author:
jdramsey
See Also:
  • Constructor Details

    • AdTree

      public AdTree(DataTable<A,V> data)
      Constructs an AD tree for the given data set.
      Parameters:
      data - The data set.
  • Method Details

    • values

      public List<V> values(A attribute)
      Returns the number of rows in the data set.
      Parameters:
      attribute - The attribute to count.
      Returns:
      The number of rows in the data set.
    • count

      public int count(Map<A,V> assignment)
      Returns the number of rows in the data set.
      Parameters:
      assignment - The assignment to count.
      Returns:
      The number of rows in the data set.
    • counts

      public Map<V,Integer> counts(A attribute, Map<A,V> assignment)
      Returns the number of rows in the data set.
      Parameters:
      attribute - The attribute to count.
      assignment - The assignment to count.
      Returns:
      The number of rows in the data set.
    • toXML

      public Document toXML() throws ParserConfigurationException
      Converts to XML.
      Returns:
      The XML document.
      Throws:
      ParserConfigurationException - if something goes wrong
    • toXML

      public Document toXML(DocumentBuilder builder)
      Converts to XML.
      Parameters:
      builder - The builder.
      Returns:
      The XML document.