4. Description of the function files in the software package giant_test
4.1. calltest.m:
The program calltest.m is the main file that runs the simulations.
This program allows users to input parameters via two GUIs.
The input parameter N_val is a vector. The elements of N_val are the values for sizes of the networks. The program has set the maximum network size to 13,000. If user inputs number greater than 13,000 for the network size, then program displays following error messages in the command window:
`Extremely large network size. '
`Use numbers less than 13000 for network size '.
The minimum and the maximum values of the proportion of nodes of type 1 are given by input parameters q1min and q1max respectively. The program
…show more content…
To compute rho, the program GSC threshold.m denes two non-linear functions root2d and root2r as in Equation (15) and (16) of [1]. Each of these functions represents a system of non-linear equations in two variables. The program numerically solves these two by two systems of non-linear equations by using the inbuilt MatLab function f-solve. Since the probabilities, PNi are numerical solution computed by MatLab these values can be very very small numbers. To avoid these artifacts, the program replaces values of rho less than l_t by …show more content…
For each distinct pair of the scaled mean vector c and the network size N, the program produces an adjacency matrix of a loop-free digraph (with all diagonal entries 0). To construct the matrix A, the program constructs four matrices A_ij of size Ni by Nj. The elements of these matrices A_ij are either 0 or 1. To assign a value to the element a_ij in the matrix A_ij, the program randomly generates a number from the standard uniform distribution on the open interval (0; 1) and if the number is less than Cij Nj then the element a_ij of the matrix A_ij will take value 1, otherwise the element will be 0. For matrices A_ij with i = j, the diagonal elements are made zero by replacing diagonal elements by zero. First, two matrices with the same k value are horizontally concatenated and then the matrices obtained after the horizontal concatenations are vertically concatenated to produce N1 - N2 adjacency matrix A. The numbers N1 and N2 represent the numbers of nodes of type 1 and type 2 respectively. The value of N1 is obtained by rounding the product of the network size N and the node proportion q1 of type 1 to the nearest integer. Then the remaining number of nodes N-N1 is the number N2 of nodes of