//Algorithm A: Normalization of the Random Connectivity Matrix M

// normalize the energy of each row and column of M to |ε|=1.0, |ε|>1.0 or |ε|<1.0;

YinYangMatrix M(N,N); // create an N×N bipolar connectivity matrix or quantum gate

M.randomize(); // assign random weights to the elements of M

M.normalizeRows(); // normalize each row |ε|(Mk*)

M.normalizeCols(). // normalize each column |ε|(M*j)

//-------------------------------------------------------------------------------

//Algorithm B: Test the three conditions: "t, E(t+1) = M(t)E(t), E(t+1) > M(t)E(t), or E(t+1) < M(t)E(t)

YinYangMatrix M(N,N); // create an N×N bipolar connectivity matrix or quantum gate

YinYangMatrix Et0(1,N); // create column bipolar vector at t0

YinYangMatrix Et1(1,N); // create column bipolar vector at t1

M.normalize(); // Call Algorithm A

file1 >>Et0; // input column vector from file1

int times; // number of iteration

cin >> times; // enter number of iteration

for (int i = 0; i

Et1 = M*Et0; // M multiplied by column vector

file2 <

file2 <

Et0 = Et1; // reassign for next iteration

}