Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions main/autocode/src/org/ejml/AutocodeConcurrentApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,9 @@ private static String derivePackagePath( File file ) {
}
}

String output = "";
StringBuilder output = new StringBuilder();
for (int i = packagePath.size() - 1; i >= 0; i--) {
output += packagePath.get(i) + ".";
output.append(packagePath.get(i)).append(".");
}
return output.substring(0, output.length() - 1);
}
Expand All @@ -257,14 +257,14 @@ private static File determineClassName( File original ) throws IOException {
String pattern = "//CONCURRENT_CLASS_NAME ";
int where = text.indexOf(pattern);
if( where < 0 ) {
String name = className(original);
String[] words = name.split("_");
name = words[0];
StringBuilder name = new StringBuilder(className(original));
String[] words = name.toString().split("_");
name = new StringBuilder(words[0]);
for (int i = 1; i < words.length; i++) {
if( i == words.length-1) {
name += "_MT";
name.append("_MT");
}
name += "_" + words[i];
name.append("_").append(words[i]);
}
return new File(original.getParent(),name+".java");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ private void printClassParam( int dimen ) {
}

private void printFunctionParam( int spaces, int dimen ) {
String s = "";
StringBuilder s = new StringBuilder();
for (int i = 0; i < spaces; i++) {
s += " ";
s.append(" ");
}
for( int y = 1; y <= dimen; y++ ) {
if( y == 1 )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ private void hasUncountable(int dimen ){
out.print(" public static boolean hasUncountable("+nameMatrix+" a ) {\n");

for( int y = 1; y <= dimen; y++ ) {
String row = "";
StringBuilder row = new StringBuilder();

for( int x = 1; x <= dimen; x++ ) {
String n = y+""+x;
if( x > 1 )
row += "+ ";
row += "a.a"+n;
row.append("+ ");
row.append("a.a").append(n);
}
out.print(" if( UtilEjml.isUncountable("+row+"))\n"+
" return true;\n");
Expand Down
6 changes: 3 additions & 3 deletions main/ejml-simple/src/org/ejml/equation/TokenList.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ public void insertAfter( Token before, TokenList list ) {
*/
@Override
public String toString() {
String ret = "";
StringBuilder ret = new StringBuilder();
Token t = first;
while (t != null) {
ret += t + " ";
ret.append(t).append(" ");
t = t.next;
}
return ret;
return ret.toString();
}

/**
Expand Down