#ifndef CLUSTER_OUTPUT_HH
# define CLUSTER_OUTPUT_HH

# include "utils/Symbol.hh"

# include "SharedData.h"

# define ClusterOutputBaseName "cluster." 

/** @brief Cluster output data
 *
 * This class provides the data type provided by a classifizer as a result.
 * It is also based on SharedData class which allow to distribute
 * it between processes.
 *
 * @author Frederic Py <fpy@mbari.org>
 */
class ClusterOutput :public SharedData {
public:
  typedef size_t cluster_type;
  typedef double dist_type;

  /** @brief cluster result type
   */
  struct Data {
    cluster_type bestCluster;
    dist_type distance;
  }; // ClusterOutput::Data

  Data data;

  /** @brief Constructor
   *
   * @param name A symbolic name
   * @param access Access type
   * @param init Initialisation flag
   *
   * Create a new instance with "cluster.@e <name>" as shared data name
   */
  ClusterOutput(Symbol const &name, 
		Access access = NoAccess,
		Boolean init = False);
  /** @brief Destructor 
   */
  ~ClusterOutput();

  /** @brief Re'ad shared data
   */
  void read();
  /** @brief write shared data
   */
  void write();
}; // ClusterOutput

#endif // CLUSTER_OUTPUT_HH 
