//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
// PLEASE DO NOT EDIT WITHOUT THE EXPLICIT CONSENT OF THE AUTHOR! \\
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\

package fca;

import java.io.*;                       // Needed, obviously...
import java.util.HashMap;               // For the keywords
import java.util.Properties;            // For the configuration
import java.util.Iterator;              // For table iteration
import java.util.Date;                  // For file stamping

import hlt.language.io.FileTools;      // For file names
import hlt.language.util.ArrayList;    // For the javadoc tag definitions

/**
 * This is a class for representing the basic structures and methods
 * used in Formal Concept Analysis (FCA). Namely, the basic 2D array of
 * concept <i>vs.</i> attributes and the implicit partial order inferred
 * from the concept definition in terms of attributes.
 *
 * <p>
 *
 * It takes as input a set of elements of the form <tt>C: A1, ...,
 * An;</tt> where <tt>C</tt> and <tt>An</tt> (for <tt>n = 1, ..., n</tt>
 * are names of type <tt>String</tt>; <i>i.e.</i>, a map associating a
 * finite set of attributes to each elements of a final set of concepts.
 *
 * <p>
 *
 * From such an input, this class is meant to provides methods for:
 * <ul>
 * <li> reading such a map from concepts to attributes;
 * <li> writing it in various formats (XML, JSON, <i>etc.</i>);
 * <li> deriving the set of concepts;
 * <li> deriving the set of attributes;
 * <li> computing a represention of the concept/attributes relations in
 *      "matrix form" (actually an array of <tt>long</tt> integers) and
 *      transpose (its dual attribute/concept map);
 * <li> inferring from this matrix the implicit partial ordering among the
 *      concepts (and dually the implicit partial ordering among the
 *      attributes);
 * <li> performing a topological sort of concepts (and dually attributes)
 *      according to the inferred orderings;
 * <li> generating a graphical rendering of the concept hierarchy (and dually
 *      the attribute hierarchy) .
 * </ul>
 * 
 *
 * @version     Last modified on Fri Aug 17 18:14:41 2012 by hak
 * @author      <a href="mailto:hak@acm.org">Hassan A&iuml;t-Kaci</a>
 * @copyright   &copy; <a href="http://www.hassan-ait-kaci.net/">by the author</a>
 */

public class FCA
{
  //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\\

  // FIELDS:

  /**
   * Concept to attributes map input file name.
   */
  String mapFileName;

  /**
   * Target directory.
   */
  String outputDir;

  /**
   * File output writer.
   */
  BufferedWriter output;                

  // CONSTRUCTORS:

  /**
   * Constructs a FCA object with specified input map file name.
   *
   * @param input name of file containing the concept/attributes map
   */
  public FCA (String mapFile)
    {
      mapFileName = mapFile;                    // map input file name
    }

  // METHODS:


  //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
}
