1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
Description: Comment out code interfacing with Matlab, as Matlab is not in
Debian.
Author: Andrius Merkys <merkys@debian.org>
Forwarded: not-needed
--- a/main/ejml-core/src/org/ejml/ops/MatrixIO.java
+++ b/main/ejml-core/src/org/ejml/ops/MatrixIO.java
@@ -20,9 +20,9 @@
import org.ejml.EjmlVersion;
import org.ejml.data.*;
import org.jetbrains.annotations.Nullable;
-import us.hebi.matlab.mat.ejml.Mat5Ejml;
-import us.hebi.matlab.mat.format.Mat5;
-import us.hebi.matlab.mat.types.MatFile;
+// import us.hebi.matlab.mat.ejml.Mat5Ejml;
+// import us.hebi.matlab.mat.format.Mat5;
+// import us.hebi.matlab.mat.types.MatFile;
import java.io.*;
import java.text.DecimalFormat;
@@ -279,10 +279,10 @@
* @param A The matrix being saved.
* @param fileName Name of the file its being saved at.
*/
- public static void saveMatlab( Matrix A, String fileName ) throws IOException {
+ /* public static void saveMatlab( Matrix A, String fileName ) throws IOException {
MflAccess.verifyEnabled();
MflAccess.IO.saveMatlab(A, fileName);
- }
+ } */
/**
* Loads a {@link Matrix} which has been saved to file using MATLAB's MAT-File Format (Level 5) serialization.
@@ -290,9 +290,9 @@
* @param fileName The file being loaded. It is expected to contain a root level entry named 'ejmlMatrix'.
* @return Matrix A matrix of the type that best matches the serialized data
*/
- public static <T extends Matrix> T loadMatlab( String fileName ) throws IOException {
+ /* public static <T extends Matrix> T loadMatlab( String fileName ) throws IOException {
return loadMatlab(fileName, null);
- }
+ } */
/**
* Loads a {@link Matrix} which has been saved to file using MATLAB's MAT-File Format (Level 5) serialization.
@@ -301,10 +301,10 @@
* @param output Output Matrix. Automatically matched if null. Modified.
* @return Matrix
*/
- public static <T extends Matrix> T loadMatlab( String fileName, @Nullable T output ) throws IOException {
+ /* public static <T extends Matrix> T loadMatlab( String fileName, @Nullable T output ) throws IOException {
MflAccess.verifyEnabled();
return MflAccess.IO.loadMatlab(fileName,output);
- }
+ } */
/**
* Lazily verify MFL availability without using reflections
@@ -317,7 +317,7 @@
}
}
- static {
+ /* static {
boolean foundInClasspath;
try{
@SuppressWarnings("unused")
@@ -327,16 +327,16 @@
foundInClasspath = false;
}
ENABLED = foundInClasspath;
- }
+ } */
- private static final boolean ENABLED;
+ private static final boolean ENABLED = false;
/**
* Load external library once we have verified that it exists
*/
static class IO {
- public static void saveMatlab( Matrix A, String fileName ) throws IOException {
+ /* public static void saveMatlab( Matrix A, String fileName ) throws IOException {
MatFile mat = Mat5.newMatFile().addArray(ENTRY_NAME, Mat5Ejml.asArray(A));
Mat5.writeToFile(mat, fileName);
}
@@ -349,7 +349,7 @@
}
}
throw new IllegalArgumentException("File does not have expected entry: '" + ENTRY_NAME + "'");
- }
+ } */
private static final String ENTRY_NAME = "ejmlMatrix";
}
--- a/main/ejml-core/test/org/ejml/ops/TestMatrixIO.java
+++ b/main/ejml-core/test/org/ejml/ops/TestMatrixIO.java
@@ -46,7 +46,7 @@
Random rand = new Random(23424);
- @Test
+ /* @Test
public void matlabToDDRM() {
DMatrixRMaj expected = new DMatrixRMaj(
new double[][]
@@ -65,7 +65,7 @@
DMatrixRMaj found = MatrixIO.matlabToDDRM(text);
assertTrue(MatrixFeatures_DDRM.isEquals(expected,found, UtilEjml.TEST_F64));
- }
+ } */
@Test
public void load_save_matrix_market_F64() {
@@ -95,7 +95,7 @@
EjmlUnitTests.assertEquals(original,found, UtilEjml.TEST_F32);
}
- @Test
+ /* @Test
public void load_save_matlab_missing_dep_msg() throws IOException {
DMatrixRMaj A = RandomMatrices_DDRM.rectangle(6, 3, rand);
String msg = assertThrows(IllegalStateException.class, () -> MatrixIO.saveMatlab(A, "temp.mat"))
@@ -104,7 +104,7 @@
assertTrue(msg.contains("mfl-ejml"));
assertEquals(msg, assertThrows(IllegalStateException.class, () -> MatrixIO.loadMatlab("temp.mat"))
.getMessage());
- }
+ } */
@Test
public void load_save_binary() throws IOException {
|