Unix Binaries for SerialExtensionEmbedder:
------------------------------------------

This binary can be used to generate the synthetic data discussed in the paper.
Refer to the paper for description of the data generator and parameters used.

It can be used as follows :

USAGE : ./serialExtEmbedder <rho> <p> <eta> <number of events> <simulation time>


Here,

rho : is the noise parameter. 
p : is the inter-occurrence parameter
eta : span parameter.
number of events : Represents the total number of distinct event types in the data stream. 
                   The events are integer coded starting from 1 to number of events.
simulation time : Represents the number of time ticks for which data stream has to be generated. Value 
                  to be entered in terms of 1000 time ticks. For example if we want data for 10,000 time
                  ticks we specify simulation time as 10.


The partial orders to be embedded are given as input through a text file called 'patterns'. The format is the
file is as follows.

line 1 : <number of partial orders> (say, 2)
line 2 : <size of first partial order> (say, 3)
line 3 : <representation of the first episode> (say, E11 E12 E13:1>2,2>3,)
line 4 : <size of second partial order> (say, 5)
line 5 : <representation of second episode> (say, E21 E22 E23 E24 E25:2>1,...,4>5,)
:
:


(A sample file is provided in the directory).

Representation of an Episode:

The events participating in the ith partial order is represented as a list of event types Ei1, Ei2, ... , EiN 
(where N is the size of the ith episode). Since we are dealing with injective episodes Eij != Eik for all (j,k) belonging to [1,N].
Also, there is a lexicographic ordering on Ei's, such that Eij < Eik for all j < k. Since we integer code the events, the list of events
should be in ascending order.


To represent the partial order we use a set of edges. If the partial order requires that the event Eij occurs
before Eik, we represent it by the edge j>k. Similarly, all the restrictions imposed by the partial order is represented by a
set if edges. For ease of visualization and interpretation, we require only transitively reduced set of edges to be input by the user.


Some example representation are given below:

1. Parallel episode with event types [1 2 3 4 5] is represented as :
   1 2 3 4 5:
   (Note the empty edge set)

2. Serial Episode 3 -> 2 -> 1 is represented as:
   1 2 3:2>1,3>2,


3. A serial-parallel episode 2 -> (1 3) -> 4 is represented as:
   1 2 3 4:1>4,2>1,2>3,3>4,



Output:

The data stream generated with the input parameters is dumped into a file 'stream.txt' in the from where the exe is called.
Every line in 'stream.txt' is of the form <event type>,<time of occurrence>.
----------------------------------------------------------------------------------------------------------------------------------------

For more information, contact Raajay (raajay.v at gmail dot com).
