public void actionPerformed(ActionEvent e) { new MatrixLibraries().showGUI(); } }
public static void main(String[] args) throws Exception { String s = new MatrixLibraries(MatrixLibrariesFormat.HTMLTABLE).getHtmlTable(); System.out.println(s); }
setColumnLabel(COLT, rotate("Colt")); setColumnLabel(COMMONSMATH, rotate("Commons Math")); setColumnLabel(EJML, rotate("EJML")); setColumnLabel(JAMA, rotate("JAMA")); setColumnLabel(JBLAS, rotate("jblas")); setColumnLabel(JLINALG, rotate("JLinAlg")); setColumnLabel(JMATHARRAY, rotate("JMathArray")); setColumnLabel(JMATRICES, rotate("JMatrices")); setColumnLabel(JSCI, rotate("JSci")); setColumnLabel(JSCIENCE, rotate("JScience")); setColumnLabel(LA4J, rotate("la4j")); setColumnLabel(MANTISSA, rotate("Mantissa")); setColumnLabel(MTJ, rotate("MTJ")); setColumnLabel(OJALGO, rotate("ojAlgo")); setColumnLabel(PARALLELCOLT, rotate("Parallel Colt")); setColumnLabel(SST, rotate("SST")); setColumnLabel(UJMP, rotate("UJMP")); setColumnLabel(VECMATH, rotate("vecmath")); setString(link(rotate("Colt Homepage"), "http://acs.lbl.gov/software/colt/"), HOMEPAGE, COLT); setString(link(rotate("Commons Math Homepage"), "http://commons.apache.org/math/"), HOMEPAGE, COMMONSMATH); setString( link(rotate("EJML Homepage"), "https://code.google.com/p/efficient-java-matrix-library/"), HOMEPAGE, EJML); setString(link(rotate("JAMA Homepage"), "http://math.nist.gov/javanumerics/jama/"), HOMEPAGE, JAMA); setString(link(rotate("jblas Homepage"), "http://mikiobraun.github.io/jblas/"), HOMEPAGE,
public String getHtmlTable() { StringBuilder s = new StringBuilder(); s.append("<div class=\"table-responsive\" style=\"overflow-x: scroll;\">\n"); s.append("<table class=\"text-center table table-striped table-hover table-condensed\">\n"); s.append("<tbody>\n"); s.append("<tr>\n"); s.append("<th>\n"); s.append("</th>\n"); for (int c = 0; c < getColumnCount(); c++) { String label = getColumnLabel(c); s.append("<th class=\"text-center\">" + label + "</th>\n"); } s.append("</tr>\n"); for (int r = 0; r < getRowCount(); r++) { s.append("<tr>\n"); String feature = getRowLabel(r); s.append("<th>" + feature + "</th>\n"); for (int c = 0; c < getColumnCount(); c++) { String result = getString(r, c); s.append("<td>" + result + "</td>\n"); } s.append("</tr>\n"); } s.append("</tbody>\n"); s.append("</table>\n"); s.append("</div>\n"); return s.toString(); }
public static void printLatex(String[] args) throws Exception { MatrixLibraries ml = new MatrixLibraries(MatrixLibrariesFormat.LATEX); Matrix m = ml.deleteRows(Ret.NEW, ml.getRowCount() - 1); String s = m.exportTo().string().asLatex(); s = s.replaceAll("table", "sidewaystable"); + "\\begin{tabular}{p{0.25\\textwidth}p{0.25\\textwidth}p{0.25\\textwidth}p{0.25\\textwidth}}\n"; s += "\\renewcommand{\\tabcolsep}{30pt}"; List<String> fn = ml.getFootnotes(); Collections.sort(fn); for (int i = 0; i < fn.size(); i++) {
public MatrixLibraries matrixLibraries() { return new MatrixLibraries(); }
private final boolean supportsSingular(Matrix a, long feature) { long col = getMatrixLibraryId(); String supported = LIBRARIES.getAsString(feature, col); if (supported.contains(MatrixLibraries.NONSINGULARTEXT)) { return false; } else { return true; } }
public String getHtmlList() { StringBuilder s = new StringBuilder(); for (int c = 0; c < getColumnCount(); c++) { String label = getColumnLabel(c); s.append("<h2>"); s.append(label); s.append("</h2>\n"); s.append("<p>These are the features of the <strong>" + label + "</strong> library:</p>"); s.append("<ul>\n"); for (int r = 0; r < getRowCount(); r++) { String feature = getRowLabel(r); String result = getString(r, c); if ("no".equals(result)) { } else if ("yes".equals(result)) { s.append("<li>" + label + " "); s.append(feature); s.append("</li>\n"); } else if (!"no".equals(result)) { s.append("<li>" + label + " "); s.append(feature + ": "); s.append(getString(r, c)); s.append("</li>\n"); } } s.append("</ul>\n\n"); } return s.toString(); }
public void saveSettings() throws Exception { String resultDir = BenchmarkUtil.getResultDir(getConfig()); File envFile = new File(resultDir + File.separator + "env.csv"); File propFile = new File(resultDir + File.separator + "props.csv"); File confFile = new File(resultDir + File.separator + "conf.csv"); File versionFile = new File(resultDir + File.separator + "versions.csv"); new SystemEnvironmentMatrix().exportTo().file(envFile).asDenseCSV(); Matrix props = new SystemPropertiesMatrix().replaceRegex(Ret.NEW, "\r\n", " "); props = props.replaceRegex(Ret.NEW, "\n", " "); props.exportTo().file(propFile).asDenseCSV(); getConfig().exportTo().file(confFile).asDenseCSV(); Matrix libraries = new MatrixLibraries(); System.out.println(libraries); Matrix versions = libraries.selectRows(Ret.NEW, 0, 1).transpose(); versions.exportTo().file(versionFile).asDenseCSV(); }
protected boolean isSupported(Matrix a, long feature, MatrixLayout layout, Size size, EntryType generator) { long col = getMatrixLibraryId(); String supported = LIBRARIES.getAsString(feature, col);