--- rat/client/Attic/code.html 2000/07/31 15:36:22 1.9
+++ rat/client/Attic/code.html 2000/08/02 15:27:10 1.10
@@ -62,6 +62,8 @@ var funny='|';
var reqaction='';
var canceltim;
+var expense=0;
+
var data1=new Array(1024);
var data2=new Array(1024);
var data3=new Array(1024);
@@ -75,6 +77,7 @@ var inf;
function insertrow(j,ex1,ex2) {
var kj;
stored=0;
+ expense++; expense++;
objects1='';
objects2='';
for (kj=0;kj<=maxrow;kj++) {
@@ -220,6 +223,7 @@ function insertcol(j) {
if ( col[kj]>j ) { col[kj]++; }
}
maxcol++;
+ expense++; expense++;
col[maxcol]=j+1;
}
@@ -422,6 +426,7 @@ function insertport (obj1,d,inout,linkob
function addobj(kjid,objs) {
stored=0;
+ expense++;
if (rowcont[kjid]!='') { rowcont[kjid]+=':'; }
rowcont[kjid]+=obj.length;
obj[obj.length]=objs;
@@ -627,22 +632,64 @@ function dellink (linknr) {
// Links obj1 with obj2, creates new objlink, marks all elements with number
function joinres (obj1,obj2,cond) {
- var k; var kr; var outcol; var incol; var d;
stored=0;
+ var minexpense;
+ var best;
+
+ expense=0;
+ tryjoin(obj1,obj2,cond,1,1);
+ minexpense=expense;
+ best=0;
+ finishload();
+
+ expense=0;
+ tryjoin(obj1,obj2,cond,1,-1);
+ if (expense