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

#include"net_seed_lag_.h"

void
net_seed_lag (struct IN In, struct TESS Dom, struct SEEDSET *pGSet)
{
  if (!strcmp (In.ttype, "subdomain"))
  {
    (*pGSet).NDensity = (*pGSet).N;
    (*pGSet).N =
      neut_rand_poisson ((double) (*pGSet).NDensity, (int) (*pGSet).Random,
			 1);
  }

  (*pGSet).Size = ut_alloc_2d (3, 2);
  neut_tess_bbox (Dom, (*pGSet).Size);

  (*pGSet).SeedCoo = ut_alloc_2d ((*pGSet).N + 1, 3);
  net_seed_lag_coo ((*pGSet).Dim, (*pGSet).morpho, (*pGSet).N,
		    (*pGSet).Random, (*pGSet).Size, Dom, (*pGSet).SeedWeight,
		    (*pGSet).SeedCoo);

  return;
}
