public void testBipolar2double() throws Throwable
{
// test a 1x4
boolean[] booleanData1 = { true, false, true, false };
double[] checkData1 = {1,-1,1,-1};
Matrix matrix1 = Matrix.createRowMatrix(BiPolarUtil.bipolar2double(booleanData1));
Matrix checkMatrix1 = Matrix.createRowMatrix(checkData1);
TestCase.assertTrue( matrix1.equals(checkMatrix1));
// test a 2x2
boolean booleanData2[][] = {{true,false},{false,true}};
double checkData2[][] = { {1,-1}, {-1,1} };
Matrix matrix2 = new Matrix(BiPolarUtil.bipolar2double(booleanData2));
Matrix checkMatrix2 = new Matrix(checkData2);
TestCase.assertTrue(matrix2.equals(checkMatrix2));
}