public Matrix(bool[][] sourceMatrix)
{
matrix = new double[sourceMatrix.Length][];
for (int r = 0; r < Rows; r++)
{
matrix[r] = new double[sourceMatrix[r].Length];
for (int c = 0; c < Cols; c++)
{
if (sourceMatrix[r][c])
{
matrix[r][c] = 1;
}
else
{
matrix[r][c] = -1;
}
}
}
}