/* This file is part of the Neper software package. */
/* Copyright (C) 2003-2014, Romain Quey. */
/* See the COPYING file in the top-level directory. */

#ifndef STRUCTSEEDSET_H
#define STRUCTSEEDSET_H

struct SEEDSET
{
  /// \brief Identifier of the distribution
  int Id;

  /// \brief Dimensionality
  int Dim;

  /// \brief Number of seeds.
  int N;

  /// \brief size of the seed set (= bounding box of the domain)
  double **Size;

  /// \brief weight
  /// \details can be: custom or a statistics law or @file_name
  char *weight;

  /// \brief morphology
  /// \details can be: poisson, cube, dodeca, tocta or custom
  char *morpho;

  /// \brief Number used for the seed generation process.
  long Random;
  long RandomO;

  /// \brief Equation for lamella tessellations
  /// \details (equation of the first lamella interface)
  ///          LamEq[i][1]*X1+LamEq[i][2]*X2+LamEq[i][3]*X3=LamEq[i][0]
  double *LamEq;

  /// \brief Width for lamella tessellations
  double LamWidth;

  // SEED DISTRIBUTION -------------------------------------------------

  /// \brief Variant of N which applies to cube and tocta tessellations only
  /// \details number of seeds in 1D
  int N1d;

  /// \brief Variant of N which applies to subdomain tessellations only
  /// \details nominal density
  int NDensity;

  // For seed i (i=1...N):
  /// \brief Coordinates of the seeds
  /// \details the first index is the seed id (ranging 1-N)
  ///          and the second is the dimension (ranging 0-2)
  double **SeedCoo;

  double *SeedWeight;

  int *rngid;

  double **q;

  // DOMAIN NEIGHBOURHOOD SEED DISTRIBUTION ----------------------------

  /// Number of seeds in the domain neighbourhood
  int nN;

  /// Size of the domain neighbourhood
  double **nSize;

  /// Volume
  double nVol;

  /// nSeedCoo[i][j] (j=0...2) are the 3 coordinates.
  double **nSeedCoo;

  /// \brief Master of the seed (it is inside the domain)
  /// \details This variable is specific to periodic tessellations
  /// For seed i (i=1...nN):
  int *nMaster;

  // \brief Seeds rng output id
  // \details this variable is specific to sudomain-type tessellations
  // For seed i (i=1...nN):
  int *nSeedRandId;
};
typedef struct SEEDSET SEEDSET;

#endif /* STRUCTSEEDSET_H */
