Commit 578d5466 authored by Ryan Wisnesky's avatar Ryan Wisnesky
Browse files

fixes a silly error and thereby improves chase performance dramatically

parent ec0aeeb1
...@@ -94,7 +94,7 @@ public class BinRelMap<X, Y> implements Iterable<Pair<X, Y>> { ...@@ -94,7 +94,7 @@ public class BinRelMap<X, Y> implements Iterable<Pair<X, Y>> {
} }
public BinRelMap() { public BinRelMap() {
R = new LinkedHashMap<>(1000000); R = new LinkedHashMap<>();
} }
public boolean add(X x, Y y) { public boolean add(X x, Y y) {
......
...@@ -351,13 +351,13 @@ public class Chase<Ty, En1, Sym, Fk1, Att1, En2, Fk2, Att2, Gen, Sk, X, Y> { ...@@ -351,13 +351,13 @@ public class Chase<Ty, En1, Sym, Fk1, Att1, En2, Fk2, Att2, Gen, Sk, X, Y> {
int i = 0; int i = 0;
T = new Content(I); T = new Content(I);
// System.out.println(T); // System.out.println(T.sizes());
for (;;) { for (;;) {
boolean changed = step(i == 0); boolean changed = step(i == 0);
if (!changed) { if (!changed) {
return; return;
} }
// System.out.println(T); // System.out.println(T.sizes());
i++; i++;
} }
......
...@@ -64,6 +64,7 @@ public class InstExpJdbc extends InstExpImport<Connection, String> { ...@@ -64,6 +64,7 @@ public class InstExpJdbc extends InstExpImport<Connection, String> {
if (jdbcString.trim().isEmpty()) { if (jdbcString.trim().isEmpty()) {
toGet = (String) op.getOrDefault(AqlOption.jdbc_default_string); toGet = (String) op.getOrDefault(AqlOption.jdbc_default_string);
} }
//.driver.DriverManager.
return DriverManager.getConnection(toGet); return DriverManager.getConnection(toGet);
} }
......
...@@ -32,6 +32,7 @@ public class CodeTextPanel extends JPanel { ...@@ -32,6 +32,7 @@ public class CodeTextPanel extends JPanel {
public void setText(String s) { public void setText(String s) {
area.setText(s); area.setText(s);
area.setCaretPosition(0); area.setCaretPosition(0);
System.out.println(s.substring(0, Integer.min(5, s.length())));
} }
public String getText() { public String getText() {
...@@ -61,6 +62,7 @@ public class CodeTextPanel extends JPanel { ...@@ -61,6 +62,7 @@ public class CodeTextPanel extends JPanel {
// area.setEditable(false); // area.setEditable(false);
UndoManager m = new UndoManager(); UndoManager m = new UndoManager();
m.setLimit(16); //since common case is lots of dots in bottom panels
// area.setundoManager = new UndoManager(); // area.setundoManager = new UndoManager();
Document doc = area.getDocument(); Document doc = area.getDocument();
doc.addUndoableEditListener((UndoableEditEvent e) -> m.addEdit(e.getEdit())); doc.addUndoableEditListener((UndoableEditEvent e) -> m.addEdit(e.getEdit()));
......
Supports Markdown
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