|
|
@ -106,11 +106,15 @@ jstring fn // filename |
|
|
if (!use_counts) { l2 = choice_starts[j]; h2 = choice_starts[j+1]; } |
|
|
if (!use_counts) { l2 = choice_starts[j]; h2 = choice_starts[j+1]; } |
|
|
else { l2 = h2; h2 += choice_counts[j]; } |
|
|
else { l2 = h2; h2 += choice_counts[j]; } |
|
|
if (export_type == EXPORT_ROWS) export_string("%d", i); |
|
|
if (export_type == EXPORT_ROWS) export_string("%d", i); |
|
|
|
|
|
else if (export_type == EXPORT_DOT) { |
|
|
|
|
|
export_string("%d -> %d.%d [ arrowhead=none,label=\"%d\" ];\n", i, i, j-l1, j-l1); |
|
|
|
|
|
export_string("%d.%d [ shape=circle,width=0.1,height=0.1,label=\"\" ];\n", i, j-l1); |
|
|
|
|
|
} |
|
|
for (k = l2; k < h2; k++) { |
|
|
for (k = l2; k < h2; k++) { |
|
|
switch (export_type) { |
|
|
switch (export_type) { |
|
|
case EXPORT_PLAIN: export_string("%d %d %d %.12g\n", i, j-l1, cols[k], non_zeros[k]); break; |
|
|
case EXPORT_PLAIN: export_string("%d %d %d %.12g\n", i, j-l1, cols[k], non_zeros[k]); break; |
|
|
case EXPORT_MATLAB: export_string("%s%d(%d,%d)=%.12g;\n", export_name, j-l1+1, i+1, cols[k]+1, non_zeros[k]); break; |
|
|
case EXPORT_MATLAB: export_string("%s%d(%d,%d)=%.12g;\n", export_name, j-l1+1, i+1, cols[k]+1, non_zeros[k]); break; |
|
|
case EXPORT_DOT: export_string("%d -> %d [ label=\"%d: %.12g\" ];\n", i, cols[k], j-l1, non_zeros[k]); break; |
|
|
|
|
|
|
|
|
case EXPORT_DOT: export_string("%d.%d -> %d [ label=\"%.12g\" ];\n", i, j-l1, cols[k], non_zeros[k]); break; |
|
|
case EXPORT_ROWS: export_string(" %.12g:%d", non_zeros[k], cols[k]); break; |
|
|
case EXPORT_ROWS: export_string(" %.12g:%d", non_zeros[k], cols[k]); break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|