/**
* Fill matrix of derivations of constrains by affine parameters.
* @return B matrix
*/
protected GeneralMatrix getB() {
GeneralMatrix B = new GeneralMatrix(valueConstrain.size(), 6);
int i = 0;
if (valueConstrain.containsKey(SX)) {
B.setRow(i, new double[] { 1, 0, 0, 0, 0, 0 });
i++;
}
if (valueConstrain.containsKey(SY)) {
B.setRow(i, new double[] { 0, 1, 0, 0, 0, 0 });
i++;
}
if (valueConstrain.containsKey(PHIX)) {
B.setRow(i, new double[] { 0, 0, 1, 0, 0, 0 });
i++;
}
if (valueConstrain.containsKey(PHIY)) {
B.setRow(i, new double[] { 0, 0, 0, 1, 0, 0 });
i++;
}
if (valueConstrain.containsKey(TX)) {
B.setRow(i, new double[] { 0, 0, 0, 0, 1, 0 });
i++;
}
if (valueConstrain.containsKey(TY)) {
B.setRow(i, new double[] { 0, 0, 0, 0, 0, 1 });
i++;
}
if (valueConstrain.containsKey(SXY)) {
B.setRow(i, new double[] { 0, 0, -1, 1, 0, 0 });
i++;
}
return B;
}