[Test()] public void TestCreate()
{
var sparse_boolean_matrix = new SparseBooleanMatrix();
sparse_boolean_matrix[0, 1] = true;
sparse_boolean_matrix[0, 4] = true;
sparse_boolean_matrix[1, 0] = true;
sparse_boolean_matrix[1, 2] = true;
sparse_boolean_matrix[1, 4] = true;
sparse_boolean_matrix[3, 1] = true;
sparse_boolean_matrix[3, 3] = true;
sparse_boolean_matrix[3, 4] = true;
var correlation_matrix = new BinaryCosine(sparse_boolean_matrix.NumberOfRows);
correlation_matrix.ComputeCorrelations(sparse_boolean_matrix);
Assert.AreEqual(4, correlation_matrix.NumberOfRows);
Assert.IsTrue(correlation_matrix.IsSymmetric);
Assert.AreEqual(1 / Math.Sqrt(6), correlation_matrix[0, 1], DELTA);
Assert.AreEqual(1 / Math.Sqrt(6), correlation_matrix[1, 0], DELTA);
Assert.AreEqual(1 / 3d, correlation_matrix[1, 3], DELTA);
Assert.AreEqual(0f, correlation_matrix[2, 0]);
Assert.AreEqual(0f, correlation_matrix[2, 1]);
Assert.AreEqual(1f, correlation_matrix[2, 2]);
Assert.AreEqual(0f, correlation_matrix[2, 3]);
Assert.AreEqual(0f, correlation_matrix[0, 2]);
Assert.AreEqual(0f, correlation_matrix[1, 2]);
Assert.AreEqual(0f, correlation_matrix[3, 2]);
}