Commit e0da93d0 authored by Malte Heithoff's avatar Malte Heithoff
Browse files

New Matrix and Cube support for unsigned chars (CV related)

parent 7cba144e
......@@ -10,8 +10,12 @@ import de.monticore.lang.math._symboltable.matrix.MathMatrixVectorExpressionSymb
public interface MathBackend {
String getMatrixTypeName();
String getMatrixTypeUnsignedCharName();
String getCubeTypeName();
String getCubeUnsignedCharName();
String getMatrixInitString(int sizeN, int sizeM);
String getRowVectorTypeName();
......
......@@ -18,11 +18,21 @@ public class ArmadilloBackend implements MathBackend {
return "mat";
}
@Override
public String getMatrixTypeUnsignedCharName() {
return "arma::Mat<unsigned char>";
}
@Override
public String getCubeTypeName() {
return "cube";
}
@Override
public String getCubeUnsignedCharName() {
return "Cube<unsigned char>";
}
@Override
public String getMatrixInitString(int sizeN, int sizeM) {
return "(" + sizeN + "," + sizeM + ");\n";
......
......@@ -15,11 +15,22 @@ public class LinalgBackend implements MathBackend {
return null;
}
@Override
public String getMatrixTypeUnsignedCharName() {
return null;
}
@Override
public String getCubeTypeName() {
return null;
}
@Override
public String getCubeUnsignedCharName() {
Log.info("Cube Unsigned Char Type not supported by currentBackend. ", getBackendName());
return null;
}
@Override
public String getMatrixInitString(int sizeN, int sizeM) {
return "(" + sizeN + "," + sizeM + ");\n";
......
......@@ -18,12 +18,24 @@ public class OctaveBackend implements MathBackend {
return "Matrix";
}
@Override
public String getMatrixTypeUnsignedCharName() {
Log.info("Matrix Unsigned Char Type not supported by currentBackend. ", getBackendName());
return null;
}
@Override
public String getCubeTypeName() {
Log.info("Cube Type not supported by currentBackend. ", getBackendName());
return null;
}
@Override
public String getCubeUnsignedCharName() {
Log.info("Cube Unsigned Char Type not supported by currentBackend. ", getBackendName());
return null;
}
@Override
public String getMatrixInitString(int sizeN, int sizeM) {
return "(" + sizeN + "," + sizeM + ");\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment