There are two main files. The "main.cpp" is the algorithm for NET-DPM-3 and "main2.cpp" is a backup file which also adds the updating of parameters in the mean and variance parts.



For "main.cpp", there are two sets of input: 1. connection matrix 2. the observation statistics; and two sets of parameter setting:
1. the mean and variance of each cluster which is obtained by 'mclust' R package. 2. the isingparameters: \pi b0 and b1, which could be prespecified or 
in our case set to be the one maximizes the likelihood.

I also put two files: conn.txt and teststat_0.txt, which are the files I used to conduct simulation 3 previously. For conn.txt--the connection matrix, the format is two numbers in each row are the labels of two nodes 
connected in the network with first label less than the second; and the total number of rows are the total number of edges.  For teststat_0.test-- the observed data, the format is each row is the observed
data for one subjects.


  